nix-ros-overlay/flake.nix
Michal Sojka a9202c4284 flake.nix: Remove checks for now
The checks output is useful for flake-based CI tools such as hydra,
hercules-ci, buildbot-nix and others. However, having it in the flake
in the current state brings several problems:

1. checks should be a flat attrset, while our release.nix provides a
   recursive attrset. Recursive attrset is fine for Hydra, but plain
   `nix flake check` complains. We can flatten the attrset, but this
   is not sufficient because of 2. Alternatively, if we want just
   hydra compatibility we can rename checks to hydraJobs, but problem
   2 will still persist.

2. We have several packages, which fail to evaluate. Either because of
   missing callPackages arguments or because of them being insecure.
   This breaks even basic things like `nix flake show`.
2024-11-20 20:13:44 -05:00

49 lines
1.6 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; };
# Development environment for the custom GitHub action
nix-ros-build-action = pkgs.callPackage ./.github/actions/nix-ros-build-action/shell.nix { };
};
}) // {
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=" ];
};
}