0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-13 13:40:28 +03:00

Manual: When building from the channel, link to the exact Git revision

This commit is contained in:
Eelco Dolstra 2013-10-24 02:02:04 +02:00
parent c4149c7b56
commit d49f141a79
6 changed files with 11 additions and 17 deletions

View file

@ -12,8 +12,10 @@ let
cfg = config.services.nixosManual;
manual = import ../../../doc/manual {
inherit (cfg) revision;
inherit pkgs;
revision =
let fn = "${toString pkgs.path}/.git-revision";
in if pathExists fn then readFile fn else "master";
options = (fixMergeModules baseModules
(removeAttrs extraArgs ["config" "options"]) // {
modules = [ ];
@ -75,16 +77,6 @@ in
'';
};
services.nixosManual.revision = mkOption {
default = "local";
type = types.uniq types.string;
description = ''
Revision of the targeted source file. This value can either be
<literal>"local"</literal>, <literal>"HEAD"</literal> or any
revision number embedded in a string.
'';
};
};