-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathflake.nix
60 lines (52 loc) · 1.39 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
{
description = "Image viewer for image processing experts";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = {
self,
nixpkgs,
flake-utils,
}:
flake-utils.lib.eachDefaultSystem (
system: let
pkgs = nixpkgs.legacyPackages.${system};
rustPlatform = pkgs.rustPlatform;
in {
packages = rec {
vpv = pkgs.stdenv.mkDerivation rec {
pname = "vpv";
version = "0.8.2";
src = ./.;
cargoRoot = "src/fuzzy-finder";
cargoDeps = rustPlatform.importCargoLock {
lockFile = ./src/fuzzy-finder/Cargo.lock;
};
cmakeFlags = [
"-DUSE_GDAL=ON"
"-DUSE_OCTAVE=ON"
"-DVPV_VERSION=${version}"
];
nativeBuildInputs = with pkgs; [
cmake
pkgconfig
rustPlatform.cargoSetupHook
cargo
];
buildInputs = with pkgs; [
libpng
libtiff
libjpeg
SDL2
gdal
octave
# (2022-11-18) broken https://github.com/NixOS/nixpkgs/issues/186928
#pkgs.octavePackages.image
];
};
default = vpv;
};
}
);
}