From 20deb8ca9abf637b72d1650407838f66d1fcd5d9 Mon Sep 17 00:00:00 2001 From: Paul TREHIOU Date: Tue, 10 Jun 2025 15:28:37 +0000 Subject: [PATCH] sonarr: replace patch by mv command --- pkgs/by-name/so/sonarr/nuget-config.patch | 9 ----- pkgs/by-name/so/sonarr/package.nix | 41 +++++++++++------------ 2 files changed, 20 insertions(+), 30 deletions(-) delete mode 100644 pkgs/by-name/so/sonarr/nuget-config.patch diff --git a/pkgs/by-name/so/sonarr/nuget-config.patch b/pkgs/by-name/so/sonarr/nuget-config.patch deleted file mode 100644 index c844b419d7a5..000000000000 --- a/pkgs/by-name/so/sonarr/nuget-config.patch +++ /dev/null @@ -1,9 +0,0 @@ -Move NuGet configuration file to the source root where Nixpkgs .NET -build infrastructure expects to find it. - -https://github.com/NixOS/nixpkgs/pull/291640#discussion_r1601841807 - -diff --git a/src/NuGet.Config b/NuGet.Config -similarity index 100% -rename from src/NuGet.Config -rename to NuGet.Config diff --git a/pkgs/by-name/so/sonarr/package.nix b/pkgs/by-name/so/sonarr/package.nix index 1cd4cd72adc2..b9750fff28b2 100644 --- a/pkgs/by-name/so/sonarr/package.nix +++ b/pkgs/by-name/so/sonarr/package.nix @@ -31,27 +31,26 @@ let tag = "v${version}"; hash = "sha256-gtEDrAosI0Kyk712Kf8QDuloUBq9AArKdukX/PKAo8M="; }; - patches = - [ - ./nuget-config.patch - ] - ++ lib.optionals (lib.versionOlder version "5.0") [ - # See https://github.com/Sonarr/Sonarr/issues/7442 and - # https://github.com/Sonarr/Sonarr/pull/7443. - # Unfortunately, the .NET 8 upgrade was only merged into the v5 branch, - # and it may take some time for that to become stable. - # However, the patches cleanly apply to v4 as well. - (fetchpatch { - name = "dotnet8-compatibility"; - url = "https://github.com/Sonarr/Sonarr/commit/518f1799dca96a7481004ceefe39be465de3d72d.patch"; - hash = "sha256-e+/rKZrTf6lWq9bmCAwnZrbEPRkqVmI7qNavpLjfpUE="; - }) - (fetchpatch { - name = "dotnet8-darwin-compatibility"; - url = "https://github.com/Sonarr/Sonarr/commit/1a5fa185d11d2548f45fefb8a0facd3731a946d0.patch"; - hash = "sha256-6Lzo4ph1StA05+B1xYhWH+BBegLd6DxHiEiaRxGXn7k="; - }) - ]; + postPatch = '' + mv src/NuGet.Config NuGet.Config + ''; + patches = lib.optionals (lib.versionOlder version "5.0") [ + # See https://github.com/Sonarr/Sonarr/issues/7442 and + # https://github.com/Sonarr/Sonarr/pull/7443. + # Unfortunately, the .NET 8 upgrade was only merged into the v5 branch, + # and it may take some time for that to become stable. + # However, the patches cleanly apply to v4 as well. + (fetchpatch { + name = "dotnet8-compatibility"; + url = "https://github.com/Sonarr/Sonarr/commit/518f1799dca96a7481004ceefe39be465de3d72d.patch"; + hash = "sha256-e+/rKZrTf6lWq9bmCAwnZrbEPRkqVmI7qNavpLjfpUE="; + }) + (fetchpatch { + name = "dotnet8-darwin-compatibility"; + url = "https://github.com/Sonarr/Sonarr/commit/1a5fa185d11d2548f45fefb8a0facd3731a946d0.patch"; + hash = "sha256-6Lzo4ph1StA05+B1xYhWH+BBegLd6DxHiEiaRxGXn7k="; + }) + ]; }; rid = dotnetCorePackages.systemToDotnetRid stdenvNoCC.hostPlatform.system; in