-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
115 lines (109 loc) · 4.22 KB
/
Copy pathflake.nix
File metadata and controls
115 lines (109 loc) · 4.22 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
{
description = "Example superbuild environment and controller with mc-panda and macos support";
inputs = {
# mc-rtc-nix.url = "github:mc-rtc/nixpkgs";
mc-rtc-nix.url = "github:mc-rtc/nixpkgs/pull/59/head";
# mc-rtc-nix.url = "path:/home/arnaud/devel/mc-rtc-nix/nixpkgs";
flake-parts.follows = "mc-rtc-nix/flake-parts";
systems.follows = "mc-rtc-nix/systems";
gepetto.follows = "mc-rtc-nix/gepetto";
};
outputs =
inputs:
inputs.flake-parts.lib.mkFlake { inherit inputs; } (
{ ... }:
{
systems = import inputs.systems;
imports = [
inputs.mc-rtc-nix.flakeModule
{
mc-rtc-nix = {
with-ros = false;
};
# This mc-rtc-superbuild configuration will:
# - Define named reusable configurations in `configurations`
# - Use explicit runtime (Nix runtime components) vs devel (local/source overlays)
# - Generate `${project.name}-<configuration>` and `${project.name}-<configuration>-devel` shells
#
# This will also generate a .superbuild/mc_rtc.yaml file containg the suitable mc_rtc configuration
# Devel dependencies are expected to be installed manually in .superbuild/install
#
# As always, individual packages can be overridden using flakoboros
mc-rtc-superbuild =
{ pkgs, ... }:
{
enable = true;
project.pname = "";
# TODO: replace this section with your own configuration presets for your project
configurations = {
panda-controller-example-minimal = {
extends = [ "minimal" ];
runtime = {
robots = [
# pkgs.mc-panda-lirmm
pkgs.mc-panda
];
apps = [
pkgs.mc-rtc-magnum
];
config = "lib/mc_controller/etc/PandaControllerExample/mc_rtc.yaml";
};
devel = {
config = "lib64/mc_controller/etc/PandaControllerExample/mc_rtc.yaml";
controllers = [ pkgs.panda-controller-example ];
};
};
panda-controller-example-full = {
extends = [
"minimal"
"panda-controller-example-minimal"
];
# FIXME: disable mc-franka, it does not build on macos
runtime = {
# FIXME can't access stdenv, lib here
# apps = lib.optionals (!stdenv.hostPlatform.isDarwin) [
# pkgs.mc-franka
# ];
};
};
};
};
flakoboros = {
# # Override all dependencies
# # They are locked in flake.lock to the latest commit available at the time
# # To update to all inputs' latest commit, use
# # nix flake update
# overrideAttrs.your-repository = {
# src = inputs.your-repository;
# };
packages = {
panda-controller-example =
{
stdenv,
lib,
cmake,
mc-rtc,
...
}:
stdenv.mkDerivation {
name = "panda-controller-example";
src = lib.cleanSource ./.;
nativeBuildInputs = [ cmake ];
propagatedBuildInputs = [
mc-rtc
];
cmakeFlags = [ ];
meta = with lib; {
description = "panda-controller-example";
homepage = "https://github.com/arntanguy/panda-controller-example";
license = licenses.bsd2;
platforms = platforms.all;
};
};
};
};
}
];
}
);
}