Flake for ROS xacro

This commit is contained in:
Igor Brylyov 2023-01-10 15:42:12 +03:00
parent bb86289815
commit 1415d16a12
2 changed files with 97 additions and 15 deletions

69
flake.lock generated
View file

@ -1,5 +1,35 @@
{ {
"nodes": { "nodes": {
"flake-utils": {
"locked": {
"lastModified": 1667395993,
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_2": {
"locked": {
"lastModified": 1667395993,
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1670498129, "lastModified": 1670498129,
@ -16,9 +46,46 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_2": {
"locked": {
"lastModified": 1668192777,
"narHash": "sha256-C/koqhRmkV2hRCENfDUAK6HP7HTDwLAmhyP5QOy1jtI=",
"owner": "lopsided98",
"repo": "nixpkgs",
"rev": "cb892295b6674f6d942ce78df3a27f2f219972e0",
"type": "github"
},
"original": {
"owner": "lopsided98",
"ref": "nix-ros",
"repo": "nixpkgs",
"type": "github"
}
},
"root": { "root": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs" "flake-utils": "flake-utils",
"nixpkgs": "nixpkgs",
"ros-flake": "ros-flake"
}
},
"ros-flake": {
"inputs": {
"flake-utils": "flake-utils_2",
"nixpkgs": "nixpkgs_2"
},
"locked": {
"lastModified": 1670693373,
"narHash": "sha256-bN57G4pVApAVIZqCtflto8v7vArnMwLEAger2N8FCG0=",
"owner": "lopsided98",
"repo": "nix-ros-overlay",
"rev": "795e67fe0e19118cef94209e4470edc64f13df93",
"type": "github"
},
"original": {
"owner": "lopsided98",
"repo": "nix-ros-overlay",
"type": "github"
} }
} }
}, },

View file

@ -1,19 +1,34 @@
{ {
description = " Computer Graphics Overlay"; description = "Nix Robossembler Overlay";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; inputs = {
outputs = { self, nixpkgs }: let nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils";
ros-flake.url = "github:lopsided98/nix-ros-overlay";
};
outputs = { self, nixpkgs, ros-flake, flake-utils }: let
systems = [ systems = [
"x86_64-linux" "x86_64-linux"
"i686-linux"
"x86_64-darwin"
"aarch64-linux"
"armv6l-linux"
"armv7l-linux"
]; ];
forAllSystems = f: nixpkgs.lib.genAttrs systems (system: f system); forAllSystems = f: nixpkgs.lib.genAttrs systems (system: f system);
in { nixpkgsFor = forAllSystems (system:
packages = forAllSystems (system: import ./default.nix { import nixpkgs {
pkgs = import nixpkgs { inherit system; }; inherit system;
}); overlays = [ self.overlay ];
}; });
} in
flake-utils.lib.eachDefaultSystem
(system:
let pkgs = nixpkgs.legacyPackages.${system}; in
{
devShells.default =
let
pkgs = import nixpkgs { inherit system; };
ros = ros-flake.legacyPackages.${system}.rolling;
in pkgs.mkShell {
buildInputs = with ros; [ ros2run rmw-fastrtps-dynamic-cpp xacro ];
RMW_IMPLEMENTATION = "rmw_fastrtps_dynamic_cpp";
};
}
);
}