From 4d6a7480991970801c0d195eebac90180026367b Mon Sep 17 00:00:00 2001 From: Atemu Date: Wed, 19 Oct 2022 02:14:28 +0200 Subject: [PATCH] BeatSaberModManager: use substituteAll instead of custom postPatch --- .../BeatSaberModManager/add-runtime-identifier.patch | 2 +- pkgs/games/BeatSaberModManager/default.nix | 12 +++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/pkgs/games/BeatSaberModManager/add-runtime-identifier.patch b/pkgs/games/BeatSaberModManager/add-runtime-identifier.patch index 0f49cc07f0a8..a7d17b59a35b 100644 --- a/pkgs/games/BeatSaberModManager/add-runtime-identifier.patch +++ b/pkgs/games/BeatSaberModManager/add-runtime-identifier.patch @@ -4,7 +4,7 @@ true true Resources/Icons/Icon.ico -+ @RuntimeIdentifier@ ++ @runtimeIdentifier@ diff --git a/pkgs/games/BeatSaberModManager/default.nix b/pkgs/games/BeatSaberModManager/default.nix index b8a533ed265b..e726644c21dc 100644 --- a/pkgs/games/BeatSaberModManager/default.nix +++ b/pkgs/games/BeatSaberModManager/default.nix @@ -2,6 +2,7 @@ lib, dotnet-sdk, targetPlatform, + substituteAll, buildDotnetModule, fetchFromGitHub, @@ -27,11 +28,12 @@ buildDotnetModule rec { # 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$. # https://github.com/NixOS/nixpkgs/pull/196648#discussion_r998709996 - patches = [ ./add-runtime-identifier.patch ]; - postPatch = '' - substituteInPlace BeatSaberModManager/BeatSaberModManager.csproj \ - --replace @RuntimeIdentifier@ "${dotnet-sdk.passthru.systemToDotnetRid targetPlatform.system}" - ''; + patches = [ + (substituteAll { + src = ./add-runtime-identifier.patch; + runtimeIdentifier = dotnet-sdk.passthru.systemToDotnetRid targetPlatform.system; + }) + ]; nugetDeps = ./deps.nix;