-
Notifications
You must be signed in to change notification settings - Fork 0
/
default.nix
55 lines (52 loc) · 1.06 KB
/
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
{ stdenv
, lib
, srcDir ? null
, boost
, clang-tools
, cmake
, difftastic
, makeWrapper
, meson
, ninja
, nix
, nlohmann_json
, catch2_3
, pkg-config
}:
let
filterMesonBuild = builtins.filterSource
(path: type: type != "directory" || baseNameOf path != "build");
in
stdenv.mkDerivation {
pname = "flutsch";
version = "1.0.0";
src = if srcDir == null then filterMesonBuild ./. else srcDir;
checkInputs = [
catch2_3
];
doCheck = true;
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/flutsch" --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 = "flutsch";
};
}