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

View file

@ -1,19 +1,34 @@
{
description = " Computer Graphics Overlay";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
outputs = { self, nixpkgs }: let
description = "Nix Robossembler Overlay";
inputs = {
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 = [
"x86_64-linux"
"i686-linux"
"x86_64-darwin"
"aarch64-linux"
"armv6l-linux"
"armv7l-linux"
];
forAllSystems = f: nixpkgs.lib.genAttrs systems (system: f system);
in {
packages = forAllSystems (system: import ./default.nix {
pkgs = import nixpkgs { inherit system; };
});
};
}
nixpkgsFor = forAllSystems (system:
import nixpkgs {
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";
};
}
);
}