Describe the bug
fetchFromGitLab {
domain = "salsa.debian.org";
owner = "games-team";
repo = "xteddy";
rev = "debian/${version}";
sha256 = "0rm7w78d6qajq4fvi4agyqm0c70f3c1i0cy2jdb6kqql2k8w78qy";
}
fails with do not know how to unpack source archive /build/2.2-5.
Manually unpacking with tar works just fine.
Any suggestions on how to fix this?
Metadata
Please run nix run nixpkgs.nix-info -c nix-info -m and paste the result.
"x86_64-linux"Linux 5.2.4, NixOS, 19.09pre186857.239fffc90d7 (Loris)yesyesnix-env (Nix) 2.2.2"nixos-19.09pre186857.239fffc90d7"""/nix/var/nix/profiles/per-user/root/channels/nixosi notice that sometimes the unpack fails if more than one output is produced. You may need to override the unpack phase.
unpackPhase = ''
tar xf $src
'';
That doesn't seem to fix this case. If I understand the code for fetchFromGitLab and fetchzip correctly, these bypass the unpack phase.
interesting, I haven't used fetchFromGitLab yet, sorry :(
This is an issue with the archiving api of GitLab. See: https://github.com/NixOS/nixpkgs/issues/48215 https://gitlab.com/gitlab-org/gitlab-ce/issues/38537. As a workaround can you try the following?
--- /tmp/orig.nix 2019-08-02 15:02:03.000000000 -0500
+++ /tmp/new.nix 2019-08-02 15:02:44.000000000 -0500
@@ -2,6 +2,6 @@
domain = "salsa.debian.org";
owner = "games-team";
repo = "xteddy";
- rev = "debian/${version}";
+ rev = "debian%2F${version}"; # %2F = urlquote("/")
sha256 = "0rm7w78d6qajq4fvi4agyqm0c70f3c1i0cy2jdb6kqql2k8w78qy";
}
@marsam I can confirm that this would fix the issue (i've had it before).
Eventually it would be nice if fetchFromGitLab could url encode rev.
That did indeed work. Is it a good idea to use this workaround in a package? If url quoting gets implemented one day, that piece might get double quoted (I could go with fetchgit instead).
It should check if it's already url encoded. Should be fine to do this.
Ok, thanks :-)
I will keep this open just in case someone hits this..
Thank you for your contributions.
This has been automatically marked as stale because it has had no activity for 180 days.
If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity.
Here are suggestions that might help resolve this more quickly: