From 06e4d89943603a309db2d5fe07ff2abf59edc8f5 Mon Sep 17 00:00:00 2001 From: David McFarland Date: Mon, 3 Oct 2022 11:51:00 -0300 Subject: [PATCH] build-dotnet-module: strip --runtime flags without using rid --- pkgs/build-support/dotnet/build-dotnet-module/default.nix | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pkgs/build-support/dotnet/build-dotnet-module/default.nix b/pkgs/build-support/dotnet/build-dotnet-module/default.nix index 237aaad50d25..932ebceceac1 100644 --- a/pkgs/build-support/dotnet/build-dotnet-module/default.nix +++ b/pkgs/build-support/dotnet/build-dotnet-module/default.nix @@ -161,10 +161,9 @@ stdenvNoCC.mkDerivation (args // { # That causes conflicts. To circumvent it we remove all occurances of the flag. flags = let - hasRid = flag: lib.any (v: v) (map (rid: lib.hasInfix rid flag) (lib.attrValues dotnet-sdk.runtimeIdentifierMap)); + isRuntime = flag: lib.hasPrefix "--runtime" flag; in - builtins.filter (flag: !(hasRid flag)) (dotnetFlags ++ dotnetRestoreFlags); - + builtins.filter (flag: !(isRuntime flag)) (dotnetFlags ++ dotnetRestoreFlags); runtimeIds = map (system: dotnetCorePackages.systemToDotnetRid system) platforms; in writeShellScript "fetch-${pname}-deps" ''