3
0
Fork 0
forked from mirrors/nixpkgs

docs: get version from doc-support build

This commit is contained in:
Graham Christensen 2019-07-04 08:27:16 -04:00
parent cd6bf8aa00
commit d11f5a9d15
No known key found for this signature in database
GPG key ID: ACA1C1D120C83D5C
3 changed files with 6 additions and 5 deletions

View file

@ -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

View file

@ -29,7 +29,7 @@ in pkgs.stdenv.mkDerivation {
];
postPatch = ''
echo ${lib.version} > .version
ln -s ${doc-support} ./doc-support/result
'';
installPhase = ''

View file

@ -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
''