nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at haskell-updates 85 lines 2.8 kB view raw
1{ testers, fetchpatch, ... }: 2 3let 4 isFetchpatch2 = fetchpatch.version == 2; 5in 6 7{ 8 simple = testers.invalidateFetcherByDrvHash fetchpatch { 9 url = "https://github.com/facebook/zstd/pull/2724/commits/e1f85dbca3a0ed5ef06c8396912a0914db8dea6a.patch"; 10 sha256 = 11 if isFetchpatch2 then 12 "sha256-w4yU0wt64d0WkuBQPeGf8vn5TH6qSBJvNIgka9QK+/Q=" 13 else 14 "sha256-PuYAqnJWAE+L9bsroOnnBGJhERW8LHrGSLtIEkKU9vg="; 15 }; 16 17 relative = testers.invalidateFetcherByDrvHash fetchpatch { 18 url = "https://github.com/boostorg/math/commit/7d482f6ebc356e6ec455ccb5f51a23971bf6ce5b.patch"; 19 relative = "include"; 20 sha256 = 21 if isFetchpatch2 then 22 "sha256-1TtmuKeNIl/Yp+sfzBMR8Ue78tPIgjqGgjasa5IN52o=" 23 else 24 "sha256-KlmIbixcds6GyKYt1fx5BxDIrU7msrgDdYo9Va/KJR4="; 25 }; 26 27 hunks = testers.invalidateFetcherByDrvHash fetchpatch { 28 url = "https://github.com/openssh/openssh-portable/commit/35d5917652106aede47621bb3f64044604164043.patch"; 29 stripLen = 1; 30 hunks = [ 31 2 32 3 33 4 34 5 35 6 36 7 37 ]; 38 sha256 = 39 if isFetchpatch2 then 40 "sha256-SXJALY4zC4y/ZV7uVglf+XB5cpC5tS4M8QDGlFRmcFM=" 41 else 42 "sha256-MV7uGgA1ESMR7W6H5FjAIxKcpySdQjWB+L2zaHjd96M="; 43 }; 44 45 full = testers.invalidateFetcherByDrvHash fetchpatch { 46 url = "https://github.com/boostorg/math/commit/7d482f6ebc356e6ec455ccb5f51a23971bf6ce5b.patch"; 47 relative = "test"; 48 stripLen = 1; 49 extraPrefix = "foo/bar/"; 50 excludes = [ "foo/bar/bernoulli_no_atomic_mp.cpp" ]; 51 # Should result in no change. 52 hunks = [ "1-" ]; 53 revert = true; 54 sha256 = "sha256-+UKmEbr2rIAweCav/hR/7d4ZrYV84ht/domTrHtm8sM="; 55 }; 56 57 decode = testers.invalidateFetcherByDrvHash fetchpatch { 58 name = "gcc.patch"; 59 url = "https://chromium.googlesource.com/aosp/platform/external/libchrome/+/f37ae3b1a873d74182a2ac31d96742ead9c1f523^!?format=TEXT"; 60 decode = "base64 -d"; 61 sha256 = 62 if isFetchpatch2 then 63 "sha256-oMvPlmzE51ArI+EvFxONXkqmNee39106/O1ikG0Bdso=" 64 else 65 "sha256-SJHk8XrutqAyoIdORlhCpBCN626P+uzed7mjKz5eQYY="; 66 }; 67 68 fileWithSpace = testers.invalidateFetcherByDrvHash fetchpatch { 69 url = "https://github.com/jfly/annoying-filenames/commit/1e86a219f5fc9c4137b409bc9c38036f3922724b.patch"; 70 sha256 = 71 if isFetchpatch2 then 72 "sha256-RB6pjigoXtzHILkGFXYd3Lz2aM9DvO0NRmLdey1N6gg=" 73 else 74 "sha256-aptUvVojqIIIVNuHqkl+C+dZBGFfs+1MUd0FNV+4j4E="; 75 }; 76 77 fileWithApostrophe = testers.invalidateFetcherByDrvHash fetchpatch { 78 url = "https://github.com/jfly/annoying-filenames/commit/8b6d8f8d7094ce646523b3369cfdf5030289c66c.patch"; 79 sha256 = 80 if isFetchpatch2 then 81 "sha256-CrQFmVvLEvWpo2ucVrWyLb5qk2GVOxyUbFN3hp9sV68=" 82 else 83 "sha256-CrQFmVvLEvWpo2ucVrWyLb5qk2GVOxyUbFN3hp9sV68="; 84 }; 85}