From c0822927113e1f62f0447587455b8f9495340c62 Mon Sep 17 00:00:00 2001 From: yuuko Date: Sun, 24 Nov 2024 01:50:02 -0800 Subject: depotdownloader-json: patch 2.7.3's steamkit2 dep to leave /sys/class/net alone this was causing grief inside nix builds. will be fixed in 2.7.4 but that will take a while to land as it depends on dotnet 9. --- srcds-pkgs/depotdownloader-json/default.nix | 88 +++++++++++++++++++++++++---- 1 file changed, 78 insertions(+), 10 deletions(-) (limited to 'srcds-pkgs/depotdownloader-json/default.nix') diff --git a/srcds-pkgs/depotdownloader-json/default.nix b/srcds-pkgs/depotdownloader-json/default.nix index 0f6f4c4..a447aa3 100644 --- a/srcds-pkgs/depotdownloader-json/default.nix +++ b/srcds-pkgs/depotdownloader-json/default.nix @@ -1,19 +1,87 @@ -{ depotdownloader }: -depotdownloader.overrideAttrs({ patches ? [], version, ... }: { - patches = if builtins.elem version [ "2.4.7" "2.5.0"] then - [ +{ depotdownloader, callPackage, fetchNuGet, ed }: +depotdownloader.overrideAttrs ( +{ patches ? [] +, buildInputs +, nativeBuildInputs ? [] +, passthru ? {} +, version +, ... +}: +let + # see 2.7.3 below + "SteamKit2" = callPackage ( + { lib, buildDotnetModule + , fetchFromGitHub, fetchNuGet + , dotnetCorePackages + , ed }: + buildDotnetModule rec { + pname = "SteamKit2"; + version = "3.0.0-Beta.4"; + src = fetchFromGitHub { + owner = "SteamRE"; + repo = "SteamKit"; + rev = version; + hash = "sha256-m4ppH3pTCeqs0PrUTVDErqq94CK0XCTWIvTLy1Ll2Cs="; + }; + + projectFile = "SteamKit2/SteamKit2.sln"; + + nugetDeps = buildInputs; + nativeBuildInputs = [ ed ]; + dotnet-sdk = dotnetCorePackages.sdk_8_0; + dotnet-runtime = dotnetCorePackages.runtime_8_0; + + patches = [ ./2_7/0001-NO-NO-AND-NO.patch ]; + postPatch = '' + # nuclear option because tests pull in extra deps + rm -rf SteamKit2/Tests + ed ${projectFile} <