Skip to content

Commit

Permalink
Merge pull request #190 from nickel-lang/tests-on-nix-2.19
Browse files Browse the repository at this point in the history
Fix tests on Nix 2.19+
  • Loading branch information
thufschmitt authored Mar 22, 2024
2 parents 43656e7 + 6f9d1f1 commit f2ca443
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion run-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ pushd_temp () {
}

prepare_shell() {
NIXPKGS_PATH="$(nix flake metadata --json --inputs-from "path:$PROJECT_ROOT" nixpkgs | nix eval --impure --raw --expr '(builtins.fromJSON (builtins.readFile "/dev/stdin")).path')"
# Use a temporary file to pass data to `nix eval` because of https://github.com/NixOS/nix/issues/9330
nix flake metadata --json --inputs-from "path:$PROJECT_ROOT" nixpkgs > "${WORKDIR}/meta.json"
# Note that we cannot pass neither path nor JSON itself using --arg* because of https://github.com/NixOS/nix/issues/2678
NIXPKGS_PATH="$(nix eval --impure --raw --expr '(builtins.fromJSON (builtins.readFile "'"${WORKDIR}/meta.json"'")).path')"
# We test against the local version of `organist` not the one in main (hence the --override-input).
nix flake update \
--override-input organist "path:$PROJECT_ROOT" \
Expand Down

0 comments on commit f2ca443

Please sign in to comment.