Add ROS workspace that will be used by our planned test suite

This commit is contained in:
Michal Sojka 2024-12-22 18:34:10 +01:00
parent a850550783
commit b2de70cc66
9 changed files with 250 additions and 0 deletions

33
test/ws/flake.nix Normal file
View file

@ -0,0 +1,33 @@
{
inputs = {
nix-ros-overlay.url = "github:lopsided98/nix-ros-overlay/master";
nixpkgs.follows = "nix-ros-overlay/nixpkgs"; # IMPORTANT!!!
};
outputs = { self, nix-ros-overlay, nixpkgs }:
nix-ros-overlay.inputs.flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
inherit system;
overlays = [ nix-ros-overlay.overlays.default ];
};
in {
devShells.default = pkgs.mkShell {
name = "Example project";
packages = [
pkgs.colcon
# ... other non-ROS packages
(with pkgs.rosPackages.humble; buildEnv {
paths = [
ros-core
ament-cmake-core
# ... other ROS packages
];
})
];
};
});
nixConfig = {
extra-substituters = [ "https://ros.cachix.org" ];
extra-trusted-public-keys = [ "ros.cachix.org-1:dSyZxI8geDCJrwgvCOHDoAfOm5sV1wCPjBkKL+38Rvo=" ];
};
}