-
Notifications
You must be signed in to change notification settings - Fork 49
/
Copy pathflake.nix
55 lines (47 loc) · 1.46 KB
/
flake.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
{
description = "CMake utility toolbox";
inputs = {
flake-parts.url = "github:hercules-ci/flake-parts";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
};
outputs =
inputs:
inputs.flake-parts.lib.mkFlake { inherit inputs; } {
systems = inputs.nixpkgs.lib.systems.flakeExposed;
perSystem =
{ pkgs, self', ... }:
{
packages = {
default = self'.packages.jrl-cmakemodules;
jrl-cmakemodules = pkgs.jrl-cmakemodules.overrideAttrs (super: {
src = pkgs.lib.fileset.toSource {
root = ./.;
fileset = pkgs.lib.fileset.gitTracked ./.;
};
# TODO: remove all this once it is in nixpkgs
postPatch = ''
patchShebangs _unittests/run_unit_tests.sh
'';
outputs = [ "out" "doc" ];
nativeBuildInputs = super.nativeBuildInputs ++ [
pkgs.sphinxHook
];
sphinxRoot = "../.docs";
doCheck = true;
checkInputs = [
pkgs.python3
];
checkPhase = ''
runHook preCheck
pushd ../_unittests
./run_unit_tests.sh
cmake -P test_pkg-config.cmake
rm -rf build install
popd
runHook postCheck
'';
});
};
};
};
}