diff options
author | aszlig <aszlig@nix.build> | 2018-09-26 16:15:50 +0200 |
---|---|---|
committer | aszlig <aszlig@nix.build> | 2018-09-26 16:17:18 +0200 |
commit | 593062ddc2104cf91b1cf9cc0e4f4b1437f59f6b (patch) | |
tree | d5a20fed3e362e2923bc5d74419f7ce0ce21b57f /pkgs/top-level/all-packages.nix | |
parent | ca3231a9f33e7596eb7d6422e4239d8a3a505db0 (diff) | |
download | nixlib-593062ddc2104cf91b1cf9cc0e4f4b1437f59f6b.tar nixlib-593062ddc2104cf91b1cf9cc0e4f4b1437f59f6b.tar.gz nixlib-593062ddc2104cf91b1cf9cc0e4f4b1437f59f6b.tar.bz2 nixlib-593062ddc2104cf91b1cf9cc0e4f4b1437f59f6b.tar.lz nixlib-593062ddc2104cf91b1cf9cc0e4f4b1437f59f6b.tar.xz nixlib-593062ddc2104cf91b1cf9cc0e4f4b1437f59f6b.tar.zst nixlib-593062ddc2104cf91b1cf9cc0e4f4b1437f59f6b.zip |
fetchFromGitLab: Fix grouping issue for group arg
Issue introduced by c3612b97e625ad0d70c6ba56d191bcb9a403f44c. Example output before that commit (witch a random package using fetchFromGitLab): $ nix-instantiate --eval -A hiawatha.src.urls [ "https://gitlab.com/api/v4/projects/hsleisink%2Fhiawatha/repository/archive.tar.gz?sha=v10.8.1" ] After the commit: $ nix-instantiate --eval -A hiawatha.src.urls [ "https://gitlab.com/api/v4/projects/%2Fhsleisink%2Fhiawatha/repository/archive.tar.gz?sha=v10.8.1" ] And with this very commit, which fixes the issue: $ nix-instantiate --eval -A hiawatha.src.urls [ "https://gitlab.com/api/v4/projects/hsleisink%2Fhiawatha/repository/archive.tar.gz?sha=v10.8.1" ] The problem was that it has used optionalString in conjunction with "+", so the optionalString only applied to the left-hand side of the + operator. Thanks to @ryantm for reporting the issue at: https://github.com/NixOS/nixpkgs/pull/46487/commits/c3612b97e625ad0d70c6ba56d191bcb9a403f44c#r220576764 Signed-off-by: aszlig <aszlig@nix.build> Reported-by: Ryan Mulligan <ryan@ryantm.com>
Diffstat (limited to 'pkgs/top-level/all-packages.nix')
-rw-r--r-- | pkgs/top-level/all-packages.nix | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 39e70e5e1761..56c3606368d7 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -292,8 +292,8 @@ with pkgs; ... # For hash agility }@args: fetchzip ({ inherit name; - url = "https://${domain}/api/v4/projects/${lib.optionalString (group != null) group+"%2F"}${owner}%2F${repo}/repository/archive.tar.gz?sha=${rev}"; - meta.homepage = "https://${domain}/${lib.optionalString (group != null) group+"/"}${owner}/${repo}/"; + url = "https://${domain}/api/v4/projects/${lib.optionalString (group != null) "${group}%2F"}${owner}%2F${repo}/repository/archive.tar.gz?sha=${rev}"; + meta.homepage = "https://${domain}/${lib.optionalString (group != null) "${group}/"}${owner}/${repo}/"; } // removeAttrs args [ "domain" "owner" "group" "repo" "rev" ]) // { inherit rev; }; # gitweb example, snapshot support is optional in gitweb |