BeatSaberModManager: use substituteAll instead of custom postPatch

This commit is contained in:
Atemu 2022-10-19 02:14:28 +02:00
parent ea570d1ed3
commit 4d6a748099
2 changed files with 8 additions and 6 deletions

View File

@ -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'">

View File

@ -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;