New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fetchGit only works on non-annotated tags #2385

Open
graham-at-target opened this Issue Aug 31, 2018 · 0 comments

Comments

Projects
None yet
1 participant
@graham-at-target
Contributor

graham-at-target commented Aug 31, 2018

The following works:

(import <nixpkgs> {}).stdenv.mkDerivation {
  name = "hi";
  src = builtins.fetchGit {
    url = "https://github.com/nixos/nix.git";
    ref = "tags/1.9";
  };
}

But this doesn't:

(import <nixpkgs> {}).stdenv.mkDerivation {
  name = "hi";
  src = builtins.fetchGit {
    url = "https://github.com/nixos/nix.git";
    ref = "tags/2.0";
  };
}

1.9 isn't an annotated tag:

[nix-shell:~/projects/nix]$ git show 1.9
commit 39b3d9698e8c0972d7d54c4007c4a2e6e680b3d3 (tag: 1.9)
Author: Eelco Dolstra <eelco.dolstra@logicblox.com>
Date:   Fri Jun 12 11:02:40 2015 +0200

    Typos

but 2.0 is:

$ git show 2.0
tag 2.0
Tagger: Eelco Dolstra <edolstra@gmail.com>
Date:   Thu Feb 22 16:40:21 2018 +0100

Tagging release 2.0
-----BEGIN PGP SIGNATURE-----

iQFHBAABCAAxFiEEtUHVUwEnDgvPFcpdgXC0cm1xmN4FAlqO5GUTHGVkb2xzdHJh
QGdtYWlsLmNvbQAKCRCBcLRybXGY3kFnB/9+SXZx0DWt1iDXtp2sVH08OC5097fg
zOE1MJXIMpn1EVPmFjrTUiTThlO0GVZTXK1abxTq2MLZ2e5CpXZHzMqmIiR4axWa
jwYwG3/beIFF1RBwBma3Yc7M7vN95Eyp1YderMFZSY9qk9/0OGyXc9LZHvyaQYUX
NbNkuoHHr3qM2jYrebehDxIUNN0VfA43s4Jrci5MR8OXM8/xFk82BzVyeTmocwut
b46NBLobRXwlRktTZNXrx2wJeY7JluASHpcTAdmBlntpKTUpvkGN/9hOQ1lZUMjj
+jUB9PIOHUx0gE1QhiUplpmYCPF4B0Fx43Ek0Le3C1pDUC37+BsUX1mt
=AbBN
-----END PGP SIGNATURE-----

commit 179b896acb6deb8fea9614dfbddeaf3b23797bf5 (tag: 2.0)
Merge: e8d53bfd ddbcd01c
Author: Eelco Dolstra <edolstra@gmail.com>
Date:   Thu Feb 22 14:20:43 2018 +0100
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment