check-nur: extract from the flake

This commit is contained in:
Colin 2024-06-12 02:50:51 +00:00
parent 03b2f2a433
commit 4712ba9f2d
2 changed files with 15 additions and 9 deletions

View File

@ -456,16 +456,10 @@
# 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 \
# pass through these attrs
${./.}/scripts/check-nur \
-I nixpkgs=${nixpkgsUnpatched} \
-I nixpkgs-overlays=${./.}/hosts/common/nix/overlay \
-I ../../ \
| tee # tee to prevent interactive mode
-I nixpkgs-overlays=${./.}/hosts/common/nix/overlay
'');
};

12
scripts/check-nur Executable file
View File

@ -0,0 +1,12 @@
#!/bin/sh
cd ../integrations/nur
# TODO: should include `-I nixpkgs=</path/to/an/unpatched/nixpkgs>`
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 ../../ \
"$@" \
| tee # tee to prevent interactive mode