nuget-to-nix: exclude by package source, not list
This allows exclusions to be by version.
This commit is contained in:
parent
b22074a46e
commit
f8763b87e0
3 changed files with 7 additions and 21 deletions
|
@ -157,9 +157,6 @@ stdenvNoCC.mkDerivation (args // {
|
|||
|
||||
fetch-deps =
|
||||
let
|
||||
# Because this list is rather long its put in its own store path to maintain readability of the generated script
|
||||
exclusions = writeText "nuget-package-exclusions" (lib.concatStringsSep "\n" (dotnet-sdk.passthru.packages { fetchNuGet = attrs: attrs.pname; }));
|
||||
|
||||
# Derivations may set flags such as `--runtime <rid>` based on the host platform to avoid restoring/building nuget dependencies they dont have or dont need.
|
||||
# This introduces an issue; In this script we loop over all platforms from `meta` and add the RID flag for it, as to fetch all required dependencies.
|
||||
# The script would inherit the RID flag from the derivation based on the platform building the script, and set the flag for any iteration we do over the RIDs.
|
||||
|
@ -254,7 +251,7 @@ stdenvNoCC.mkDerivation (args // {
|
|||
|
||||
echo "Writing lockfile..."
|
||||
echo -e "# This file was automatically generated by passthru.fetch-deps.\n# Please dont edit it manually, your changes might get overwritten!\n" > "$depsFile"
|
||||
nuget-to-nix "$tmp/nuget_pkgs" "${exclusions}" >> "$depsFile"
|
||||
nuget-to-nix "$tmp/nuget_pkgs" "${sdkDeps}" >> "$depsFile"
|
||||
echo "Succesfully wrote lockfile to $depsFile"
|
||||
'';
|
||||
} // args.passthru or { };
|
||||
|
|
|
@ -5,14 +5,14 @@ set -euo pipefail
|
|||
export PATH="@binPath@"
|
||||
|
||||
if [ $# -eq 0 ]; then
|
||||
>&2 echo "Usage: $0 <packages directory> [path to file with a list of excluded packages] > deps.nix"
|
||||
>&2 echo "Usage: $0 <packages directory> [path to excluded package source] > deps.nix"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
pkgs=$1
|
||||
exclusions="${2:-/dev/null}"
|
||||
tmpfile=$(mktemp /tmp/nuget-to-nix.XXXXXX)
|
||||
trap "rm -f ${tmpfile}" EXIT
|
||||
excluded_source=$(realpath "${2:-$tmp/empty}")
|
||||
|
||||
declare -A nuget_sources_cache
|
||||
|
||||
|
@ -23,7 +23,7 @@ while read pkg_spec; do
|
|||
# Build version part should be ignored: `3.0.0-beta2.20059.3+77df2220` -> `3.0.0-beta2.20059.3`
|
||||
sed -nE 's/.*<id>([^<]*).*/\1/p; s/.*<version>([^<+]*).*/\1/p' "$pkg_spec")
|
||||
|
||||
if grep "$pkg_name" "$exclusions" > /dev/null; then
|
||||
if [[ -e "$excluded_source/${pkg_name}.$pkg_version".nupkg ]]; then
|
||||
continue
|
||||
fi
|
||||
|
||||
|
|
17
pkgs/development/tools/omnisharp-roslyn/deps.nix
generated
17
pkgs/development/tools/omnisharp-roslyn/deps.nix
generated
|
@ -1,3 +1,6 @@
|
|||
# This file was automatically generated by passthru.fetch-deps.
|
||||
# Please dont edit it manually, your changes might get overwritten!
|
||||
|
||||
{ fetchNuGet }: [
|
||||
(fetchNuGet { pname = "Cake.Scripting.Abstractions"; version = "0.9.0"; sha256 = "15nqr100crclha0lzgil25j1wn45517gb34059qypj05j8psfmjx"; })
|
||||
(fetchNuGet { pname = "Cake.Scripting.Transport"; version = "0.9.0"; sha256 = "1gpbvframx4dx4mzfh44cib6dfd26q7878vf073m9gv3y43sws7b"; })
|
||||
|
@ -7,11 +10,6 @@
|
|||
(fetchNuGet { pname = "ICSharpCode.Decompiler"; version = "7.1.0.6543"; sha256 = "1xrajs5dcd7aqsg9ibhdcy39yrd8737kknkmqf907n7fqs2jxr46"; })
|
||||
(fetchNuGet { pname = "McMaster.Extensions.CommandLineUtils"; version = "3.1.0"; sha256 = "075n1mfsxwz514r94l8i3ax0wp43c3xb4f9w25a96h6xxnj0k2hd"; })
|
||||
(fetchNuGet { pname = "MediatR"; version = "8.1.0"; sha256 = "0cqx7yfh998xhsfk5pr6229lcjcs1jxxyqz7dwskc9jddl6a2akp"; })
|
||||
(fetchNuGet { pname = "Microsoft.AspNetCore.App.Ref"; version = "6.0.6"; sha256 = "08pjgsq2vcsdy4vgff146izvxq5hpg02a8lvih0wcsgghv1m1qki"; })
|
||||
(fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.linux-arm64"; version = "6.0.0-preview.7.21317.1"; sha256 = "0m1qlzj1d8fhljvc5xk1smvs20h7j2x6jbrjiiiw9pfnfylcr79j"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/825db618-e3eb-4426-ba54-b1d6e6c944d8/nuget/v3/flat2/microsoft.aspnetcore.app.runtime.linux-arm64/6.0.0-preview.7.21317.1/microsoft.aspnetcore.app.runtime.linux-arm64.6.0.0-preview.7.21317.1.nupkg"; })
|
||||
(fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.linux-x64"; version = "6.0.0-preview.7.21317.1"; sha256 = "0jq1vnlqfg2359y0rb8ndf04nrg8f8j1smjwldssb24a92q153iy"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/825db618-e3eb-4426-ba54-b1d6e6c944d8/nuget/v3/flat2/microsoft.aspnetcore.app.runtime.linux-x64/6.0.0-preview.7.21317.1/microsoft.aspnetcore.app.runtime.linux-x64.6.0.0-preview.7.21317.1.nupkg"; })
|
||||
(fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.osx-arm64"; version = "6.0.0-preview.7.21317.1"; sha256 = "16shhyj1429509blhnscxaylbmdsryis1mwxrc4a1j04mf2p2g03"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/825db618-e3eb-4426-ba54-b1d6e6c944d8/nuget/v3/flat2/microsoft.aspnetcore.app.runtime.osx-arm64/6.0.0-preview.7.21317.1/microsoft.aspnetcore.app.runtime.osx-arm64.6.0.0-preview.7.21317.1.nupkg"; })
|
||||
(fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.osx-x64"; version = "6.0.0-preview.7.21317.1"; sha256 = "0pnbc1661r3gnqfidayja5jm9s5sjjb639pgk2c629g6qqvvaisv"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/825db618-e3eb-4426-ba54-b1d6e6c944d8/nuget/v3/flat2/microsoft.aspnetcore.app.runtime.osx-x64/6.0.0-preview.7.21317.1/microsoft.aspnetcore.app.runtime.osx-x64.6.0.0-preview.7.21317.1.nupkg"; })
|
||||
(fetchNuGet { pname = "Microsoft.Bcl.AsyncInterfaces"; version = "1.1.1"; sha256 = "0a1ahssqds2ympr7s4xcxv5y8jgxs7ahd6ah6fbgglj4rki1f1vw"; })
|
||||
(fetchNuGet { pname = "Microsoft.Bcl.AsyncInterfaces"; version = "5.0.0"; sha256 = "0cp5jbax2mf6xr3dqiljzlwi05fv6n9a35z337s92jcljiq674kf"; })
|
||||
(fetchNuGet { pname = "Microsoft.Bcl.AsyncInterfaces"; version = "6.0.0"; sha256 = "15gqy2m14fdlvy1g59207h5kisznm355kbw010gy19vh47z8gpz3"; })
|
||||
|
@ -71,15 +69,6 @@
|
|||
(fetchNuGet { pname = "Microsoft.Extensions.Primitives"; version = "2.0.0"; sha256 = "1xppr5jbny04slyjgngxjdm0maxdh47vq481ps944d7jrfs0p3mb"; })
|
||||
(fetchNuGet { pname = "Microsoft.Extensions.Primitives"; version = "6.0.0"; sha256 = "1kjiw6s4yfz9gm7mx3wkhp06ghnbs95icj9hi505shz9rjrg42q2"; })
|
||||
(fetchNuGet { pname = "Microsoft.NET.StringTools"; version = "1.0.0"; sha256 = "06yakiyzgss399giivfx6xdrnfxqfsvy5fzm90scjanvandv0sdj"; })
|
||||
(fetchNuGet { pname = "Microsoft.NETCore.App.Host.linux-arm64"; version = "6.0.0-preview.7.21317.1"; sha256 = "02pqxy48yzywijrqhzg7ip6jslnkf1w788yyfvk9flxq2anlax9l"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/825db618-e3eb-4426-ba54-b1d6e6c944d8/nuget/v3/flat2/microsoft.netcore.app.host.linux-arm64/6.0.0-preview.7.21317.1/microsoft.netcore.app.host.linux-arm64.6.0.0-preview.7.21317.1.nupkg"; })
|
||||
(fetchNuGet { pname = "Microsoft.NETCore.App.Host.linux-x64"; version = "6.0.0-preview.7.21317.1"; sha256 = "1249kp3bdgf23ayk8qdrdahxzgf5ibiwjqjc42c92vv3gq7976iz"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/825db618-e3eb-4426-ba54-b1d6e6c944d8/nuget/v3/flat2/microsoft.netcore.app.host.linux-x64/6.0.0-preview.7.21317.1/microsoft.netcore.app.host.linux-x64.6.0.0-preview.7.21317.1.nupkg"; })
|
||||
(fetchNuGet { pname = "Microsoft.NETCore.App.Host.osx-arm64"; version = "6.0.0-preview.7.21317.1"; sha256 = "0bhqamkqj697rb4gn47fjh39565pf83fhvp2cxzvkiwl6hvyj5n6"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/825db618-e3eb-4426-ba54-b1d6e6c944d8/nuget/v3/flat2/microsoft.netcore.app.host.osx-arm64/6.0.0-preview.7.21317.1/microsoft.netcore.app.host.osx-arm64.6.0.0-preview.7.21317.1.nupkg"; })
|
||||
(fetchNuGet { pname = "Microsoft.NETCore.App.Host.osx-x64"; version = "6.0.0-preview.7.21317.1"; sha256 = "1a9flva8llnwmn8bmlriflzrcazzzxfr7xm4m27apdc9fmci4kgv"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/825db618-e3eb-4426-ba54-b1d6e6c944d8/nuget/v3/flat2/microsoft.netcore.app.host.osx-x64/6.0.0-preview.7.21317.1/microsoft.netcore.app.host.osx-x64.6.0.0-preview.7.21317.1.nupkg"; })
|
||||
(fetchNuGet { pname = "Microsoft.NETCore.App.Ref"; version = "6.0.6"; sha256 = "146fr1gbs8bb5cbiz94xqddd29bnbi18ljnsd0yw2dqhf3ln0vpf"; })
|
||||
(fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.linux-arm64"; version = "6.0.0-preview.7.21317.1"; sha256 = "0ah6lkvxk81c1xz32jz7x49gwllcw84jssx17g1mq2k49vp5s6ss"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/825db618-e3eb-4426-ba54-b1d6e6c944d8/nuget/v3/flat2/microsoft.netcore.app.runtime.linux-arm64/6.0.0-preview.7.21317.1/microsoft.netcore.app.runtime.linux-arm64.6.0.0-preview.7.21317.1.nupkg"; })
|
||||
(fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.linux-x64"; version = "6.0.0-preview.7.21317.1"; sha256 = "1pq0x10jmxzk0zhky3hq2wc3ffx2mjv57zjq6z75yd8x2yiww153"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/825db618-e3eb-4426-ba54-b1d6e6c944d8/nuget/v3/flat2/microsoft.netcore.app.runtime.linux-x64/6.0.0-preview.7.21317.1/microsoft.netcore.app.runtime.linux-x64.6.0.0-preview.7.21317.1.nupkg"; })
|
||||
(fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.osx-arm64"; version = "6.0.0-preview.7.21317.1"; sha256 = "1nc6rcr5qnh32bsvj78zj2078srp3d4qc0gdd79kqajgp0lckqc2"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/825db618-e3eb-4426-ba54-b1d6e6c944d8/nuget/v3/flat2/microsoft.netcore.app.runtime.osx-arm64/6.0.0-preview.7.21317.1/microsoft.netcore.app.runtime.osx-arm64.6.0.0-preview.7.21317.1.nupkg"; })
|
||||
(fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.osx-x64"; version = "6.0.0-preview.7.21317.1"; sha256 = "13523hyx9s11c84qjmv3miyfgjkyy8879ki3wny2xkfw8ldzm91p"; url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/825db618-e3eb-4426-ba54-b1d6e6c944d8/nuget/v3/flat2/microsoft.netcore.app.runtime.osx-x64/6.0.0-preview.7.21317.1/microsoft.netcore.app.runtime.osx-x64.6.0.0-preview.7.21317.1.nupkg"; })
|
||||
(fetchNuGet { pname = "Microsoft.NETCore.Platforms"; version = "1.0.1"; sha256 = "01al6cfxp68dscl15z7rxfw9zvhm64dncsw09a1vmdkacsa2v6lr"; })
|
||||
(fetchNuGet { pname = "Microsoft.NETCore.Platforms"; version = "1.1.0"; sha256 = "08vh1r12g6ykjygq5d3vq09zylgb84l63k49jc4v8faw9g93iqqm"; })
|
||||
(fetchNuGet { pname = "Microsoft.NETCore.Platforms"; version = "2.0.0"; sha256 = "1fk2fk2639i7nzy58m9dvpdnzql4vb8yl8vr19r2fp8lmj9w2jr0"; })
|
||||
|
|
Loading…
Reference in a new issue