build-dotnet-module: strip --runtime flags without using rid

This commit is contained in:
David McFarland 2022-10-03 11:51:00 -03:00
parent 3fdb6c5a90
commit 06e4d89943

View File

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