From 17a3ea880402338420699e03bcb24181e4ff3924 Mon Sep 17 00:00:00 2001 From: Rutger Broekhoff Date: Thu, 2 May 2024 20:27:40 +0200 Subject: Initial commit Based on dc4ba6a --- lib/libtmi8/flake.nix | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 lib/libtmi8/flake.nix (limited to 'lib/libtmi8/flake.nix') diff --git a/lib/libtmi8/flake.nix b/lib/libtmi8/flake.nix new file mode 100644 index 0000000..2ae7fc9 --- /dev/null +++ b/lib/libtmi8/flake.nix @@ -0,0 +1,42 @@ +{ + inputs = { + nixpkgs.url = "https://flakehub.com/f/NixOs/nixpkgs/*.tar.gz"; + flake-utils.url = "https://flakehub.com/f/numtide/flake-utils/0.1.88.tar.gz"; + }; + + outputs = { self, nixpkgs, flake-utils, ... }@inputs: + flake-utils.lib.eachDefaultSystem + (system: + let + pkgs = import nixpkgs { + inherit system; + overlays = [ ]; + }; + + inherit (pkgs.gcc13) stdenv; + + oeuf-libtmi8 = stdenv.mkDerivation { + name = "oeuf-libtmi8"; + src = pkgs.lib.cleanSource ./.; + + nativeBuildInputs = with pkgs; [ gcc13 ]; + buildInputs = with pkgs; [ arrow-cpp boost182 ]; + buildPhase = '' + make libtmi8 + ''; + + installPhase = '' + make install DESTDIR="$out" + ''; + }; + in + { + packages.oeuf-libtmi8 = oeuf-libtmi8; + + devShells.default = pkgs.mkShell { + inputsFrom = [ oeuf-libtmi8 ]; + }; + + formatter = pkgs.nixpkgs-fmt; + }); +} -- cgit v1.2.3