forked from Illumina/DRAGMAP
-
Notifications
You must be signed in to change notification settings - Fork 1
/
crates.nix
32 lines (31 loc) · 974 Bytes
/
crates.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
{...}: {
perSystem = {pkgs, ...}: let
cargoToml = builtins.fromTOML (builtins.readFile ./Cargo.toml);
crateName = cargoToml.package.name;
in {
# declare projects
nci.projects.${crateName}.path = ./.;
# configure crates
nci.crates.${crateName} = {
drvConfig = {
mkDerivation = {
buildInputs = [
pkgs.boost
pkgs.gnumake
pkgs.gtest
pkgs.zlib
];
};
env = {
BOOST_INCLUDEDIR = "${pkgs.lib.getDev pkgs.boost}/include";
BOOST_LIBRARYDIR = "${pkgs.lib.getLib pkgs.boost}/lib";
GTEST_INCLUDEDIR = "${pkgs.lib.getDev pkgs.gtest}/include";
GTEST_LIBRARYDIR = "${pkgs.lib.getLib pkgs.gtest}/lib";
GTEST_ROOT = "${pkgs.gtest}";
LD_LIBRARY_PATH = "${pkgs.lib.getLib pkgs.gtest}/lib";
LIBCLANG_PATH = "${pkgs.lib.getLib pkgs.llvmPackages.libclang.lib}/lib";
};
};
};
};
}