fetchFromBitbucket: add test, repro need for url escape
Looking into #29733
This commit is contained in:
@@ -12,6 +12,7 @@ lib.makeOverridable (
|
||||
{
|
||||
inherit name;
|
||||
url = "https://bitbucket.org/${owner}/${repo}/get/${rev}.tar.gz";
|
||||
# url = "https://bitbucket.org/${owner}/${repo}/get/${lib.strings.escapeURL rev}.tar.gz";
|
||||
meta.homepage = "https://bitbucket.org/${owner}/${repo}/";
|
||||
}
|
||||
// removeAttrs args [
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
{ testers, fetchFromBitbucket, ... }:
|
||||
{
|
||||
withEncodedWhitespace = testers.invalidateFetcherByDrvHash fetchFromBitbucket {
|
||||
name = "withWhitespace";
|
||||
owner = "tetov";
|
||||
repo = "fetchbitbucket_tester";
|
||||
rev = "tag%20with%20encoded%20spaces";
|
||||
sha256 = "sha256-Nf1Cvbx7Sbab8EeSSBU5baLBiuFYiQtITED+f4tfjC0=";
|
||||
};
|
||||
|
||||
withoutWhitespace = testers.invalidateFetcherByDrvHash fetchFromBitbucket {
|
||||
name = "withoutWhitespace";
|
||||
owner = "tetov";
|
||||
repo = "fetchbitbucket_tester";
|
||||
rev = "main";
|
||||
sha256 = "sha256-eTd773gE1z4+Fl2YPBbbsrADD4Dr7sFGoOWgphXUhtE=";
|
||||
};
|
||||
}
|
||||
@@ -129,6 +129,7 @@ with pkgs;
|
||||
fetchDebianPatch = recurseIntoAttrs (callPackages ../build-support/fetchdebianpatch/tests.nix { });
|
||||
fetchzip = recurseIntoAttrs (callPackages ../build-support/fetchzip/tests.nix { });
|
||||
fetchgit = recurseIntoAttrs (callPackages ../build-support/fetchgit/tests.nix { });
|
||||
fetchFromBitbucket = recurseIntoAttrs (callPackages ../build-support/fetchbitbucket/tests.nix { });
|
||||
fetchFirefoxAddon = recurseIntoAttrs (
|
||||
callPackages ../build-support/fetchfirefoxaddon/tests.nix { }
|
||||
);
|
||||
|
||||
@@ -701,7 +701,9 @@ with pkgs;
|
||||
|
||||
fetchFromGitHub = callPackage ../build-support/fetchgithub { };
|
||||
|
||||
fetchFromBitbucket = callPackage ../build-support/fetchbitbucket { };
|
||||
fetchFromBitbucket = callPackage ../build-support/fetchbitbucket { } // {
|
||||
tests = pkgs.tests.fetchFromBitbucket;
|
||||
};
|
||||
|
||||
fetchFromSavannah = callPackage ../build-support/fetchsavannah { };
|
||||
|
||||
|
||||
Reference in New Issue
Block a user