Registry resolution algorithm is order-dependent, and to get the desired behavior with nixpkgs the indirect entry to `github:nixos/nixpkgs` should come after all other exact entries.
11 lines
336 B
Bash
Executable file
11 lines
336 B
Bash
Executable file
#!/usr/bin/env bash
|
|
# Test that the flake-registry.json format is valid
|
|
set -euo pipefail
|
|
|
|
cd "$(dirname "$0")"
|
|
|
|
# Ensure current flake-registry.json file is sorted.
|
|
nix registry list --tarball-ttl 0 --flake-registry "$PWD/flake-registry.json" |
|
|
grep -- '^global '
|
|
|
|
nix run --flake-registry "$PWD/flake-registry.json" nixpkgs#hello
|