mirror of
https://github.com/lopsided98/nix-ros-overlay.git
synced 2025-06-10 17:54:49 +03:00

With this change, one can initialize a ROS project by running: nix flake init --template github:lopsided98/nix-ros-overlay Besides adding the template, this commit also updates the README to list the same template as the one from the flake. The listing in the README can be easily updated to match the flake.nix file by running the "mdsh" tool.
46 lines
1.5 KiB
Nix
46 lines
1.5 KiB
Nix
{
|
|
description = "ROS overlay for the Nix package manager";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:lopsided98/nixpkgs/nix-ros";
|
|
flake-utils.url = "github:numtide/flake-utils";
|
|
};
|
|
|
|
outputs = { self, nixpkgs, flake-utils }:
|
|
with nixpkgs.lib;
|
|
with flake-utils.lib;
|
|
eachSystem systems.flakeExposed (system: let
|
|
pkgs = import nixpkgs {
|
|
inherit system;
|
|
overlays = [ self.overlays.default ];
|
|
};
|
|
in {
|
|
legacyPackages = pkgs.rosPackages;
|
|
|
|
devShells = {
|
|
example-turtlebot3-gazebo = import ./examples/turtlebot3-gazebo.nix { inherit pkgs; };
|
|
example-ros2-basic = import ./examples/ros2-basic.nix { inherit pkgs; };
|
|
example-ros2-gz = import ./examples/ros2-gz.nix { inherit pkgs; };
|
|
};
|
|
}) // {
|
|
overlays.default = import ./overlay.nix;
|
|
nixosModules.default = ./modules;
|
|
|
|
overlay = nixpkgs.lib.warn
|
|
"'nix-ros-overlay.overlay' is deprecated, use 'nix-ros-overlay.overlays.default' instead"
|
|
self.overlays.default;
|
|
nixosModule = nixpkgs.lib.warn
|
|
"'nix-ros-overlay.nixosModule' is deprecated, use 'nix-ros-overlay.nixosModules.default' instead"
|
|
self.nixosModules.default;
|
|
templates.default = {
|
|
path = ./examples/flake;
|
|
description = "Basic ROS flake";
|
|
};
|
|
};
|
|
|
|
nixConfig = {
|
|
extra-substituters = [ "https://ros.cachix.org" ];
|
|
extra-trusted-public-keys = [ "ros.cachix.org-1:dSyZxI8geDCJrwgvCOHDoAfOm5sV1wCPjBkKL+38Rvo=" ];
|
|
};
|
|
|
|
}
|