Skip to content

Commit

Permalink
nixpkgs: expose .git-revision in the nixexprs like NixOS
Browse files Browse the repository at this point in the history
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.

(cherry picked from commit 5a43eec)
  • Loading branch information
grahamc committed Oct 11, 2017
1 parent 913068d commit 6c6b966
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkgs/top-level/make-tarball.nix
Expand Up @@ -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;
Expand Down

0 comments on commit 6c6b966

Please sign in to comment.