summaryrefslogtreecommitdiffstats
path: root/doc/default.nix
diff options
context:
space:
mode:
authorGraham Christensen <graham@grahamc.com>2018-10-05 10:46:58 -0400
committerGraham Christensen <graham@grahamc.com>2018-10-05 11:20:46 -0400
commit5daee73ce41652d21743a7304b4fd3f9da926c35 (patch)
tree7a799a32287d88d9435855bcdd64437b14efa33a /doc/default.nix
parent4312cfdbda1855088905a3d9959a4fac362fd051 (diff)
Generate links to function definitions
Hydra passes the full revision in to the input, which we pass through. If we don't get this ,we try to get it from other sources, or default to master which should have the definition in a close-ish location. All published docs should have theURL resolve properly, only local hackers will have the link break.
Diffstat (limited to 'doc/default.nix')
-rw-r--r--doc/default.nix5
1 files changed, 4 insertions, 1 deletions
diff --git a/doc/default.nix b/doc/default.nix
index 4c04128052bc..98b4b92be524 100644
--- a/doc/default.nix
+++ b/doc/default.nix
@@ -1,6 +1,7 @@
+{ pkgs ? (import ./.. { }), nixpkgs ? { }}:
let
- pkgs = import ./.. { };
lib = pkgs.lib;
+ locationsXml = import ./lib-function-locations.nix { inherit pkgs nixpkgs; };
in
pkgs.stdenv.mkDerivation {
name = "nixpkgs-manual";
@@ -29,6 +30,8 @@ pkgs.stdenv.mkDerivation {
];
postPatch = ''
+ rm -rf ./functions/library/locations.xml
+ ln -s ${locationsXml} ./functions/library/locations.xml
echo ${lib.version} > .version
'';