mirror of
https://github.com/lopsided98/nix-ros-overlay.git
synced 2025-07-14 06:00:38 +03:00
Merge branch 'master' into develop
This commit is contained in:
commit
cdb7956e95
1 changed files with 34 additions and 0 deletions
34
README.md
34
README.md
|
@ -29,12 +29,46 @@ roslaunch turtlebot3_gazebo turtlebot3_world.launch
|
||||||
roslaunch turtlebot3_teleop turtlebot3_teleop_key.launch
|
roslaunch turtlebot3_teleop turtlebot3_teleop_key.launch
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Flakes
|
||||||
|
|
||||||
With [Flakes enabled][flake], the equivalent of the above is:
|
With [Flakes enabled][flake], the equivalent of the above is:
|
||||||
```
|
```
|
||||||
nix develop github:lopsided98/nix-ros-overlay#example-turtlebot3-gazebo
|
nix develop github:lopsided98/nix-ros-overlay#example-turtlebot3-gazebo
|
||||||
# Then use roslaunch commands as above
|
# Then use roslaunch commands as above
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Using the overlay in your `flake.nix`-based project could look like this:
|
||||||
|
|
||||||
|
```nix
|
||||||
|
{
|
||||||
|
inputs = {
|
||||||
|
nix-ros-overlay.url = "github:lopsided98/nix-ros-overlay";
|
||||||
|
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 = with pkgs.rosPackages.humble; [
|
||||||
|
pkgs.colcon
|
||||||
|
ros-core
|
||||||
|
# ...
|
||||||
|
];
|
||||||
|
};
|
||||||
|
});
|
||||||
|
nixConfig = {
|
||||||
|
extra-substituters = [ "https://ros.cachix.org" ];
|
||||||
|
extra-trusted-public-keys = [ "ros.cachix.org-1:dSyZxI8geDCJrwgvCOHDoAfOm5sV1wCPjBkKL+38Rvo=" ];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
[flake]: https://nixos.wiki/wiki/Flakes#Enable_flakes
|
[flake]: https://nixos.wiki/wiki/Flakes#Enable_flakes
|
||||||
|
|
||||||
## Current status
|
## Current status
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue