Skip to content

Commit

Permalink
Nix manual: access the doc output directly
Browse files Browse the repository at this point in the history
we relied on an implementation detail of the Nix derivation (the `doc`
input attribute being passed to `builtins.derivation`, which is bound to
an environment variable in the derivation build process), and the
refactoring that happened betwen 2.25 and 2.26 made that fall apart.
  • Loading branch information
fricklerhandwerk committed Feb 26, 2025
1 parent a037d11 commit d3a33d8
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions nix/update-nix-releases.nix
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,8 @@ writeShellApplication {
fullVersion="$(<"$source"/.version)"
# Only try versions recent enough to have the same structure, this filter out versions before 2.4
if ! drvPath=$(nix-instantiate "$source" --argstr system "x86_64-linux" -A default 2> /dev/null); then
echo >&2 "No default.nix supporting -A default"
break
fi
# We need a doc output, this is always the case for >= 2.4
if ! docOutput=$(nix-store --query --binding doc "$drvPath"); then
if ! docOutput=$(nix-instantiate "$source" --argstr system "x86_64-linux" -A default.doc 2> /dev/null); then
echo >&2 "No doc output"
break
fi
Expand Down

0 comments on commit d3a33d8

Please sign in to comment.