Ensure that the manual job gets build with the right revision info
This commit is contained in:
parent
d5af9bc583
commit
20150b1cee
3 changed files with 20 additions and 5 deletions
|
@ -18,6 +18,12 @@ with pkgs.lib;
|
|||
description = "NixOS version suffix.";
|
||||
};
|
||||
|
||||
system.nixosRevision = mkOption {
|
||||
internal = true;
|
||||
type = types.uniq types.string;
|
||||
description = "NixOS Git revision hash.";
|
||||
};
|
||||
|
||||
system.nixosCodeName = mkOption {
|
||||
internal = true;
|
||||
type = types.uniq types.string;
|
||||
|
@ -42,6 +48,10 @@ with pkgs.lib;
|
|||
let suffixFile = "${toString pkgs.path}/.version-suffix"; in
|
||||
mkDefault (if pathExists suffixFile then readFile suffixFile else "pre-git");
|
||||
|
||||
system.nixosRevision =
|
||||
let fn = "${toString pkgs.path}/.git-revision"; in
|
||||
mkDefault (if pathExists fn then readFile fn else "master");
|
||||
|
||||
# Note: code names must only increase in alphabetical order.
|
||||
system.nixosCodeName = "Aardvark";
|
||||
|
||||
|
|
|
@ -11,12 +11,15 @@ let
|
|||
|
||||
cfg = config.services.nixosManual;
|
||||
|
||||
versionModule =
|
||||
{ system.nixosVersionSuffix = config.system.nixosVersionSuffix;
|
||||
system.nixosRevision = config.system.nixosRevision;
|
||||
};
|
||||
|
||||
manual = import ../../../doc/manual {
|
||||
inherit pkgs;
|
||||
revision =
|
||||
let fn = "${toString pkgs.path}/.git-revision";
|
||||
in if pathExists fn then readFile fn else "master";
|
||||
options = (fixMergeModules baseModules
|
||||
revision = config.system.nixosRevision;
|
||||
options = (fixMergeModules ([ versionModule ] ++ baseModules)
|
||||
(removeAttrs extraArgs ["config" "options"]) // {
|
||||
modules = [ ];
|
||||
}).options;
|
||||
|
|
|
@ -16,7 +16,9 @@ let
|
|||
|
||||
|
||||
versionModule =
|
||||
{ system.nixosVersionSuffix = versionSuffix; };
|
||||
{ system.nixosVersionSuffix = versionSuffix;
|
||||
system.nixosRevision = nixpkgs.rev or nixpkgs.shortRev;
|
||||
};
|
||||
|
||||
|
||||
makeIso =
|
||||
|
|
Loading…
Reference in a new issue