mirror of
https://github.com/lopsided98/nix-ros-overlay.git
synced 2025-06-12 02:34:50 +03:00
flake.nix: Add "checks" flake output based on release.nix
To make "nix flake check" and similar tools work, we need to allow setting the system attribute in release.nix explicitly. Without this, flake jobs in Hydra complain about: error: attribute 'currentSystem' missing' in restricted evaluation mode.
This commit is contained in:
parent
894271ba89
commit
ce30af70c7
2 changed files with 5 additions and 2 deletions
|
@ -39,6 +39,9 @@
|
|||
path = ./examples/flake;
|
||||
description = "Basic ROS flake";
|
||||
};
|
||||
checks = {
|
||||
x86_64-linux = import ./release.nix { system = "x86_64-linux"; };
|
||||
};
|
||||
};
|
||||
|
||||
nixConfig = {
|
||||
|
|
|
@ -5,7 +5,7 @@ let
|
|||
sha256 = lock.nodes.nixpkgs.locked.narHash;
|
||||
};
|
||||
in
|
||||
{ nixpkgs ? lockedNixpkgs, nix-ros-overlay ? ./., distro ? null }:
|
||||
{ nixpkgs ? lockedNixpkgs, nix-ros-overlay ? ./., distro ? null, system ? builtins.currentSystem }:
|
||||
let
|
||||
releasePackages = builtins.mapAttrs (_: a: removeAttrs a [
|
||||
"lib"
|
||||
|
@ -16,5 +16,5 @@ let
|
|||
"python2Packages"
|
||||
"python3Packages"
|
||||
"boost"
|
||||
]) (import nix-ros-overlay { inherit nixpkgs; }).rosPackages;
|
||||
]) (import nix-ros-overlay { inherit nixpkgs system; }).rosPackages;
|
||||
in if distro == null then releasePackages else releasePackages.${distro}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue