nixpkgs: expose .git-revision in the nixexprs like NixOS

nixos/lib/make-channel.nix:16:

    echo -n ${nixpkgs.rev or nixpkgs.shortRev} > .git-revision

This means the .git-revision exists in nixos channels, but not
Nixpkgs channels. Adding it to the nixpkgs channel makes it a
common API for any Nixpkgs use cases.
This commit is contained in:
Graham Christensen 2017-10-10 23:06:45 -04:00
parent 6b3b708501
commit 5a43eec070
No known key found for this signature in database
GPG Key ID: ACA1C1D120C83D5C

View File

@ -24,7 +24,9 @@ releaseTools.sourceTarball rec {
eval "$preConfigure"
releaseName=nixpkgs-$VERSION$VERSION_SUFFIX
echo -n $VERSION_SUFFIX > .version-suffix
echo -n ${nixpkgs.rev or nixpkgs.shortRev} > .git-revision
echo "release name is $releaseName"
echo "git-revision is $(cat .git-revision)"
'';
dontBuild = false;