forked from jrl-umi3218/mc_rtc
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathflake.nix
More file actions
76 lines (73 loc) · 2.43 KB
/
Copy pathflake.nix
File metadata and controls
76 lines (73 loc) · 2.43 KB
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
{
description = " mc_rtc is an interface for simulated and real robotic systems suitable for real-time control";
inputs = {
mc-rtc-nix.url = "github:mc-rtc/nixpkgs";
flake-parts.follows = "mc-rtc-nix/flake-parts";
systems.follows = "mc-rtc-nix/systems";
gepetto.follows = "mc-rtc-nix/gepetto";
ccache-trigger.follows = "mc-rtc-nix/ccache-trigger";
with-ros-trigger.follows = "mc-rtc-nix/with-ros-trigger";
};
outputs =
inputs:
inputs.flake-parts.lib.mkFlake { inherit inputs; } (
{ lib, ... }:
{
systems = import inputs.systems;
imports = [
inputs.mc-rtc-nix.flakeModule
# or inputs.mc-rtc-nix.flakeModule if you don't need private repositories
{
mc-rtc-nix = {
with-ros = inputs.with-ros-trigger.value;
overlays.ccache = inputs.ccache-trigger.value;
};
mc-rtc-superbuild =
{ ... }:
{
enable = true;
shells.defaultShells.release = true;
shells.defaultShells.devel = false;
};
flakoboros = {
overrideAttrs.mc-rtc =
{ drv-prev, pkgs-final, ... }:
{
src = lib.cleanSource ./.;
# FIXME: enable testing:
# - testing fails in nix build
# - testRobotModule fails in nix devel
cmakeFlags = (drv-prev.cmakeFlags or [ ]) ++ [ (lib.cmakeBool "BUILD_TESTING" true) ];
nativeBuildInputs = drv-prev.nativeBuildInputs ++ [ pkgs-final.ninja ];
nativeCheckInputs = [
# workaround for some tests trying to write to /homeless-shelter
pkgs-final.writableTmpDirAsHomeHook
];
doCheck = false;
};
};
}
];
perSystem =
{ ... }:
{
treefmt = {
settings.global.excludes = [
".envrc"
".git-blame-ignore-revs"
".jrl-ci"
"3rd-party/*"
"doc/*"
"LICENSE"
];
programs = {
# keep-sorted start
mdformat.enable = true;
yamlfmt.enable = false;
# keep-sorted end
};
};
};
}
);
}