diff options
author | Vladimír Čunát <vcunat@gmail.com> | 2016-02-03 10:07:27 +0100 |
---|---|---|
committer | Vladimír Čunát <vcunat@gmail.com> | 2016-02-03 10:07:27 +0100 |
commit | b2a37ceeea8c38ec71447f8dae1e6890a8cf982d (patch) | |
tree | f2909e978dcfdd88e7aff68899719d8b8891f6dc /nixos/release.nix | |
parent | 7fa9a1abce623aaf18b22f5dca3fc8a44a494e8d (diff) | |
parent | 3bcf8ae8795ede9909df07fb97e049442b38c231 (diff) |
Merge #12357: nixos docs: show references to packages
Diffstat (limited to 'nixos/release.nix')
-rw-r--r-- | nixos/release.nix | 28 |
1 files changed, 23 insertions, 5 deletions
diff --git a/nixos/release.nix b/nixos/release.nix index d9f3e46b27c0..71317c32b98d 100644 --- a/nixos/release.nix +++ b/nixos/release.nix @@ -92,15 +92,33 @@ let }).config)); + cleanConfig = import ./lib/eval-config.nix { + system = "x86_64-linux"; + modules = [ ]; + pkgs = with pkgs.lib; + let + scrubDerivations = namePrefix: pkgSet: mapAttrs + (name: value: + let wholeName = "${namePrefix}.${name}"; in + if isAttrs value then + scrubDerivations wholeName value + // (optionalAttrs (isDerivation value) { outPath = "\${${wholeName}}"; }) + else value + ) + pkgSet; + in scrubDerivations "pkgs" pkgs; + }; + docs = (import ./doc/manual) { + inherit pkgs version; + revision = versionModule.system.nixosRevision; + inherit (cleanConfig) options; + }; + in rec { channel = import lib/make-channel.nix { inherit pkgs nixpkgs version versionSuffix; }; - manual = buildFromConfig ({ pkgs, ... }: { }) (config: config.system.build.manual.manual); - manualPDF = (buildFromConfig ({ pkgs, ... }: { }) (config: config.system.build.manual.manualPDF)).x86_64-linux; - manpages = buildFromConfig ({ pkgs, ... }: { }) (config: config.system.build.manual.manpages); - options = (buildFromConfig ({ pkgs, ... }: { }) (config: config.system.build.manual.optionsJSON)).x86_64-linux; - + inherit (docs) manual manualPDF manpages optionsJSON; # Build the initial ramdisk so Hydra can keep track of its size over time. initialRamdisk = buildFromConfig ({ pkgs, ... }: { }) (config: config.system.build.initialRamdisk); |