diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2016-09-27 15:26:37 +0200 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2016-09-29 13:05:28 +0200 |
commit | 75a1ec8a655e7e00a6bb6fc944663c21624fff60 (patch) | |
tree | fcbfd398fd7e7b41f88bd3104040c12101bb8343 /nixos/doc | |
parent | 750195db7f369a6e73d400c0271ef2fa1e0479f0 (diff) |
NixOS: Use runCommand instead of mkDerivation in a few places
Diffstat (limited to 'nixos/doc')
-rw-r--r-- | nixos/doc/manual/default.nix | 77 |
1 files changed, 28 insertions, 49 deletions
diff --git a/nixos/doc/manual/default.nix b/nixos/doc/manual/default.nix index 13668dfd8ebc..40d49f1541b3 100644 --- a/nixos/doc/manual/default.nix +++ b/nixos/doc/manual/default.nix @@ -94,14 +94,11 @@ let "--stringparam chunk.toc ${toc}" ]; - olinkDB = stdenv.mkDerivation { - name = "manual-olinkdb"; - - inherit sources; - - buildInputs = [ libxml2 libxslt ]; - - buildCommand = '' + olinkDB = runCommand "manual-olinkdb" + { inherit sources; + buildInputs = [ libxml2 libxslt ]; + } + '' ${copySources} xsltproc \ @@ -133,15 +130,14 @@ let </targetset> EOF ''; - }; in rec { # The NixOS options in JSON format. - optionsJSON = stdenv.mkDerivation { - name = "options-json"; - - buildCommand = '' + optionsJSON = runCommand "options-json" + { meta.description = "List of NixOS options in JSON format"; + } + '' # Export list of options in different format. dst=$out/share/doc/nixos mkdir -p $dst @@ -154,18 +150,14 @@ in rec { echo "file json $dst/options.json" >> $out/nix-support/hydra-build-products ''; # */ - meta.description = "List of NixOS options in JSON format"; - }; - # Generate the NixOS manual. - manual = stdenv.mkDerivation { - name = "nixos-manual"; - - inherit sources; - - buildInputs = [ libxml2 libxslt ]; - - buildCommand = '' + manual = runCommand "nixos-manual" + { inherit sources; + buildInputs = [ libxml2 libxslt ]; + meta.description = "The NixOS manual in HTML format"; + allowedReferences = ["out"]; + } + '' ${copySources} # Check the validity of the manual sources. @@ -192,20 +184,12 @@ in rec { echo "doc manual $dst" >> $out/nix-support/hydra-build-products ''; # */ - meta.description = "The NixOS manual in HTML format"; - - allowedReferences = ["out"]; - }; - - manualEpub = stdenv.mkDerivation { - name = "nixos-manual-epub"; - - inherit sources; - - buildInputs = [ libxml2 libxslt zip ]; - - buildCommand = '' + manualEpub = runCommand "nixos-manual-epub" + { inherit sources; + buildInputs = [ libxml2 libxslt zip ]; + } + '' ${copySources} # Check the validity of the manual sources. @@ -234,17 +218,15 @@ in rec { mkdir -p $out/nix-support echo "doc-epub manual $manual" >> $out/nix-support/hydra-build-products ''; - }; - # Generate the NixOS manpages. - manpages = stdenv.mkDerivation { - name = "nixos-manpages"; - inherit sources; - - buildInputs = [ libxml2 libxslt ]; - - buildCommand = '' + # Generate the NixOS manpages. + manpages = runCommand "nixos-manpages" + { inherit sources; + buildInputs = [ libxml2 libxslt ]; + allowedReferences = ["out"]; + } + '' ${copySources} # Check the validity of the man pages sources. @@ -264,7 +246,4 @@ in rec { ./man-pages.xml ''; - allowedReferences = ["out"]; - }; - } |