diff options
author | Graham Christensen <graham@grahamc.com> | 2017-10-10 23:06:45 -0400 |
---|---|---|
committer | Graham Christensen <graham@grahamc.com> | 2017-10-11 06:51:36 -0400 |
commit | 5a43eec0704503f4b415814557ad22490a6165c1 (patch) | |
tree | 247ef6f8b0e8abd12c6809c798dd5cef1591a633 /pkgs/top-level/make-tarball.nix | |
parent | 6b3b7085010a4d959b35204919a8d1228f26651f (diff) |
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.
Diffstat (limited to 'pkgs/top-level/make-tarball.nix')
-rw-r--r-- | pkgs/top-level/make-tarball.nix | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/pkgs/top-level/make-tarball.nix b/pkgs/top-level/make-tarball.nix index c7e5f21910bbd..16940761e6dcf 100644 --- a/pkgs/top-level/make-tarball.nix +++ b/pkgs/top-level/make-tarball.nix @@ -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; |