forked from loco-3d/linear-feedback-controller
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
63 lines (61 loc) · 2.07 KB
/
flake.nix
File metadata and controls
63 lines (61 loc) · 2.07 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
{
description = "RosControl linear feedback controller with pal base estimator and RosTopics external interface.";
inputs = {
gepetto.url = "github:gepetto/nix";
flake-parts.follows = "gepetto/flake-parts";
nixpkgs.follows = "gepetto/nixpkgs";
nix-ros-overlay.follows = "gepetto/nix-ros-overlay";
systems.follows = "gepetto/systems";
treefmt-nix.follows = "gepetto/treefmt-nix";
};
outputs =
inputs:
inputs.flake-parts.lib.mkFlake { inherit inputs; } (
{ lib, self, ... }:
{
systems = import inputs.systems;
imports = [
inputs.gepetto.flakeModule
{ gepetto-pkgs.overlays = [ self.overlays.default ]; }
];
flake.overlays.default =
_final: prev:
let
override = _ros-final: ros-prev: {
linear-feedback-controller = ros-prev.linear-feedback-controller.overrideAttrs {
src = lib.fileset.toSource {
root = ./.;
fileset = lib.fileset.unions [
./cmake
./CMakeLists.txt
./config
./controller_plugins.xml
./include
./launch
./LICENSE
./package.xml
./src
./tests
];
};
};
};
in
{
rosPackages = prev.rosPackages // {
humble = prev.rosPackages.humble.overrideScope override;
jazzy = prev.rosPackages.jazzy.overrideScope override;
};
};
perSystem =
{ pkgs, ... }:
{
packages = lib.filterAttrs (_n: v: v.meta.available && !v.meta.broken) (rec {
default = humble-linear-feedback-controller;
humble-linear-feedback-controller = pkgs.rosPackages.humble.linear-feedback-controller;
jazzy-linear-feedback-controller = pkgs.rosPackages.jazzy.linear-feedback-controller;
});
};
}
);
}