flake: upport channel-less in NUR check
Interestingly doesn't actually fail like `nix flake check` does.
This commit is contained in:
parent
3d79b690e4
commit
a2fbb58011
@ -37,11 +37,16 @@
|
||||
# Normally we'd also run with `--option restrict-eval true`, but
|
||||
# this is incompatible with flakes because reasons.
|
||||
nur = pkgs.writeShellScriptBin "nur-check" ''
|
||||
# Prefer nixpkgs channel (actual build), otherwise read from flake.lock (CI)
|
||||
if ! nixpkgs=$(nix-instantiate --find-file nixpkgs 2>/dev/null); then
|
||||
_rev=$(${pkgs.jq}/bin/jq -r .nodes.nixpkgs.locked.rev flake.lock)
|
||||
nixpkgs="https://github.com/nixos/nixpkgs/archive/''${_rev}.tar.gz"
|
||||
fi
|
||||
nix-env -f . -qa \* --meta \
|
||||
--allowed-uris https://static.rust-lang.org \
|
||||
--option allow-import-from-derivation true \
|
||||
--drv-path --show-trace \
|
||||
-I nixpkgs=$(nix-instantiate --find-file nixpkgs) \
|
||||
-I nixpkgs="$nixpkgs" \
|
||||
-I ./ \
|
||||
--json | ${pkgs.jq}/bin/jq -r 'values | .[].name'
|
||||
'';
|
||||
|
Loading…
Reference in New Issue
Block a user