diff --git a/flake.nix b/flake.nix index 9d1f6fed..94e856f2 100644 --- a/flake.nix +++ b/flake.nix @@ -276,6 +276,22 @@ type = "app"; program = ''${deployScript "switch"}''; }; + + check-nur = { + # `nix run '.#check-nur'` + # validates that my repo can be included in the Nix User Repository + type = "app"; + program = builtins.toString (pkgs.writeShellScript "check-nur" '' + cd ${./.}/integrations/nur + NIX_PATH= NIXPKGS_ALLOW_UNSUPPORTED_SYSTEM=1 nix-env -f . -qa \* --meta --xml \ + --allowed-uris https://static.rust-lang.org \ + --option restrict-eval true \ + --option allow-import-from-derivation true \ + --drv-path --show-trace \ + -I nixpkgs=$(nix-instantiate --find-file nixpkgs) \ + -I ../../ + ''); + }; }; templates = { diff --git a/integrations/nur/default.nix b/integrations/nur/default.nix index 2320af34..a91e3d57 100644 --- a/integrations/nur/default.nix +++ b/integrations/nur/default.nix @@ -22,6 +22,7 @@ # ^ source: # N.B.: nur eval allows only PATH (inherited) and NIXPKGS_ALLOW_UNSUPPORTED_SYSTEM="1" (forced), # hence the erasing of NIX_PATH above (to remove external overlays) +# - or do: `nix run '.#check-nur'` via the toplevel flake.nix in this repo # # if it validates here but not upstream, likely to do with different `nixpkgs` inputs. # - CI logs: