From 0fb17c04fe34ac45247d35a1e4e0521652d9c494 Mon Sep 17 00:00:00 2001 From: Atemu Date: Tue, 18 Oct 2022 23:39:42 +0200 Subject: [PATCH] BeatSaberModManager: install as single file --- .../add-runtime-identifier.patch | 12 ++++++++++++ pkgs/games/BeatSaberModManager/default.nix | 15 ++++++++++----- 2 files changed, 22 insertions(+), 5 deletions(-) create mode 100644 pkgs/games/BeatSaberModManager/add-runtime-identifier.patch diff --git a/pkgs/games/BeatSaberModManager/add-runtime-identifier.patch b/pkgs/games/BeatSaberModManager/add-runtime-identifier.patch new file mode 100644 index 000000000000..0f49cc07f0a8 --- /dev/null +++ b/pkgs/games/BeatSaberModManager/add-runtime-identifier.patch @@ -0,0 +1,12 @@ +--- a/BeatSaberModManager/BeatSaberModManager.csproj ++++ b/BeatSaberModManager/BeatSaberModManager.csproj +@@ -14,6 +14,7 @@ + true + true + Resources/Icons/Icon.ico ++ @RuntimeIdentifier@ + + + + +Diff finished. Tue Oct 18 23:16:23 2022 diff --git a/pkgs/games/BeatSaberModManager/default.nix b/pkgs/games/BeatSaberModManager/default.nix index efaa13b6a605..5f25c4d33392 100644 --- a/pkgs/games/BeatSaberModManager/default.nix +++ b/pkgs/games/BeatSaberModManager/default.nix @@ -1,5 +1,7 @@ { lib, + dotnet-sdk, + targetPlatform, buildDotnetModule, fetchFromGitHub, @@ -22,12 +24,15 @@ buildDotnetModule rec { fetchSubmodules = true; # It vendors BSIPA-Linux }; - nugetDeps = ./deps.nix; + # This _must_ be specified in the project file and it can only be one so + # obviously you wouldn't specify it as an upstream project. Typical M$. + patches = [ ./add-runtime-identifier.patch ]; + postPatch = '' + substituteInPlace BeatSaberModManager/BeatSaberModManager.csproj \ + --replace @RuntimeIdentifier@ "${dotnet-sdk.passthru.systemToDotnetRid targetPlatform.system}" + ''; - dotnetInstallFlags = [ - # FIXME It doesn't like that for some reason beyond my ability to package dotnet - "-p:PublishSingleFile=false" - ]; + nugetDeps = ./deps.nix; runtimeDeps = [ libX11