Skip to content

Commit

Permalink
Merge pull request #351 from flokli/regenerate-cargo-nix-needs-flakes
Browse files Browse the repository at this point in the history
regenerate_cargo_nix.sh: set --extra-experimental-features flakes
  • Loading branch information
Kranzes authored Jun 16, 2024
2 parents cf03486 + c48d659 commit 75fb3bd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions regenerate_cargo_nix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -Eeuo pipefail
top="$(readlink -f "$(dirname "$0")")"

if [ -z "${IN_CRATE2NIX_SHELL:-}" ]; then
exec nix-shell --pure "$top/shell.nix" --run "$(printf "%q " $0 "$@")"
exec nix-shell --extra-experimental-features flakes --pure "$top/shell.nix" --run "$(printf "%q " $0 "$@")"
fi

options=$(getopt -o '' --long offline,no-cargo-build -- "$@")
Expand Down Expand Up @@ -53,13 +53,13 @@ else
echo "Skipping because of --no-cargo-build"
fi

noisily nix-build --arg release false $NIX_OPTIONS
crate2nix=$(nix-build --arg release false $NIX_OPTIONS)/bin/crate2nix
noisily nix-build --extra-experimental-features flakes --arg release false $NIX_OPTIONS
crate2nix=$(nix-build --extra-experimental-features flakes --arg release false $NIX_OPTIONS)/bin/crate2nix
noisily "$crate2nix" generate -n ../nix/nixpkgs.nix \
-f ./crate2nix/Cargo.toml -o ./crate2nix/Cargo.nix || \
{ echo "Regeneration of ./Cargo.nix failed." >&2 ; exit 1; }

nix-instantiate tests.nix --eval --strict --json -A buildTestConfigs | \
nix-instantiate --extra-experimental-features flakes tests.nix --eval --strict --json -A buildTestConfigs | \
jq -r .[].pregeneratedBuild | \
while read cargo_nix; do
if [ "$cargo_nix" = "null" ]; then
Expand Down

0 comments on commit 75fb3bd

Please sign in to comment.