Skip to content

Commit d3a33d8

Browse files
Nix manual: access the doc output directly
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.
1 parent a037d11 commit d3a33d8

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

nix/update-nix-releases.nix

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,8 @@ writeShellApplication {
4747
fullVersion="$(<"$source"/.version)"
4848
4949
# Only try versions recent enough to have the same structure, this filter out versions before 2.4
50-
if ! drvPath=$(nix-instantiate "$source" --argstr system "x86_64-linux" -A default 2> /dev/null); then
51-
echo >&2 "No default.nix supporting -A default"
52-
break
53-
fi
5450
# We need a doc output, this is always the case for >= 2.4
55-
if ! docOutput=$(nix-store --query --binding doc "$drvPath"); then
51+
if ! docOutput=$(nix-instantiate "$source" --argstr system "x86_64-linux" -A default.doc 2> /dev/null); then
5652
echo >&2 "No doc output"
5753
break
5854
fi

0 commit comments

Comments
 (0)