docs: get version from doc-support build
This commit is contained in:
parent
cd6bf8aa00
commit
d11f5a9d15
3 changed files with 6 additions and 5 deletions
|
@ -74,11 +74,10 @@ highlightjs:
|
|||
manual-full.xml: ${MD_TARGETS} .version functions/library/locations.xml functions/library/generated *.xml **/*.xml **/**/*.xml
|
||||
xmllint --nonet --xinclude --noxincludenode manual.xml --output manual-full.xml
|
||||
|
||||
.version:
|
||||
nix-instantiate --eval \
|
||||
-E '(import ../lib).version' > .version
|
||||
.version: doc-support/result
|
||||
ln -rfs ./doc-support/result/version .version
|
||||
|
||||
doc-support/result:
|
||||
doc-support/result: doc-support/default.nix
|
||||
(cd doc-support; nix-build)
|
||||
|
||||
functions/library/locations.xml: doc-support/result
|
||||
|
|
|
@ -29,7 +29,7 @@ in pkgs.stdenv.mkDerivation {
|
|||
];
|
||||
|
||||
postPatch = ''
|
||||
echo ${lib.version} > .version
|
||||
ln -s ${doc-support} ./doc-support/result
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
let
|
||||
locationsXml = import ./lib-function-locations.nix { inherit pkgs nixpkgs; };
|
||||
functionDocs = import ./lib-function-docs.nix { inherit locationsXml pkgs; };
|
||||
version = pkgs.lib.version;
|
||||
in pkgs.runCommand "doc-support" {}
|
||||
''
|
||||
mkdir result
|
||||
|
@ -9,6 +10,7 @@ in pkgs.runCommand "doc-support" {}
|
|||
cd result
|
||||
ln -s ${locationsXml} ./function-locations.xml
|
||||
ln -s ${functionDocs} ./function-docs
|
||||
echo -n "${version}" > ./version
|
||||
)
|
||||
mv result $out
|
||||
''
|
||||
|
|
Loading…
Reference in a new issue