summaryrefslogtreecommitdiffstats
path: root/pkgs/games/BeatSaberModManager
diff options
context:
space:
mode:
authorAtemu <atemu.main@gmail.com>2022-10-19 02:14:28 +0200
committerAtemu <atemu.main@gmail.com>2022-10-19 02:14:28 +0200
commit4d6a7480991970801c0d195eebac90180026367b (patch)
tree19530875303f5a0834b0ae6fe4f0ff6e7fea4928 /pkgs/games/BeatSaberModManager
parentea570d1ed3a1779ed48109766998480d7e2a9e87 (diff)
BeatSaberModManager: use substituteAll instead of custom postPatch
Diffstat (limited to 'pkgs/games/BeatSaberModManager')
-rw-r--r--pkgs/games/BeatSaberModManager/add-runtime-identifier.patch2
-rw-r--r--pkgs/games/BeatSaberModManager/default.nix12
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 @@
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<ApplicationIcon>Resources/Icons/Icon.ico</ApplicationIcon>
-+ <RuntimeIdentifier>@RuntimeIdentifier@</RuntimeIdentifier>
++ <RuntimeIdentifier>@runtimeIdentifier@</RuntimeIdentifier>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Debug'">
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;