Loading pkgs/build-support/fetchpatch/default.nix +2 −5 Original line number Diff line number Diff line Loading @@ -4,11 +4,8 @@ # often change with updating of git or cgit. # stripLen acts as the -p parameter when applying a patch. { lib, fetchurl, buildPackages }: let # 0.3.4 would change hashes: https://github.com/NixOS/nixpkgs/issues/25154 patchutils = buildPackages.patchutils_0_3_3; in { lib, fetchurl, patchutils }: { relative ? null , stripLen ? 0 , extraPrefix ? null Loading pkgs/build-support/fetchpatch/tests.nix +7 −3 Original line number Diff line number Diff line { testers, fetchpatch, ... }: let isFetchpatch2 = fetchpatch.version == 2; in { simple = testers.invalidateFetcherByDrvHash fetchpatch { url = "https://github.com/facebook/zstd/pull/2724/commits/e1f85dbca3a0ed5ef06c8396912a0914db8dea6a.patch"; sha256 = "sha256-PuYAqnJWAE+L9bsroOnnBGJhERW8LHrGSLtIEkKU9vg="; sha256 = if isFetchpatch2 then "sha256-01BrkHLye4KOdqCw3tv7AJzIF6578pl2fl270TJFTmw=" else "sha256-PuYAqnJWAE+L9bsroOnnBGJhERW8LHrGSLtIEkKU9vg="; }; relative = testers.invalidateFetcherByDrvHash fetchpatch { url = "https://github.com/boostorg/math/commit/7d482f6ebc356e6ec455ccb5f51a23971bf6ce5b.patch"; relative = "include"; sha256 = "sha256-KlmIbixcds6GyKYt1fx5BxDIrU7msrgDdYo9Va/KJR4="; sha256 = if isFetchpatch2 then "sha256-1TtmuKeNIl/Yp+sfzBMR8Ue78tPIgjqGgjasa5IN52o=" else "sha256-KlmIbixcds6GyKYt1fx5BxDIrU7msrgDdYo9Va/KJR4="; }; full = testers.invalidateFetcherByDrvHash fetchpatch { Loading @@ -19,6 +23,6 @@ extraPrefix = "foo/bar/"; excludes = [ "foo/bar/bernoulli_no_atomic_mp.cpp" ]; revert = true; sha256 = "sha256-+UKmEbr2rIAweCav/hR/7d4ZrYV84ht/domTrHtm8sM="; sha256 = if isFetchpatch2 then "sha256-+UKmEbr2rIAweCav/hR/7d4ZrYV84ht/domTrHtm8sM=" else "sha256-+UKmEbr2rIAweCav/hR/7d4ZrYV84ht/domTrHtm8sM="; }; } pkgs/test/default.nix +1 −0 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ with pkgs; fetchurl = callPackages ../build-support/fetchurl/tests.nix { }; fetchpatch = callPackages ../build-support/fetchpatch/tests.nix { }; fetchpatch2 = callPackages ../build-support/fetchpatch/tests.nix { fetchpatch = fetchpatch2; }; fetchzip = callPackages ../build-support/fetchzip/tests.nix { }; fetchgit = callPackages ../build-support/fetchgit/tests.nix { }; fetchFirefoxAddon = callPackages ../build-support/fetchfirefoxaddon/tests.nix { }; Loading pkgs/top-level/all-packages.nix +14 −4 Original line number Diff line number Diff line Loading @@ -808,9 +808,19 @@ with pkgs; broadlink-cli = callPackage ../tools/misc/broadlink-cli {}; fetchpatch = callPackage ../build-support/fetchpatch { } // { fetchpatch = callPackage ../build-support/fetchpatch { # 0.3.4 would change hashes: https://github.com/NixOS/nixpkgs/issues/25154 patchutils = buildPackages.patchutils_0_3_3; } // { tests = pkgs.tests.fetchpatch; version = 1; }; fetchpatch2 = callPackage ../build-support/fetchpatch { patchutils = buildPackages.patchutils_0_4_2; } // { tests = pkgs.tests.fetchpatch2; version = 2; }; fetchs3 = callPackage ../build-support/fetchs3 { }; Loading
pkgs/build-support/fetchpatch/default.nix +2 −5 Original line number Diff line number Diff line Loading @@ -4,11 +4,8 @@ # often change with updating of git or cgit. # stripLen acts as the -p parameter when applying a patch. { lib, fetchurl, buildPackages }: let # 0.3.4 would change hashes: https://github.com/NixOS/nixpkgs/issues/25154 patchutils = buildPackages.patchutils_0_3_3; in { lib, fetchurl, patchutils }: { relative ? null , stripLen ? 0 , extraPrefix ? null Loading
pkgs/build-support/fetchpatch/tests.nix +7 −3 Original line number Diff line number Diff line { testers, fetchpatch, ... }: let isFetchpatch2 = fetchpatch.version == 2; in { simple = testers.invalidateFetcherByDrvHash fetchpatch { url = "https://github.com/facebook/zstd/pull/2724/commits/e1f85dbca3a0ed5ef06c8396912a0914db8dea6a.patch"; sha256 = "sha256-PuYAqnJWAE+L9bsroOnnBGJhERW8LHrGSLtIEkKU9vg="; sha256 = if isFetchpatch2 then "sha256-01BrkHLye4KOdqCw3tv7AJzIF6578pl2fl270TJFTmw=" else "sha256-PuYAqnJWAE+L9bsroOnnBGJhERW8LHrGSLtIEkKU9vg="; }; relative = testers.invalidateFetcherByDrvHash fetchpatch { url = "https://github.com/boostorg/math/commit/7d482f6ebc356e6ec455ccb5f51a23971bf6ce5b.patch"; relative = "include"; sha256 = "sha256-KlmIbixcds6GyKYt1fx5BxDIrU7msrgDdYo9Va/KJR4="; sha256 = if isFetchpatch2 then "sha256-1TtmuKeNIl/Yp+sfzBMR8Ue78tPIgjqGgjasa5IN52o=" else "sha256-KlmIbixcds6GyKYt1fx5BxDIrU7msrgDdYo9Va/KJR4="; }; full = testers.invalidateFetcherByDrvHash fetchpatch { Loading @@ -19,6 +23,6 @@ extraPrefix = "foo/bar/"; excludes = [ "foo/bar/bernoulli_no_atomic_mp.cpp" ]; revert = true; sha256 = "sha256-+UKmEbr2rIAweCav/hR/7d4ZrYV84ht/domTrHtm8sM="; sha256 = if isFetchpatch2 then "sha256-+UKmEbr2rIAweCav/hR/7d4ZrYV84ht/domTrHtm8sM=" else "sha256-+UKmEbr2rIAweCav/hR/7d4ZrYV84ht/domTrHtm8sM="; }; }
pkgs/test/default.nix +1 −0 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ with pkgs; fetchurl = callPackages ../build-support/fetchurl/tests.nix { }; fetchpatch = callPackages ../build-support/fetchpatch/tests.nix { }; fetchpatch2 = callPackages ../build-support/fetchpatch/tests.nix { fetchpatch = fetchpatch2; }; fetchzip = callPackages ../build-support/fetchzip/tests.nix { }; fetchgit = callPackages ../build-support/fetchgit/tests.nix { }; fetchFirefoxAddon = callPackages ../build-support/fetchfirefoxaddon/tests.nix { }; Loading
pkgs/top-level/all-packages.nix +14 −4 Original line number Diff line number Diff line Loading @@ -808,9 +808,19 @@ with pkgs; broadlink-cli = callPackage ../tools/misc/broadlink-cli {}; fetchpatch = callPackage ../build-support/fetchpatch { } // { fetchpatch = callPackage ../build-support/fetchpatch { # 0.3.4 would change hashes: https://github.com/NixOS/nixpkgs/issues/25154 patchutils = buildPackages.patchutils_0_3_3; } // { tests = pkgs.tests.fetchpatch; version = 1; }; fetchpatch2 = callPackage ../build-support/fetchpatch { patchutils = buildPackages.patchutils_0_4_2; } // { tests = pkgs.tests.fetchpatch2; version = 2; }; fetchs3 = callPackage ../build-support/fetchs3 { };