-
Notifications
You must be signed in to change notification settings - Fork 389
Expand file tree
/
Copy pathunittests.nix
More file actions
49 lines (42 loc) · 956 Bytes
/
unittests.nix
File metadata and controls
49 lines (42 loc) · 956 Bytes
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
{ nixpkgs ? ./pinned.nix,
pkgs ? import nixpkgs { config = { }; overlays = [ ]; },
stdenv ? pkgs.llvmPackages_19.libcxxStdenv,
withCcache ? false,
}:
let
ccache = pkgs.callPackage ./nix/ccache.nix { };
in
stdenv.mkDerivation rec {
pname = "unittests";
version = "dev";
enableParallelBuilding = true;
sourceRoot = "test";
srcs = [
./test
./src
./api
./lib
];
hardeningDisable = [ "all" ];
cmakeBuildType = "Debug";
lest = pkgs.callPackage ./deps/lest {};
uzlib = pkgs.callPackage ./deps/uzlib {};
libfmt = pkgs.callPackage ./deps/libfmt { stdenv = stdenv; };
passthru = {
inherit lest;
inherit libfmt;
};
nativeBuildInputs = [
pkgs.buildPackages.cmake
pkgs.buildPackages.valgrind
pkgs.buildPackages.clang-tools
] ++ pkgs.lib.optionals withCcache [ccache.wrapper];
buildInputs = [
pkgs.rapidjson
pkgs.http-parser
pkgs.openssl
lest
uzlib
libfmt
];
}