added flake

This commit is contained in:
Kristian Krsnik 2024-01-30 00:24:54 +01:00
parent 7c12323acc
commit 1c725afb1d
Signed by: Kristian
GPG Key ID: FD1330AC9F909E85

38
flake.nix Normal file
View File

@ -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/