diff options
author | K900 <me@0upti.me> | 2022-12-26 21:05:35 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-26 21:05:35 +0300 |
commit | 2d3cf010fe48694a53897ad248ecb95dc458d9f9 (patch) | |
tree | 20f8ff6bdf03c5e1d45cf99a27e1fe75f3fcc8b9 /nixos/lib | |
parent | d72cf7be4825be52c905c816f8d49e1a25bfddc7 (diff) |
Revert "treewide: use nativeBuildInputs with runCommand instead of inlining"
Diffstat (limited to 'nixos/lib')
-rw-r--r-- | nixos/lib/make-options-doc/default.nix | 28 |
1 files changed, 10 insertions, 18 deletions
diff --git a/nixos/lib/make-options-doc/default.nix b/nixos/lib/make-options-doc/default.nix index a5e91a31b8bf..a3436caad8f9 100644 --- a/nixos/lib/make-options-doc/default.nix +++ b/nixos/lib/make-options-doc/default.nix @@ -93,19 +93,15 @@ let in rec { inherit optionsNix; - optionsAsciiDoc = pkgs.runCommand "options.adoc" { - nativeBuildInputs = [ pkgs.python3Minimal ]; - } '' - python ${./generateDoc.py} \ + optionsAsciiDoc = pkgs.runCommand "options.adoc" {} '' + ${pkgs.python3Minimal}/bin/python ${./generateDoc.py} \ --format asciidoc \ ${optionsJSON}/share/doc/nixos/options.json \ > $out ''; - optionsCommonMark = pkgs.runCommand "options.md" { - nativeBuildInputs = [ pkgs.python3Minimal ]; - } '' - python ${./generateDoc.py} \ + optionsCommonMark = pkgs.runCommand "options.md" {} '' + ${pkgs.python3Minimal}/bin/python ${./generateDoc.py} \ --format commonmark \ ${optionsJSON}/share/doc/nixos/options.json \ > $out @@ -157,20 +153,16 @@ in rec { # Convert options.json into an XML file. # The actual generation of the xml file is done in nix purely for the convenience # of not having to generate the xml some other way - optionsXML = pkgs.runCommand "options.xml" { - nativeBuildInputs = with pkgs; [ nix ]; - } '' + optionsXML = pkgs.runCommand "options.xml" {} '' export NIX_STORE_DIR=$TMPDIR/store export NIX_STATE_DIR=$TMPDIR/state - nix-instantiate \ + ${pkgs.nix}/bin/nix-instantiate \ --eval --xml --strict ${./optionsJSONtoXML.nix} \ --argstr file ${optionsJSON}/share/doc/nixos/options.json \ > "$out" ''; - optionsDocBook = pkgs.runCommand "options-docbook.xml" { - nativeBuildInputs = with pkgs; [ libxslt.bin libxslt.bin python3Minimal ]; - } '' + optionsDocBook = pkgs.runCommand "options-docbook.xml" {} '' optionsXML=${optionsXML} if grep /nixpkgs/nixos/modules $optionsXML; then echo "The manual appears to depend on the location of Nixpkgs, which is bad" @@ -180,14 +172,14 @@ in rec { exit 1 fi - python ${./sortXML.py} $optionsXML sorted.xml - xsltproc \ + ${pkgs.python3Minimal}/bin/python ${./sortXML.py} $optionsXML sorted.xml + ${pkgs.libxslt.bin}/bin/xsltproc \ --stringparam documentType '${documentType}' \ --stringparam revision '${revision}' \ --stringparam variablelistId '${variablelistId}' \ --stringparam optionIdPrefix '${optionIdPrefix}' \ -o intermediate.xml ${./options-to-docbook.xsl} sorted.xml - xsltproc \ + ${pkgs.libxslt.bin}/bin/xsltproc \ -o "$out" ${./postprocess-option-descriptions.xsl} intermediate.xml ''; } |