diff options
author | yuuko <yuuko@partyvan.io> | 2024-11-24 00:49:25 -0800 |
---|---|---|
committer | yuuko <yuuko@partyvan.io> | 2024-11-24 00:49:25 -0800 |
commit | e4c37c5d5dc734fb94149af4a6273f35f818bdca (patch) | |
tree | 46912968714a140234aea6b23b930f229ad733de /srcds-pkgs/depotdownloader-json/default.nix | |
parent | 402758f0494c2e4826605b36a93bbbe703db9cbd (diff) |
chore: rework depotdownloader patches for 2.7
Diffstat (limited to 'srcds-pkgs/depotdownloader-json/default.nix')
-rw-r--r-- | srcds-pkgs/depotdownloader-json/default.nix | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/srcds-pkgs/depotdownloader-json/default.nix b/srcds-pkgs/depotdownloader-json/default.nix index c09422d..7ff0270 100644 --- a/srcds-pkgs/depotdownloader-json/default.nix +++ b/srcds-pkgs/depotdownloader-json/default.nix @@ -1,10 +1,17 @@ { depotdownloader }: depotdownloader.overrideAttrs({ patches ? [], version, ... }: { - patches = assert builtins.elem version [ "2.4.7" "2.5.0" ]; patches ++ [ - # with this, nix has access to the hashes in the manifest - ./0001-emit-json-in-.DepotDownload.patch - # the manifest can arrive out of order across requests to the same build! - # luckily that singular reproducibility snag is patched in 1 line. - ./0002-ProtoManifest-sort-files-in-constructor.patch - ]; + patches = if builtins.elem version [ "2.4.7" "2.5.0"] then + [ + # with this, nix has access to the hashes in the manifest + ./2_5/0001-emit-json-in-.DepotDownload.patch + # the manifest can arrive out of order across requests to the same build! + # luckily that singular reproducibility snag is patched in 1 line. + ./2_5/0002-ProtoManifest-sort-files-in-constructor.patch + ] + else if builtins.elem version [ "2.7.3" ] then + [ + ./2_7/0001-ProtoManifest-sort-files-in-constructor.patch + ./2_7/0002-emit-json-in-.DepotDownload.patch + ] + else builtins.abort "version of DepotDownloader not covered by patches"; }) |