Merge pull request #133588 from zhaofengli/nuget-to-nix

nuget-to-nix: init
This commit is contained in:
Jörg Thalheim 2021-08-15 07:02:43 +01:00 committed by GitHub
commit 52657498f7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 1179 additions and 5781 deletions

View file

@ -0,0 +1,5 @@
{ runCommandNoCC }:
runCommandNoCC "nuget-to-nix" { preferLocalBuild = true; } ''
install -D -m755 ${./nuget-to-nix.sh} $out/bin/nuget-to-nix
''

View file

@ -0,0 +1,23 @@
#!/usr/bin/env bash
set -euo pipefail
if [ $# -eq 0 ]; then
>&2 echo "Usage: $0 [packages directory] > deps.nix"
exit 1
fi
pkgs=$1
echo "{ fetchNuGet }: ["
while read pkg_spec; do
{ read pkg_name; read pkg_version; } < <(
# 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")
pkg_sha256="$(nix-hash --type sha256 --flat --base32 "$(dirname "$pkg_spec")"/*.nupkg)"
echo " (fetchNuGet { name = \"$pkg_name\"; version = \"$pkg_version\"; sha256 = \"$pkg_sha256\"; })"
done < <(find $1 -name '*.nuspec' | sort)
echo "]"

File diff suppressed because it is too large Load diff

View file

@ -1,5 +1,5 @@
#!/usr/bin/env nix-shell #!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl jq common-updater-scripts dotnet-sdk_5 #!nix-shell -i bash -p curl jq common-updater-scripts nuget-to-nix dotnet-sdk_5
set -eo pipefail set -eo pipefail
cd "$(dirname "${BASH_SOURCE[0]}")" cd "$(dirname "${BASH_SOURCE[0]}")"
@ -25,21 +25,7 @@ pushd "$src"
mkdir ./nuget_tmp.packages mkdir ./nuget_tmp.packages
dotnet restore osu.Desktop --packages ./nuget_tmp.packages --runtime linux-x64 dotnet restore osu.Desktop --packages ./nuget_tmp.packages --runtime linux-x64
echo "{ fetchNuGet }: [" >"$deps_file" nuget-to-nix ./nuget_tmp.packages > "$deps_file"
while read pkg_spec; do
{ read pkg_name; read pkg_version; } < <(
# 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")
pkg_sha256="$(nix-hash --type sha256 --flat --base32 "$(dirname "$pkg_spec")"/*.nupkg)"
cat >>"$deps_file" <<EOF
(fetchNuGet {
name = "$pkg_name";
version = "$pkg_version";
sha256 = "$pkg_sha256";
})
EOF
done < <(find ./nuget_tmp.packages -name '*.nuspec' | sort)
echo "]" >>"$deps_file"
popd popd
rm -r "$src" rm -r "$src"

File diff suppressed because it is too large Load diff

View file

@ -1,5 +1,5 @@
#! /usr/bin/env nix-shell #! /usr/bin/env nix-shell
#! nix-shell -i bash -p coreutils gnused curl common-updater-scripts nix-prefetch-git jq dotnet-sdk_5 #! nix-shell -i bash -p coreutils gnused curl common-updater-scripts nuget-to-nix nix-prefetch-git jq dotnet-sdk_5
set -eo pipefail set -eo pipefail
cd "$(dirname "${BASH_SOURCE[0]}")" cd "$(dirname "${BASH_SOURCE[0]}")"
@ -47,21 +47,7 @@ EOF
dotnet restore Ryujinx.sln --configfile ./nuget_tmp.config dotnet restore Ryujinx.sln --configfile ./nuget_tmp.config
echo "{ fetchNuGet }: [" >"$deps_file" nuget-to-nix ./nuget_tmp.packages > "$deps_file"
while read pkg_spec; do
{ read pkg_name; read pkg_version; } < <(
# 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")
pkg_sha256="$(nix-hash --type sha256 --flat --base32 "$(dirname "$pkg_spec")"/*.nupkg)"
cat >>"$deps_file" <<EOF
(fetchNuGet {
name = "$pkg_name";
version = "$pkg_version";
sha256 = "$pkg_sha256";
})
EOF
done < <(find ./nuget_tmp.packages -name '*.nuspec' | sort)
echo "]" >>"$deps_file"
popd popd
rm -r "$src" rm -r "$src"

File diff suppressed because it is too large Load diff

View file

@ -1,5 +1,5 @@
#!/usr/bin/env nix-shell #!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl jq common-updater-scripts dotnetCorePackages.sdk_5_0 gnused nix coreutils findutils #!nix-shell -i bash -p curl jq common-updater-scripts dotnetCorePackages.sdk_5_0 nuget-to-nix gnused nix coreutils findutils
set -euo pipefail set -euo pipefail
@ -31,22 +31,7 @@ pushd "$src"
mkdir ./nuget_tmp.packages mkdir ./nuget_tmp.packages
dotnet restore Jellyfin.Server --packages ./nuget_tmp.packages --runtime linux-x64 dotnet restore Jellyfin.Server --packages ./nuget_tmp.packages --runtime linux-x64
echo "# This file has been generated by the jellyfin updateScript. Do not edit!" >"$nugetDepsFile" nuget-to-nix ./nuget_tmp.packages > "$nugetDepsFile"
echo "{ fetchNuGet }: [" >>"$nugetDepsFile"
while read -r pkg_spec; do
{ read -r pkg_name; read -r pkg_version; } < <(
# 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")
pkg_sha256="$(nix-hash --type sha256 --flat --base32 "$(dirname "$pkg_spec")"/*.nupkg)"
cat >>"$nugetDepsFile" <<EOF
(fetchNuGet {
name = "$pkg_name";
version = "$pkg_version";
sha256 = "$pkg_sha256";
})
EOF
done < <(find ./nuget_tmp.packages -name '*.nuspec' | sort)
echo "]" >>"$nugetDepsFile"
popd popd
rm -r "$src" rm -r "$src"

View file

@ -1,462 +1,94 @@
{ fetchNuGet }: [ { fetchNuGet }: [
(fetchNuGet { (fetchNuGet { name = "AtkSharp"; version = "3.24.24.34"; sha256 = "1jn1vgi9xm0jp7769k6sbdi8d273kigjrsh93i6s4c03hqxv7cqs"; })
name = "AtkSharp"; (fetchNuGet { name = "CairoSharp"; version = "3.24.24.34"; sha256 = "0pydn1k0cam1gclg9sc1sbnmbyzh28qlc5qanyxcylwghink3kgz"; })
version = "3.24.24.34"; (fetchNuGet { name = "Eto.Forms"; version = "2.5.10"; sha256 = "1d71wglk4ixfqfbm6sxmj753x5iwbar8i9zzjy3bh64fy1dn8lz7"; })
sha256 = "1jn1vgi9xm0jp7769k6sbdi8d273kigjrsh93i6s4c03hqxv7cqs"; (fetchNuGet { name = "Eto.Forms"; version = "2.5.11"; sha256 = "0h86jc19wy3ssj7pb34w1h02v92mg29gdipszwjs3y15piy66z3s"; })
}) (fetchNuGet { name = "Eto.Platform.Gtk"; version = "2.5.11"; sha256 = "1s9njz7l9zghrbzli7lbiav5ss3glqf17npj07f3jldd933nb95j"; })
(fetchNuGet { (fetchNuGet { name = "GdkSharp"; version = "3.24.24.34"; sha256 = "0r0x0yib7chwsyrbpvicrfwldwqx5lyqq4p86zaxpmzd6zdaj0x5"; })
name = "CairoSharp"; (fetchNuGet { name = "GioSharp"; version = "3.24.24.34"; sha256 = "02hxvgjd4w9jpzbkk7qf9q9bkvyp5hfzwxfqp10vg5lpl9yl3xpx"; })
version = "3.24.24.34"; (fetchNuGet { name = "GLibSharp"; version = "3.24.24.34"; sha256 = "0kvp033fgdwc8p2abfp5z9pzq66cvwbnjfvr4v4bkpy5s5h181kq"; })
sha256 = "0pydn1k0cam1gclg9sc1sbnmbyzh28qlc5qanyxcylwghink3kgz"; (fetchNuGet { name = "GtkSharp"; version = "3.24.24.34"; sha256 = "0028hzmmqyfx87qqmaf9cgb5psn7gkbmqvixcid67x1d6mzxjicb"; })
}) (fetchNuGet { name = "HidSharpCore"; version = "1.2.1.1"; sha256 = "1zkndglmz0s8rblfhnqcvv90rkq2i7lf4bc380g7z8h1avf2ikll"; })
(fetchNuGet { (fetchNuGet { name = "MessagePack"; version = "2.1.194"; sha256 = "1v2gyd9sd6hppfhlzngmzzhnpr39b95rwrqq0r9zzp480b6vzaj0"; })
name = "Eto.Forms"; (fetchNuGet { name = "MessagePack.Annotations"; version = "2.1.194"; sha256 = "1jkhq3hiy4brvzsywl4p4jb9jrnzs3vmgr3s8fxpb1dzafadw8b0"; })
version = "2.5.10"; (fetchNuGet { name = "Microsoft.Bcl.AsyncInterfaces"; version = "1.1.1"; sha256 = "0a1ahssqds2ympr7s4xcxv5y8jgxs7ahd6ah6fbgglj4rki1f1vw"; })
sha256 = "1d71wglk4ixfqfbm6sxmj753x5iwbar8i9zzjy3bh64fy1dn8lz7"; (fetchNuGet { name = "Microsoft.CSharp"; version = "4.4.1"; sha256 = "0z6d1i6xcf0c00z6rs75rgw4ncs9q2m8amasf6mmbf40fm02ry7g"; })
}) (fetchNuGet { name = "Microsoft.NETCore.Platforms"; version = "1.1.0"; sha256 = "08vh1r12g6ykjygq5d3vq09zylgb84l63k49jc4v8faw9g93iqqm"; })
(fetchNuGet { (fetchNuGet { name = "Microsoft.NETCore.Platforms"; version = "1.1.1"; sha256 = "164wycgng4mi9zqi2pnsf1pq6gccbqvw6ib916mqizgjmd8f44pj"; })
name = "Eto.Forms"; (fetchNuGet { name = "Microsoft.NETCore.Platforms"; version = "3.0.0"; sha256 = "1bk8r4r3ihmi6322jmcag14jmw11mjqys202azqjzglcx59pxh51"; })
version = "2.5.11"; (fetchNuGet { name = "Microsoft.NETCore.Targets"; version = "1.1.0"; sha256 = "193xwf33fbm0ni3idxzbr5fdq3i2dlfgihsac9jj7whj0gd902nh"; })
sha256 = "0h86jc19wy3ssj7pb34w1h02v92mg29gdipszwjs3y15piy66z3s"; (fetchNuGet { name = "Microsoft.VisualStudio.Threading"; version = "16.7.56"; sha256 = "13x0xrsjxd86clf9cjjwmpzlyp8pkrf13riya7igs8zy93zw2qap"; })
}) (fetchNuGet { name = "Microsoft.VisualStudio.Threading.Analyzers"; version = "16.7.56"; sha256 = "04v9df0k7bsc0rzgkw4mnvi43pdrh42vk6xdcwn9m6im33m0nnz2"; })
(fetchNuGet { (fetchNuGet { name = "Microsoft.VisualStudio.Validation"; version = "15.5.31"; sha256 = "1ah99rn922qa0sd2k3h64m324f2r32pw8cn4cfihgvwx4qdrpmgw"; })
name = "Eto.Platform.Gtk"; (fetchNuGet { name = "Microsoft.Win32.Primitives"; version = "4.3.0"; sha256 = "0j0c1wj4ndj21zsgivsc24whiya605603kxrbiw6wkfdync464wq"; })
version = "2.5.11"; (fetchNuGet { name = "Microsoft.Win32.Registry"; version = "4.6.0"; sha256 = "0i4y782yrqqyx85pg597m20gm0v126w0j9ddk5z7xb3crx4z9f2s"; })
sha256 = "1s9njz7l9zghrbzli7lbiav5ss3glqf17npj07f3jldd933nb95j"; (fetchNuGet { name = "Nerdbank.Streams"; version = "2.6.77"; sha256 = "13dnfwxa8syx7vfjmd5pcrqz31k0q8y3mmh6yz6bmljhjri65q5c"; })
}) (fetchNuGet { name = "Newtonsoft.Json"; version = "12.0.2"; sha256 = "0w2fbji1smd2y7x25qqibf1qrznmv4s6s0jvrbvr6alb7mfyqvh5"; })
(fetchNuGet { (fetchNuGet { name = "Octokit"; version = "0.50.0"; sha256 = "1ignj5i6a1c19qqrw00wlr9fdjmwrxkxz7gdxj0x653w84gbv7qq"; })
name = "GdkSharp"; (fetchNuGet { name = "PangoSharp"; version = "3.24.24.34"; sha256 = "1r0h14cklglfpv1lhv93cxmzi2w7d5s03gzpq3j5dmrz43flg9zw"; })
version = "3.24.24.34"; (fetchNuGet { name = "runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.2"; sha256 = "0rwpqngkqiapqc5c2cpkj7idhngrgss5qpnqg0yh40mbyflcxf8i"; })
sha256 = "0r0x0yib7chwsyrbpvicrfwldwqx5lyqq4p86zaxpmzd6zdaj0x5"; (fetchNuGet { name = "runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.2"; sha256 = "1n06gxwlinhs0w7s8a94r1q3lwqzvynxwd3mp10ws9bg6gck8n4r"; })
}) (fetchNuGet { name = "runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.2"; sha256 = "0404wqrc7f2yc0wxv71y3nnybvqx8v4j9d47hlscxy759a525mc3"; })
(fetchNuGet { (fetchNuGet { name = "runtime.native.System"; version = "4.3.0"; sha256 = "15hgf6zaq9b8br2wi1i3x0zvmk410nlmsmva9p0bbg73v6hml5k4"; })
name = "GioSharp"; (fetchNuGet { name = "runtime.native.System.Net.Http"; version = "4.3.0"; sha256 = "1n6rgz5132lcibbch1qlf0g9jk60r0kqv087hxc0lisy50zpm7kk"; })
version = "3.24.24.34"; (fetchNuGet { name = "runtime.native.System.Security.Cryptography.Apple"; version = "4.3.0"; sha256 = "1b61p6gw1m02cc1ry996fl49liiwky6181dzr873g9ds92zl326q"; })
sha256 = "02hxvgjd4w9jpzbkk7qf9q9bkvyp5hfzwxfqp10vg5lpl9yl3xpx"; (fetchNuGet { name = "runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.2"; sha256 = "0zy5r25jppz48i2bkg8b9lfig24xixg6nm3xyr1379zdnqnpm8f6"; })
}) (fetchNuGet { name = "runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.2"; sha256 = "096ch4n4s8k82xga80lfmpimpzahd2ip1mgwdqgar0ywbbl6x438"; })
(fetchNuGet { (fetchNuGet { name = "runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.2"; sha256 = "1dm8fifl7rf1gy7lnwln78ch4rw54g0pl5g1c189vawavll7p6rj"; })
name = "GLibSharp"; (fetchNuGet { name = "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.Apple"; version = "4.3.0"; sha256 = "10yc8jdrwgcl44b4g93f1ds76b176bajd3zqi2faf5rvh1vy9smi"; })
version = "3.24.24.34"; (fetchNuGet { name = "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.2"; sha256 = "1m9z1k9kzva9n9kwinqxl97x2vgl79qhqjlv17k9s2ymcyv2bwr6"; })
sha256 = "0kvp033fgdwc8p2abfp5z9pzq66cvwbnjfvr4v4bkpy5s5h181kq"; (fetchNuGet { name = "runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.2"; sha256 = "1cpx56mcfxz7cpn57wvj18sjisvzq8b5vd9rw16ihd2i6mcp3wa1"; })
}) (fetchNuGet { name = "runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.2"; sha256 = "15gsm1a8jdmgmf8j5v1slfz8ks124nfdhk2vxs2rw3asrxalg8hi"; })
(fetchNuGet { (fetchNuGet { name = "runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.2"; sha256 = "0q0n5q1r1wnqmr5i5idsrd9ywl33k0js4pngkwq9p368mbxp8x1w"; })
name = "GtkSharp"; (fetchNuGet { name = "runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.2"; sha256 = "1x0g58pbpjrmj2x2qw17rdwwnrcl0wvim2hdwz48lixvwvp22n9c"; })
version = "3.24.24.34"; (fetchNuGet { name = "SharpZipLib"; version = "1.3.1"; sha256 = "09zypjfils38143da507s5fi4hzvdlz32wfav219hksnpl35y8x0"; })
sha256 = "0028hzmmqyfx87qqmaf9cgb5psn7gkbmqvixcid67x1d6mzxjicb"; (fetchNuGet { name = "StreamJsonRpc"; version = "2.6.121"; sha256 = "0xzvpk17w2skndzdg47j7gkrrvw6521db4mv8lc3v8hm97vs9m76"; })
}) (fetchNuGet { name = "System.Collections"; version = "4.3.0"; sha256 = "19r4y64dqyrq6k4706dnyhhw7fs24kpp3awak7whzss39dakpxk9"; })
(fetchNuGet { (fetchNuGet { name = "System.Collections.Concurrent"; version = "4.3.0"; sha256 = "0wi10md9aq33jrkh2c24wr2n9hrpyamsdhsxdcnf43b7y86kkii8"; })
name = "HidSharpCore"; (fetchNuGet { name = "System.Collections.Immutable"; version = "1.7.1"; sha256 = "1nh4nlxfc7lbnbl86wwk1a3jwl6myz5j6hvgh5sp4krim9901hsq"; })
version = "1.2.1.1"; (fetchNuGet { name = "System.CommandLine"; version = "2.0.0-beta1.20253.1"; sha256 = "16saf1fm9q80bb624fkqz0ksrwpnbw9617d7xg3jib7a2wgagm2r"; })
sha256 = "1zkndglmz0s8rblfhnqcvv90rkq2i7lf4bc380g7z8h1avf2ikll"; (fetchNuGet { name = "System.ComponentModel.Annotations"; version = "4.7.0"; sha256 = "06x1m46ddxj0ng28d7gry9gjkqdg2kp89jyf480g5gznyybbs49z"; })
}) (fetchNuGet { name = "System.Diagnostics.Debug"; version = "4.3.0"; sha256 = "00yjlf19wjydyr6cfviaph3vsjzg3d5nvnya26i2fvfg53sknh3y"; })
(fetchNuGet { (fetchNuGet { name = "System.Diagnostics.DiagnosticSource"; version = "4.3.0"; sha256 = "0z6m3pbiy0qw6rn3n209rrzf9x1k4002zh90vwcrsym09ipm2liq"; })
name = "MessagePack.Annotations"; (fetchNuGet { name = "System.Diagnostics.Tracing"; version = "4.3.0"; sha256 = "1m3bx6c2s958qligl67q7grkwfz3w53hpy7nc97mh6f7j5k168c4"; })
version = "2.1.194"; (fetchNuGet { name = "System.Globalization"; version = "4.3.0"; sha256 = "1cp68vv683n6ic2zqh2s1fn4c2sd87g5hpp6l4d4nj4536jz98ki"; })
sha256 = "1jkhq3hiy4brvzsywl4p4jb9jrnzs3vmgr3s8fxpb1dzafadw8b0"; (fetchNuGet { name = "System.Globalization.Calendars"; version = "4.3.0"; sha256 = "1xwl230bkakzzkrggy1l1lxmm3xlhk4bq2pkv790j5lm8g887lxq"; })
}) (fetchNuGet { name = "System.Globalization.Extensions"; version = "4.3.0"; sha256 = "02a5zfxavhv3jd437bsncbhd2fp1zv4gxzakp1an9l6kdq1mcqls"; })
(fetchNuGet { (fetchNuGet { name = "System.IO"; version = "4.3.0"; sha256 = "05l9qdrzhm4s5dixmx68kxwif4l99ll5gqmh7rqgw554fx0agv5f"; })
name = "MessagePack"; (fetchNuGet { name = "System.IO.FileSystem"; version = "4.3.0"; sha256 = "0z2dfrbra9i6y16mm9v1v6k47f0fm617vlb7s5iybjjsz6g1ilmw"; })
version = "2.1.194"; (fetchNuGet { name = "System.IO.FileSystem.Primitives"; version = "4.3.0"; sha256 = "0j6ndgglcf4brg2lz4wzsh1av1gh8xrzdsn9f0yznskhqn1xzj9c"; })
sha256 = "1v2gyd9sd6hppfhlzngmzzhnpr39b95rwrqq0r9zzp480b6vzaj0"; (fetchNuGet { name = "System.IO.Pipelines"; version = "4.7.2"; sha256 = "16v4qaypm72cfsfqr8z3k6yrpzn0m3apgkh6aljfwpycdk150sf9"; })
}) (fetchNuGet { name = "System.Linq"; version = "4.3.0"; sha256 = "1w0gmba695rbr80l1k2h4mrwzbzsyfl2z4klmpbsvsg5pm4a56s7"; })
(fetchNuGet { (fetchNuGet { name = "System.Memory"; version = "4.5.3"; sha256 = "0naqahm3wljxb5a911d37mwjqjdxv9l0b49p5dmfyijvni2ppy8a"; })
name = "Microsoft.Bcl.AsyncInterfaces"; (fetchNuGet { name = "System.Memory"; version = "4.5.4"; sha256 = "14gbbs22mcxwggn0fcfs1b062521azb9fbb7c113x0mq6dzq9h6y"; })
version = "1.1.1"; (fetchNuGet { name = "System.Net.Http"; version = "4.3.4"; sha256 = "0kdp31b8819v88l719j6my0yas6myv9d1viql3qz5577mv819jhl"; })
sha256 = "0a1ahssqds2ympr7s4xcxv5y8jgxs7ahd6ah6fbgglj4rki1f1vw"; (fetchNuGet { name = "System.Net.Primitives"; version = "4.3.0"; sha256 = "0c87k50rmdgmxx7df2khd9qj7q35j9rzdmm2572cc55dygmdk3ii"; })
}) (fetchNuGet { name = "System.Net.WebSockets"; version = "4.3.0"; sha256 = "1gfj800078kggcgl0xyl00a6y5k4wwh2k2qm69rjy22wbmq7fy4p"; })
(fetchNuGet { (fetchNuGet { name = "System.Reflection"; version = "4.3.0"; sha256 = "0xl55k0mw8cd8ra6dxzh974nxif58s3k1rjv1vbd7gjbjr39j11m"; })
name = "Microsoft.CSharp"; (fetchNuGet { name = "System.Reflection.Emit"; version = "4.7.0"; sha256 = "121l1z2ypwg02yz84dy6gr82phpys0njk7yask3sihgy214w43qp"; })
version = "4.4.1"; (fetchNuGet { name = "System.Reflection.Emit.Lightweight"; version = "4.6.0"; sha256 = "0hry2k6b7kicg4zxnq0hhn0ys52711pxy7l9v5sp7gvp9cicwpgp"; })
sha256 = "0z6d1i6xcf0c00z6rs75rgw4ncs9q2m8amasf6mmbf40fm02ry7g"; (fetchNuGet { name = "System.Reflection.Primitives"; version = "4.3.0"; sha256 = "04xqa33bld78yv5r93a8n76shvc8wwcdgr1qvvjh959g3rc31276"; })
}) (fetchNuGet { name = "System.Resources.ResourceManager"; version = "4.3.0"; sha256 = "0sjqlzsryb0mg4y4xzf35xi523s4is4hz9q4qgdvlvgivl7qxn49"; })
(fetchNuGet { (fetchNuGet { name = "System.Runtime"; version = "4.3.0"; sha256 = "066ixvgbf2c929kgknshcxqj6539ax7b9m570cp8n179cpfkapz7"; })
name = "Microsoft.NETCore.Platforms"; (fetchNuGet { name = "System.Runtime.CompilerServices.Unsafe"; version = "4.5.2"; sha256 = "1vz4275fjij8inf31np78hw50al8nqkngk04p3xv5n4fcmf1grgi"; })
version = "1.1.0"; (fetchNuGet { name = "System.Runtime.CompilerServices.Unsafe"; version = "4.7.1"; sha256 = "119br3pd85lq8zcgh4f60jzmv1g976q1kdgi3hvqdlhfbw6siz2j"; })
sha256 = "08vh1r12g6ykjygq5d3vq09zylgb84l63k49jc4v8faw9g93iqqm"; (fetchNuGet { name = "System.Runtime.Extensions"; version = "4.3.0"; sha256 = "1ykp3dnhwvm48nap8q23893hagf665k0kn3cbgsqpwzbijdcgc60"; })
}) (fetchNuGet { name = "System.Runtime.Handles"; version = "4.3.0"; sha256 = "0sw2gfj2xr7sw9qjn0j3l9yw07x73lcs97p8xfc9w1x9h5g5m7i8"; })
(fetchNuGet { (fetchNuGet { name = "System.Runtime.InteropServices"; version = "4.3.0"; sha256 = "00hywrn4g7hva1b2qri2s6rabzwgxnbpw9zfxmz28z09cpwwgh7j"; })
name = "Microsoft.NETCore.Platforms"; (fetchNuGet { name = "System.Runtime.Numerics"; version = "4.3.0"; sha256 = "19rav39sr5dky7afygh309qamqqmi9kcwvz3i0c5700v0c5cg61z"; })
version = "1.1.1"; (fetchNuGet { name = "System.Security.AccessControl"; version = "4.6.0"; sha256 = "1wl1dyghi0qhpap1vgfhg2ybdyyhy9vc2a7dpm1xb30vfgmlkjmf"; })
sha256 = "164wycgng4mi9zqi2pnsf1pq6gccbqvw6ib916mqizgjmd8f44pj"; (fetchNuGet { name = "System.Security.Cryptography.Algorithms"; version = "4.3.0"; sha256 = "03sq183pfl5kp7gkvq77myv7kbpdnq3y0xj7vi4q1kaw54sny0ml"; })
}) (fetchNuGet { name = "System.Security.Cryptography.Cng"; version = "4.3.0"; sha256 = "1k468aswafdgf56ab6yrn7649kfqx2wm9aslywjam1hdmk5yypmv"; })
(fetchNuGet { (fetchNuGet { name = "System.Security.Cryptography.Csp"; version = "4.3.0"; sha256 = "1x5wcrddf2s3hb8j78cry7yalca4lb5vfnkrysagbn6r9x6xvrx1"; })
name = "Microsoft.NETCore.Platforms"; (fetchNuGet { name = "System.Security.Cryptography.Encoding"; version = "4.3.0"; sha256 = "1jr6w70igqn07k5zs1ph6xja97hxnb3mqbspdrff6cvssgrixs32"; })
version = "3.0.0"; (fetchNuGet { name = "System.Security.Cryptography.OpenSsl"; version = "4.3.0"; sha256 = "0givpvvj8yc7gv4lhb6s1prq6p2c4147204a0wib89inqzd87gqc"; })
sha256 = "1bk8r4r3ihmi6322jmcag14jmw11mjqys202azqjzglcx59pxh51"; (fetchNuGet { name = "System.Security.Cryptography.Primitives"; version = "4.3.0"; sha256 = "0pyzncsv48zwly3lw4f2dayqswcfvdwq2nz0dgwmi7fj3pn64wby"; })
}) (fetchNuGet { name = "System.Security.Cryptography.X509Certificates"; version = "4.3.0"; sha256 = "0valjcz5wksbvijylxijjxb1mp38mdhv03r533vnx1q3ikzdav9h"; })
(fetchNuGet { (fetchNuGet { name = "System.Security.Principal.Windows"; version = "4.6.0"; sha256 = "1jmfzfz1n8hp63s5lja5xxpzkinbp6g59l3km9h8avjiisdrg5wm"; })
name = "Microsoft.NETCore.Targets"; (fetchNuGet { name = "System.Text.Encoding"; version = "4.3.0"; sha256 = "1f04lkir4iladpp51sdgmis9dj4y8v08cka0mbmsy0frc9a4gjqr"; })
version = "1.1.0"; (fetchNuGet { name = "System.Threading"; version = "4.3.0"; sha256 = "0rw9wfamvhayp5zh3j7p1yfmx9b5khbf4q50d8k5rk993rskfd34"; })
sha256 = "193xwf33fbm0ni3idxzbr5fdq3i2dlfgihsac9jj7whj0gd902nh"; (fetchNuGet { name = "System.Threading.Tasks"; version = "4.3.0"; sha256 = "134z3v9abw3a6jsw17xl3f6hqjpak5l682k2vz39spj4kmydg6k7"; })
}) (fetchNuGet { name = "System.Threading.Tasks.Dataflow"; version = "4.11.1"; sha256 = "09fbfsiay1xcbpvnq2j38b6mb2scvf0s8mpn78bcqsldidg7k2vw"; })
(fetchNuGet { (fetchNuGet { name = "System.Threading.Tasks.Extensions"; version = "4.5.4"; sha256 = "0y6ncasgfcgnjrhynaf0lwpkpkmv4a07sswwkwbwb5h7riisj153"; })
name = "Microsoft.VisualStudio.Threading.Analyzers"; (fetchNuGet { name = "WaylandNET"; version = "0.2.0"; sha256 = "1qjpvra08vdqdw4j1gamz6451x5sd5r1j86lsvrl8akq4nymfr8k"; })
version = "16.7.56";
sha256 = "04v9df0k7bsc0rzgkw4mnvi43pdrh42vk6xdcwn9m6im33m0nnz2";
})
(fetchNuGet {
name = "Microsoft.VisualStudio.Threading";
version = "16.7.56";
sha256 = "13x0xrsjxd86clf9cjjwmpzlyp8pkrf13riya7igs8zy93zw2qap";
})
(fetchNuGet {
name = "Microsoft.VisualStudio.Validation";
version = "15.5.31";
sha256 = "1ah99rn922qa0sd2k3h64m324f2r32pw8cn4cfihgvwx4qdrpmgw";
})
(fetchNuGet {
name = "Microsoft.Win32.Primitives";
version = "4.3.0";
sha256 = "0j0c1wj4ndj21zsgivsc24whiya605603kxrbiw6wkfdync464wq";
})
(fetchNuGet {
name = "Microsoft.Win32.Registry";
version = "4.6.0";
sha256 = "0i4y782yrqqyx85pg597m20gm0v126w0j9ddk5z7xb3crx4z9f2s";
})
(fetchNuGet {
name = "Nerdbank.Streams";
version = "2.6.77";
sha256 = "13dnfwxa8syx7vfjmd5pcrqz31k0q8y3mmh6yz6bmljhjri65q5c";
})
(fetchNuGet {
name = "Newtonsoft.Json";
version = "12.0.2";
sha256 = "0w2fbji1smd2y7x25qqibf1qrznmv4s6s0jvrbvr6alb7mfyqvh5";
})
(fetchNuGet {
name = "Octokit";
version = "0.50.0";
sha256 = "1ignj5i6a1c19qqrw00wlr9fdjmwrxkxz7gdxj0x653w84gbv7qq";
})
(fetchNuGet {
name = "PangoSharp";
version = "3.24.24.34";
sha256 = "1r0h14cklglfpv1lhv93cxmzi2w7d5s03gzpq3j5dmrz43flg9zw";
})
(fetchNuGet {
name = "runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl";
version = "4.3.2";
sha256 = "0rwpqngkqiapqc5c2cpkj7idhngrgss5qpnqg0yh40mbyflcxf8i";
})
(fetchNuGet {
name = "runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl";
version = "4.3.2";
sha256 = "1n06gxwlinhs0w7s8a94r1q3lwqzvynxwd3mp10ws9bg6gck8n4r";
})
(fetchNuGet {
name = "runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl";
version = "4.3.2";
sha256 = "0404wqrc7f2yc0wxv71y3nnybvqx8v4j9d47hlscxy759a525mc3";
})
(fetchNuGet {
name = "runtime.native.System.Net.Http";
version = "4.3.0";
sha256 = "1n6rgz5132lcibbch1qlf0g9jk60r0kqv087hxc0lisy50zpm7kk";
})
(fetchNuGet {
name = "runtime.native.System.Security.Cryptography.Apple";
version = "4.3.0";
sha256 = "1b61p6gw1m02cc1ry996fl49liiwky6181dzr873g9ds92zl326q";
})
(fetchNuGet {
name = "runtime.native.System.Security.Cryptography.OpenSsl";
version = "4.3.2";
sha256 = "0zy5r25jppz48i2bkg8b9lfig24xixg6nm3xyr1379zdnqnpm8f6";
})
(fetchNuGet {
name = "runtime.native.System";
version = "4.3.0";
sha256 = "15hgf6zaq9b8br2wi1i3x0zvmk410nlmsmva9p0bbg73v6hml5k4";
})
(fetchNuGet {
name = "runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl";
version = "4.3.2";
sha256 = "096ch4n4s8k82xga80lfmpimpzahd2ip1mgwdqgar0ywbbl6x438";
})
(fetchNuGet {
name = "runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl";
version = "4.3.2";
sha256 = "1dm8fifl7rf1gy7lnwln78ch4rw54g0pl5g1c189vawavll7p6rj";
})
(fetchNuGet {
name = "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.Apple";
version = "4.3.0";
sha256 = "10yc8jdrwgcl44b4g93f1ds76b176bajd3zqi2faf5rvh1vy9smi";
})
(fetchNuGet {
name = "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl";
version = "4.3.2";
sha256 = "1m9z1k9kzva9n9kwinqxl97x2vgl79qhqjlv17k9s2ymcyv2bwr6";
})
(fetchNuGet {
name = "runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl";
version = "4.3.2";
sha256 = "1cpx56mcfxz7cpn57wvj18sjisvzq8b5vd9rw16ihd2i6mcp3wa1";
})
(fetchNuGet {
name = "runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl";
version = "4.3.2";
sha256 = "15gsm1a8jdmgmf8j5v1slfz8ks124nfdhk2vxs2rw3asrxalg8hi";
})
(fetchNuGet {
name = "runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl";
version = "4.3.2";
sha256 = "0q0n5q1r1wnqmr5i5idsrd9ywl33k0js4pngkwq9p368mbxp8x1w";
})
(fetchNuGet {
name = "runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl";
version = "4.3.2";
sha256 = "1x0g58pbpjrmj2x2qw17rdwwnrcl0wvim2hdwz48lixvwvp22n9c";
})
(fetchNuGet {
name = "SharpZipLib";
version = "1.3.1";
sha256 = "09zypjfils38143da507s5fi4hzvdlz32wfav219hksnpl35y8x0";
})
(fetchNuGet {
name = "StreamJsonRpc";
version = "2.6.121";
sha256 = "0xzvpk17w2skndzdg47j7gkrrvw6521db4mv8lc3v8hm97vs9m76";
})
(fetchNuGet {
name = "System.Collections.Concurrent";
version = "4.3.0";
sha256 = "0wi10md9aq33jrkh2c24wr2n9hrpyamsdhsxdcnf43b7y86kkii8";
})
(fetchNuGet {
name = "System.Collections.Immutable";
version = "1.7.1";
sha256 = "1nh4nlxfc7lbnbl86wwk1a3jwl6myz5j6hvgh5sp4krim9901hsq";
})
(fetchNuGet {
name = "System.Collections";
version = "4.3.0";
sha256 = "19r4y64dqyrq6k4706dnyhhw7fs24kpp3awak7whzss39dakpxk9";
})
(fetchNuGet {
name = "System.CommandLine";
version = "2.0.0-beta1.20253.1";
sha256 = "16saf1fm9q80bb624fkqz0ksrwpnbw9617d7xg3jib7a2wgagm2r";
})
(fetchNuGet {
name = "System.ComponentModel.Annotations";
version = "4.7.0";
sha256 = "06x1m46ddxj0ng28d7gry9gjkqdg2kp89jyf480g5gznyybbs49z";
})
(fetchNuGet {
name = "System.Diagnostics.Debug";
version = "4.3.0";
sha256 = "00yjlf19wjydyr6cfviaph3vsjzg3d5nvnya26i2fvfg53sknh3y";
})
(fetchNuGet {
name = "System.Diagnostics.DiagnosticSource";
version = "4.3.0";
sha256 = "0z6m3pbiy0qw6rn3n209rrzf9x1k4002zh90vwcrsym09ipm2liq";
})
(fetchNuGet {
name = "System.Diagnostics.Tracing";
version = "4.3.0";
sha256 = "1m3bx6c2s958qligl67q7grkwfz3w53hpy7nc97mh6f7j5k168c4";
})
(fetchNuGet {
name = "System.Globalization.Calendars";
version = "4.3.0";
sha256 = "1xwl230bkakzzkrggy1l1lxmm3xlhk4bq2pkv790j5lm8g887lxq";
})
(fetchNuGet {
name = "System.Globalization.Extensions";
version = "4.3.0";
sha256 = "02a5zfxavhv3jd437bsncbhd2fp1zv4gxzakp1an9l6kdq1mcqls";
})
(fetchNuGet {
name = "System.Globalization";
version = "4.3.0";
sha256 = "1cp68vv683n6ic2zqh2s1fn4c2sd87g5hpp6l4d4nj4536jz98ki";
})
(fetchNuGet {
name = "System.IO.FileSystem.Primitives";
version = "4.3.0";
sha256 = "0j6ndgglcf4brg2lz4wzsh1av1gh8xrzdsn9f0yznskhqn1xzj9c";
})
(fetchNuGet {
name = "System.IO.FileSystem";
version = "4.3.0";
sha256 = "0z2dfrbra9i6y16mm9v1v6k47f0fm617vlb7s5iybjjsz6g1ilmw";
})
(fetchNuGet {
name = "System.IO.Pipelines";
version = "4.7.2";
sha256 = "16v4qaypm72cfsfqr8z3k6yrpzn0m3apgkh6aljfwpycdk150sf9";
})
(fetchNuGet {
name = "System.IO";
version = "4.3.0";
sha256 = "05l9qdrzhm4s5dixmx68kxwif4l99ll5gqmh7rqgw554fx0agv5f";
})
(fetchNuGet {
name = "System.Linq";
version = "4.3.0";
sha256 = "1w0gmba695rbr80l1k2h4mrwzbzsyfl2z4klmpbsvsg5pm4a56s7";
})
(fetchNuGet {
name = "System.Memory";
version = "4.5.3";
sha256 = "0naqahm3wljxb5a911d37mwjqjdxv9l0b49p5dmfyijvni2ppy8a";
})
(fetchNuGet {
name = "System.Memory";
version = "4.5.4";
sha256 = "14gbbs22mcxwggn0fcfs1b062521azb9fbb7c113x0mq6dzq9h6y";
})
(fetchNuGet {
name = "System.Net.Http";
version = "4.3.4";
sha256 = "0kdp31b8819v88l719j6my0yas6myv9d1viql3qz5577mv819jhl";
})
(fetchNuGet {
name = "System.Net.Primitives";
version = "4.3.0";
sha256 = "0c87k50rmdgmxx7df2khd9qj7q35j9rzdmm2572cc55dygmdk3ii";
})
(fetchNuGet {
name = "System.Net.WebSockets";
version = "4.3.0";
sha256 = "1gfj800078kggcgl0xyl00a6y5k4wwh2k2qm69rjy22wbmq7fy4p";
})
(fetchNuGet {
name = "System.Reflection.Emit.Lightweight";
version = "4.6.0";
sha256 = "0hry2k6b7kicg4zxnq0hhn0ys52711pxy7l9v5sp7gvp9cicwpgp";
})
(fetchNuGet {
name = "System.Reflection.Emit";
version = "4.7.0";
sha256 = "121l1z2ypwg02yz84dy6gr82phpys0njk7yask3sihgy214w43qp";
})
(fetchNuGet {
name = "System.Reflection.Primitives";
version = "4.3.0";
sha256 = "04xqa33bld78yv5r93a8n76shvc8wwcdgr1qvvjh959g3rc31276";
})
(fetchNuGet {
name = "System.Reflection";
version = "4.3.0";
sha256 = "0xl55k0mw8cd8ra6dxzh974nxif58s3k1rjv1vbd7gjbjr39j11m";
})
(fetchNuGet {
name = "System.Resources.ResourceManager";
version = "4.3.0";
sha256 = "0sjqlzsryb0mg4y4xzf35xi523s4is4hz9q4qgdvlvgivl7qxn49";
})
(fetchNuGet {
name = "System.Runtime.CompilerServices.Unsafe";
version = "4.5.2";
sha256 = "1vz4275fjij8inf31np78hw50al8nqkngk04p3xv5n4fcmf1grgi";
})
(fetchNuGet {
name = "System.Runtime.CompilerServices.Unsafe";
version = "4.7.1";
sha256 = "119br3pd85lq8zcgh4f60jzmv1g976q1kdgi3hvqdlhfbw6siz2j";
})
(fetchNuGet {
name = "System.Runtime.Extensions";
version = "4.3.0";
sha256 = "1ykp3dnhwvm48nap8q23893hagf665k0kn3cbgsqpwzbijdcgc60";
})
(fetchNuGet {
name = "System.Runtime.Handles";
version = "4.3.0";
sha256 = "0sw2gfj2xr7sw9qjn0j3l9yw07x73lcs97p8xfc9w1x9h5g5m7i8";
})
(fetchNuGet {
name = "System.Runtime.InteropServices";
version = "4.3.0";
sha256 = "00hywrn4g7hva1b2qri2s6rabzwgxnbpw9zfxmz28z09cpwwgh7j";
})
(fetchNuGet {
name = "System.Runtime.Numerics";
version = "4.3.0";
sha256 = "19rav39sr5dky7afygh309qamqqmi9kcwvz3i0c5700v0c5cg61z";
})
(fetchNuGet {
name = "System.Runtime";
version = "4.3.0";
sha256 = "066ixvgbf2c929kgknshcxqj6539ax7b9m570cp8n179cpfkapz7";
})
(fetchNuGet {
name = "System.Security.AccessControl";
version = "4.6.0";
sha256 = "1wl1dyghi0qhpap1vgfhg2ybdyyhy9vc2a7dpm1xb30vfgmlkjmf";
})
(fetchNuGet {
name = "System.Security.Cryptography.Algorithms";
version = "4.3.0";
sha256 = "03sq183pfl5kp7gkvq77myv7kbpdnq3y0xj7vi4q1kaw54sny0ml";
})
(fetchNuGet {
name = "System.Security.Cryptography.Cng";
version = "4.3.0";
sha256 = "1k468aswafdgf56ab6yrn7649kfqx2wm9aslywjam1hdmk5yypmv";
})
(fetchNuGet {
name = "System.Security.Cryptography.Csp";
version = "4.3.0";
sha256 = "1x5wcrddf2s3hb8j78cry7yalca4lb5vfnkrysagbn6r9x6xvrx1";
})
(fetchNuGet {
name = "System.Security.Cryptography.Encoding";
version = "4.3.0";
sha256 = "1jr6w70igqn07k5zs1ph6xja97hxnb3mqbspdrff6cvssgrixs32";
})
(fetchNuGet {
name = "System.Security.Cryptography.OpenSsl";
version = "4.3.0";
sha256 = "0givpvvj8yc7gv4lhb6s1prq6p2c4147204a0wib89inqzd87gqc";
})
(fetchNuGet {
name = "System.Security.Cryptography.Primitives";
version = "4.3.0";
sha256 = "0pyzncsv48zwly3lw4f2dayqswcfvdwq2nz0dgwmi7fj3pn64wby";
})
(fetchNuGet {
name = "System.Security.Cryptography.X509Certificates";
version = "4.3.0";
sha256 = "0valjcz5wksbvijylxijjxb1mp38mdhv03r533vnx1q3ikzdav9h";
})
(fetchNuGet {
name = "System.Security.Principal.Windows";
version = "4.6.0";
sha256 = "1jmfzfz1n8hp63s5lja5xxpzkinbp6g59l3km9h8avjiisdrg5wm";
})
(fetchNuGet {
name = "System.Text.Encoding";
version = "4.3.0";
sha256 = "1f04lkir4iladpp51sdgmis9dj4y8v08cka0mbmsy0frc9a4gjqr";
})
(fetchNuGet {
name = "System.Threading.Tasks.Dataflow";
version = "4.11.1";
sha256 = "09fbfsiay1xcbpvnq2j38b6mb2scvf0s8mpn78bcqsldidg7k2vw";
})
(fetchNuGet {
name = "System.Threading.Tasks.Extensions";
version = "4.5.4";
sha256 = "0y6ncasgfcgnjrhynaf0lwpkpkmv4a07sswwkwbwb5h7riisj153";
})
(fetchNuGet {
name = "System.Threading.Tasks";
version = "4.3.0";
sha256 = "134z3v9abw3a6jsw17xl3f6hqjpak5l682k2vz39spj4kmydg6k7";
})
(fetchNuGet {
name = "System.Threading";
version = "4.3.0";
sha256 = "0rw9wfamvhayp5zh3j7p1yfmx9b5khbf4q50d8k5rk993rskfd34";
})
(fetchNuGet {
name = "WaylandNET";
version = "0.2.0";
sha256 = "1qjpvra08vdqdw4j1gamz6451x5sd5r1j86lsvrl8akq4nymfr8k";
})
] ]

View file

@ -5,6 +5,7 @@ with pkgs;
mkShell { mkShell {
packages = [ packages = [
common-updater-scripts common-updater-scripts
nuget-to-nix
curl curl
dotnetCorePackages.sdk_5_0 dotnetCorePackages.sdk_5_0
jq jq

View file

@ -52,21 +52,7 @@ for project in OpenTabletDriver.{Console,Daemon,UX.Gtk}; do
dotnet restore $project --configfile ./nuget_tmp.config dotnet restore $project --configfile ./nuget_tmp.config
done done
echo "{ fetchNuGet }: [" >"$deps_file" nuget-to-nix ./nuget_tmp.packages > "$deps_file"
while read pkg_spec; do
{ read pkg_name; read pkg_version; } < <(
# 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")
pkg_sha256="$(nix-hash --type sha256 --flat --base32 "$(dirname "$pkg_spec")"/*.nupkg)"
cat >>"$deps_file" <<EOF
(fetchNuGet {
name = "$pkg_name";
version = "$pkg_version";
sha256 = "$pkg_sha256";
})
EOF
done < <(find ./nuget_tmp.packages -name '*.nuspec' | sort)
echo "]" >>"$deps_file"
popd popd
rm -r "$src" rm -r "$src"

View file

@ -1,72 +1,16 @@
{ fetchNuGet }: [ { fetchNuGet }: [
(fetchNuGet { (fetchNuGet { name = "CliFx"; version = "2.0.6"; sha256 = "09yyjgpp52b0r3mqlvx75ld4vjp8hry7ql7r20nnvj0lach6fyh6"; })
name = "CliFx"; (fetchNuGet { name = "Gress"; version = "1.2.0"; sha256 = "0aidc9whi0718gh896j7xkyndki9x7rifd8n1n681afb2zbxw4bn"; })
version = "2.0.6"; (fetchNuGet { name = "JsonExtensions"; version = "1.1.0"; sha256 = "1fqxb2jdbvjgg135wmy890qf63r056dq16jy7wgzkgp21m3j0lgy"; })
sha256 = "09yyjgpp52b0r3mqlvx75ld4vjp8hry7ql7r20nnvj0lach6fyh6"; (fetchNuGet { name = "Microsoft.AspNetCore.App.Ref"; version = "3.1.10"; sha256 = "0xn4zh7shvijqlr03fqsmps6gz856isd9bg9rk4z2c4599ggal77"; })
}) (fetchNuGet { name = "Microsoft.NETCore.App.Host.linux-x64"; version = "3.1.14"; sha256 = "11rqnascx9asfyxgxzwgxgr9gxxndm552k4dn4p1s57ciz7vkg9h"; })
(fetchNuGet { (fetchNuGet { name = "Microsoft.NETCore.App.Ref"; version = "3.1.0"; sha256 = "08svsiilx9spvjamcnjswv0dlpdrgryhr3asdz7cvnl914gjzq4y"; })
name = "Gress"; (fetchNuGet { name = "MiniRazor.CodeGen"; version = "2.1.4"; sha256 = "1856hfw2wl3ilxmpg4jmwpigmq0rm50i9pmy3sq8f1xc8j44kzl2"; })
version = "1.2.0"; (fetchNuGet { name = "MiniRazor.Runtime"; version = "2.1.4"; sha256 = "1pc3kjbnz810a8bb94k6355rflmayigfmpfmc4jzzx6l6iavnnc4"; })
sha256 = "0aidc9whi0718gh896j7xkyndki9x7rifd8n1n681afb2zbxw4bn"; (fetchNuGet { name = "Polly"; version = "7.2.2"; sha256 = "0s15n5zwj44i6sw3v40ca8l6j0ijydxcakvad49j52rp49iwrmkn"; })
}) (fetchNuGet { name = "Spectre.Console"; version = "0.41.0"; sha256 = "104vyzwbbq5m75dm31xk7ilvmik8hw1cj3bc301a8w6gq8i0fpk3"; })
(fetchNuGet { (fetchNuGet { name = "Superpower"; version = "2.3.0"; sha256 = "0bdsc3c0d6jb0wr67siqfba0ldl0jxbwis6xr0whzqzf6m2cyahm"; })
name = "JsonExtensions"; (fetchNuGet { name = "System.Memory"; version = "4.5.0"; sha256 = "1layqpcx1q4l805fdnj2dfqp6ncx2z42ca06rgsr6ikq4jjgbv30"; })
version = "1.1.0"; (fetchNuGet { name = "Tyrrrz.Extensions"; version = "1.6.5"; sha256 = "1yzsii1pbp6b066wxwwws310p7h809apl81bhb8ad55hqlzy1rg3"; })
sha256 = "1fqxb2jdbvjgg135wmy890qf63r056dq16jy7wgzkgp21m3j0lgy"; (fetchNuGet { name = "Wcwidth"; version = "0.2.0"; sha256 = "0p7zaisix9ql4v5nyl9gfc93xcyj74j01rwvgm7jw29js3wlj10s"; })
})
(fetchNuGet {
name = "Microsoft.AspNetCore.App.Ref";
version = "3.1.10";
sha256 = "0xn4zh7shvijqlr03fqsmps6gz856isd9bg9rk4z2c4599ggal77";
})
(fetchNuGet {
name = "Microsoft.NETCore.App.Host.linux-x64";
version = "3.1.14";
sha256 = "11rqnascx9asfyxgxzwgxgr9gxxndm552k4dn4p1s57ciz7vkg9h";
})
(fetchNuGet {
name = "Microsoft.NETCore.App.Ref";
version = "3.1.0";
sha256 = "08svsiilx9spvjamcnjswv0dlpdrgryhr3asdz7cvnl914gjzq4y";
})
(fetchNuGet {
name = "MiniRazor.CodeGen";
version = "2.1.4";
sha256 = "1856hfw2wl3ilxmpg4jmwpigmq0rm50i9pmy3sq8f1xc8j44kzl2";
})
(fetchNuGet {
name = "MiniRazor.Runtime";
version = "2.1.4";
sha256 = "1pc3kjbnz810a8bb94k6355rflmayigfmpfmc4jzzx6l6iavnnc4";
})
(fetchNuGet {
name = "Polly";
version = "7.2.2";
sha256 = "0s15n5zwj44i6sw3v40ca8l6j0ijydxcakvad49j52rp49iwrmkn";
})
(fetchNuGet {
name = "Spectre.Console";
version = "0.41.0";
sha256 = "104vyzwbbq5m75dm31xk7ilvmik8hw1cj3bc301a8w6gq8i0fpk3";
})
(fetchNuGet {
name = "Superpower";
version = "2.3.0";
sha256 = "0bdsc3c0d6jb0wr67siqfba0ldl0jxbwis6xr0whzqzf6m2cyahm";
})
(fetchNuGet {
name = "System.Memory";
version = "4.5.0";
sha256 = "1layqpcx1q4l805fdnj2dfqp6ncx2z42ca06rgsr6ikq4jjgbv30";
})
(fetchNuGet {
name = "Tyrrrz.Extensions";
version = "1.6.5";
sha256 = "1yzsii1pbp6b066wxwwws310p7h809apl81bhb8ad55hqlzy1rg3";
})
(fetchNuGet {
name = "Wcwidth";
version = "0.2.0";
sha256 = "0p7zaisix9ql4v5nyl9gfc93xcyj74j01rwvgm7jw29js3wlj10s";
})
] ]

View file

@ -1,5 +1,5 @@
#!/usr/bin/env nix-shell #!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl jq common-updater-scripts dotnet-sdk_5 #!nix-shell -i bash -p curl jq common-updater-scripts nuget-to-nix dotnet-sdk_5
set -eo pipefail set -eo pipefail
cd "$(dirname "${BASH_SOURCE[0]}")" cd "$(dirname "${BASH_SOURCE[0]}")"
@ -24,21 +24,7 @@ pushd "$src"
mkdir ./nuget_tmp.packages mkdir ./nuget_tmp.packages
dotnet restore DiscordChatExporter.Cli/DiscordChatExporter.Cli.csproj --packages ./nuget_tmp.packages dotnet restore DiscordChatExporter.Cli/DiscordChatExporter.Cli.csproj --packages ./nuget_tmp.packages
echo "{ fetchNuGet }: [" >"$deps_file" nuget-to-nix ./nuget_tmp.packages > "$deps_file"
while read pkg_spec; do
{ read pkg_name; read pkg_version; } < <(
# 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")
pkg_sha256="$(nix-hash --type sha256 --flat --base32 "$(dirname "$pkg_spec")"/*.nupkg)"
cat >>"$deps_file" <<EOF
(fetchNuGet {
name = "$pkg_name";
version = "$pkg_version";
sha256 = "$pkg_sha256";
})
EOF
done < <(find ./nuget_tmp.packages -name '*.nuspec' | sort)
echo "]" >>"$deps_file"
popd popd
rm -r "$src" rm -r "$src"

View file

@ -581,6 +581,7 @@ with pkgs;
fetchNuGet = callPackage ../build-support/fetchnuget { }; fetchNuGet = callPackage ../build-support/fetchnuget { };
buildDotnetPackage = callPackage ../build-support/build-dotnet-package { }; buildDotnetPackage = callPackage ../build-support/build-dotnet-package { };
nuget-to-nix = callPackage ../build-support/nuget-to-nix { };
fetchgx = callPackage ../build-support/fetchgx { }; fetchgx = callPackage ../build-support/fetchgx { };