aboutsummaryrefslogtreecommitdiff
path: root/srcds-pkgs/depotdownloader-json
diff options
context:
space:
mode:
authoryuuko <yuuko@partyvan.io>2026-01-03 14:38:34 -0800
committerylh <yestin@ylh.io>2026-01-03 14:40:16 -0800
commit8129ad2f5bd79b8778b30249e89a22ed9f65b402 (patch)
tree3c738ed9d988b4c2f789b0309c33d917098a2523 /srcds-pkgs/depotdownloader-json
parent357c7ece8ebe441b78ca9f2f5a0bdd9cac2fa067 (diff)
depotdownloader-json: nixpkgs 25.05 (depotdownloader 3.1.0)
Diffstat (limited to 'srcds-pkgs/depotdownloader-json')
-rw-r--r--srcds-pkgs/depotdownloader-json/3_1/0002-ContentDownloader-save-manifest-as-json-also.patch34
-rw-r--r--srcds-pkgs/depotdownloader-json/default.nix12
2 files changed, 46 insertions, 0 deletions
diff --git a/srcds-pkgs/depotdownloader-json/3_1/0002-ContentDownloader-save-manifest-as-json-also.patch b/srcds-pkgs/depotdownloader-json/3_1/0002-ContentDownloader-save-manifest-as-json-also.patch
new file mode 100644
index 0000000..0eab99b
--- /dev/null
+++ b/srcds-pkgs/depotdownloader-json/3_1/0002-ContentDownloader-save-manifest-as-json-also.patch
@@ -0,0 +1,34 @@
+From f2395dfdff8d051ae3982daab6293b85c88a9666 Mon Sep 17 00:00:00 2001
+From: yuuko <yuuko@partyvan.io>
+Date: Sat, 3 Jan 2026 14:31:25 -0800
+Subject: [PATCH] ContentDownloader: save manifest as json also
+
+---
+ DepotDownloader/ContentDownloader.cs | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/DepotDownloader/ContentDownloader.cs b/DepotDownloader/ContentDownloader.cs
+index caa50eba..e85c0f2d 100644
+--- a/DepotDownloader/ContentDownloader.cs
++++ b/DepotDownloader/ContentDownloader.cs
+@@ -8,6 +8,8 @@ using System.Collections.Generic;
+ using System.IO;
+ using System.Linq;
+ using System.Net;
++using System.Text;
++using System.Text.Json;
+ using System.Threading;
+ using System.Threading.Tasks;
+ using SteamKit2;
+@@ -1386,6 +1388,8 @@ namespace DepotDownloader
+ var sha1Hash = Convert.ToHexString(file.FileHash).ToLower();
+ sw.WriteLine($"{file.TotalSize,14:d} {file.Chunks.Count,6:d} {sha1Hash} {(int)file.Flags,5:x} {file.FileName}");
+ }
++ var jsonBytes = new UTF8Encoding(true).GetBytes(JsonSerializer.Serialize(manifest));
++ File.Open(txtManifest.Replace(".txt", ".json"), FileMode.Create).Write(jsonBytes, 0, jsonBytes.Length);
+ }
+ }
+ }
+--
+2.51.0
+
diff --git a/srcds-pkgs/depotdownloader-json/default.nix b/srcds-pkgs/depotdownloader-json/default.nix
index 7fb5935..dce910b 100644
--- a/srcds-pkgs/depotdownloader-json/default.nix
+++ b/srcds-pkgs/depotdownloader-json/default.nix
@@ -90,6 +90,18 @@ else if builtins.elem version [ "2.7.4" ] then
./2_7/0003-thats-just-like-your-opinion-man.patch
];
}
+else if builtins.elem version [ "3.1.0" ] then
+ {
+ patches = [
+ ./2_7/0001-ProtoManifest-sort-files-in-constructor.patch
+ # they changed how they do their own serialisation. seeing as it's
+ # plain text now, it could make sense to just parse it ourselves and
+ # crank out our own json, and sort for reproducibility on our end too,
+ # but whatever, that's a flight of fancy for someone who cares
+ ./3_1/0002-ContentDownloader-save-manifest-as-json-also.patch
+ ./2_7/0003-thats-just-like-your-opinion-man.patch
+ ];
+ }
else builtins.abort "version of DepotDownloader not covered by patches"
)