Skip to content

Commit

Permalink
Fix nix-instantiation failing when evaluating package.meta
Browse files Browse the repository at this point in the history
  • Loading branch information
diamondburned committed Nov 15, 2023
1 parent f09fafa commit 210df9d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions scripts/pkg
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,19 @@ pkg::update() {
exit 1
fi

echo "Updating package source for $package" >&2
niv update "$package" "${nivFlags[@]}" >&2

# Force .meta to build before we call nix-instantiate on it.
# This seems to be necessary, otherwise nix-instantiate will error out.
echo "Evaluating package meta for $package" >&2
nix-build ./packages/ -A "$package".meta >&2

noNixUpdate=$(
nix-instantiate --eval ./packages/ -A "$package".meta.noNixUpdate || true)
if [[ $noNixUpdate != true ]]; then (
echo "Updating miscelaneous package derivations for $package" >&2

src=$(pkg::src "$package")
src=$(realpath --relative-to=packages "$src")
echo "Source: $src"
Expand Down

0 comments on commit 210df9d

Please sign in to comment.