lol

fetchFromBitbucket: url escape rev (#386460)

authored by philiptaron.tngl.sh and committed by

GitHub 2e2bf991 6d01a558

+20 -1
+1 -1
pkgs/build-support/fetchbitbucket/default.nix
··· 15 15 fetchzip ( 16 16 { 17 17 inherit name; 18 - url = "https://bitbucket.org/${owner}/${repo}/get/${rev}.tar.gz"; 18 + url = "https://bitbucket.org/${owner}/${repo}/get/${lib.strings.escapeURL rev}.tar.gz"; 19 19 meta.homepage = "https://bitbucket.org/${owner}/${repo}/"; 20 20 } 21 21 // removeAttrs args [
+18
pkgs/build-support/fetchbitbucket/tests.nix
··· 1 + { testers, fetchFromBitbucket, ... }: 2 + { 3 + withEncodedWhitespace = testers.invalidateFetcherByDrvHash fetchFromBitbucket { 4 + name = "withWhitespace"; 5 + owner = "tetov"; 6 + repo = "fetchbitbucket_tester"; 7 + rev = "tag%20with%20encoded%20spaces"; 8 + sha256 = "sha256-Nf1Cvbx7Sbab8EeSSBU5baLBiuFYiQtITED+f4tfjC0="; 9 + }; 10 + 11 + withoutWhitespace = testers.invalidateFetcherByDrvHash fetchFromBitbucket { 12 + name = "withoutWhitespace"; 13 + owner = "tetov"; 14 + repo = "fetchbitbucket_tester"; 15 + rev = "main"; 16 + sha256 = "sha256-eTd773gE1z4+Fl2YPBbbsrADD4Dr7sFGoOWgphXUhtE="; 17 + }; 18 + }
+1
pkgs/test/default.nix
··· 131 131 fetchDebianPatch = recurseIntoAttrs (callPackages ../build-support/fetchdebianpatch/tests.nix { }); 132 132 fetchzip = recurseIntoAttrs (callPackages ../build-support/fetchzip/tests.nix { }); 133 133 fetchgit = recurseIntoAttrs (callPackages ../build-support/fetchgit/tests.nix { }); 134 + fetchFromBitbucket = recurseIntoAttrs (callPackages ../build-support/fetchbitbucket/tests.nix { }); 134 135 fetchFirefoxAddon = recurseIntoAttrs ( 135 136 callPackages ../build-support/fetchfirefoxaddon/tests.nix { } 136 137 );