-
Notifications
You must be signed in to change notification settings - Fork 0
/
package.nix
48 lines (45 loc) · 900 Bytes
/
package.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
{
stdenv,
fetchFromGitHub,
clipp,
cmake,
git,
gtest,
nlohmann_json,
pkg-config,
run_tests
}:
let
json_schema_validator = stdenv.mkDerivation rec {
pname = "json_schema_validator";
version = "2.1.0";
src = fetchFromGitHub {
owner = "pboettch";
repo = "json-schema-validator";
rev = "${version}";
sha256 = "13d62nyfhz6kcp72dlpny36kk75zw2snf04q612bi5f5riza77xk";
};
nativeBuildInputs = [
nlohmann_json
cmake
];
};
in
stdenv.mkDerivation {
name = "libedid";
buildInputs = [ gtest ];
nativeBuildInputs = [
clipp
cmake
git # for scripts/linuxhw_coverage.sh
json_schema_validator
nlohmann_json
pkg-config
];
cmakeFlags = [
"-DENABLE_JSON=ON"
"-DBUILD_TESTS=ON"
"-DBUILD_EXAMPLES=ON"
] ++ (if run_tests then [ "-DRUN_TESTS=ON" ] else []);
src = builtins.path { path = ./.; name = "libedid-src"; };
}