From 1c725afb1d26f8d5361866a2a1906bfc520da759 Mon Sep 17 00:00:00 2001 From: Kristian Krsnik Date: Tue, 30 Jan 2024 00:24:54 +0100 Subject: [PATCH] added flake --- flake.nix | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 flake.nix diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..4d6bbd4 --- /dev/null +++ b/flake.nix @@ -0,0 +1,38 @@ +{ + description = ""; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + }; + + outputs = { + self, + nixpkgs, + }: let + system = "x86_64-linux"; + pkgs = nixpkgs.legacyPackages.${system}; + in { + packages.${system} = { + default = pkgs.stdenvNoCC.mkDerivation { + name = "scannerExtract"; + src = ./.; + + buildInputs = with pkgs; [ + opencv3 + liblbfgs + qt6.full + ]; + + buildPhase = '' + mkdir $out + cd $out + cmake $src/scannerExtract/ -DCMAKE_BUILD_TYPE=release + make + # (make install) + ''; + }; + }; + }; +} +# http://www.dominik-ruess.de/scannerExtract/ +