-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathdefault.nix
57 lines (54 loc) · 1016 Bytes
/
default.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
{
stdenv,
lib,
boost,
clang-tools,
cmake,
difftastic,
makeWrapper,
meson,
ninja,
nix,
nlohmann_json,
pkg-config,
}:
let
inherit (lib) fileset;
src = lib.fileset.toSource {
fileset = files;
root = ./.;
};
files = fileset.unions [
./src
./meson.build
];
in
stdenv.mkDerivation {
pname = "nix-unit";
version = "2.24.1";
inherit src;
buildInputs = [
nlohmann_json
nix
boost
];
nativeBuildInputs = [
makeWrapper
meson
pkg-config
ninja
# nlohmann_json can be only discovered via cmake files
cmake
] ++ (lib.optional stdenv.cc.isClang [ clang-tools ]);
postInstall = ''
wrapProgram "$out/bin/nix-unit" --prefix PATH : ${difftastic}/bin
'';
meta = {
description = "Nix unit test runner";
homepage = "https://github.com/adisbladis/nix-unit";
license = lib.licenses.gpl3;
maintainers = with lib.maintainers; [ adisbladis ];
platforms = lib.platforms.unix;
mainProgram = "nix-unit";
};
}