Commit Graph

21 Commits

Author SHA1 Message Date
David McFarland
691bec7b0e nuget-to-nix: fix hash generation when resolving multiple sources
Fixes: 2280d5c467
2024-07-08 12:14:09 -03:00
aleksana
2280d5c467 nuget-to-nix: generate SRI hash instead of sha256 2024-07-04 20:16:51 +08:00
Ulysses Zhan
acaf847d4f nuget-to-nix: fix the bug of wrong url in the generated nix file when the package base address of the nuget source does not have a trailing slash 2024-03-14 00:29:50 -07:00
David McFarland
92a255d13b nuget-to-nix: fix error handling 2024-03-06 10:14:21 -04:00
David McFarland
ca181cefee nuget-to-nix: skip local sources 2024-03-03 09:57:47 -04:00
David McFarland
a185ed85be nuget-to-nix: handle packages with mismatched nuspec case
e.g. cake.tool 3.0.0 which uses Cake.Tool.nuspec.
2023-12-22 12:06:02 +01:00
David McFarland
f2027f4960 nuget-to-nix: set nullglob
This stops nuget-to-nix from failing when there are no packages in the
output.
2023-06-24 19:13:16 -03:00
mdarocha
d093086a2b buildDotnetModule: add support for using combinePackages as dotnet-sdk
This allows packages that require several dotnet versions to build (like
BeatSaberModManager) to properly depend on the dotnet-sdk specific deps.
This in turns avoids having to regenerate the deps of those packages
after each dotnet-sdk update.

This also changes nuget-to-nix to accept a file with a list of
exclusions instead of a folder.
2023-03-19 20:53:39 +01:00
David McFarland
abebf5f591 nuget-to-nix: fix warning when package is installed from sdk 2022-10-18 23:42:46 -03:00
David McFarland
b60c9fd2fe nuget-to-nix: find sources deterministically
The source used to download a particular package still isn't
deterministic in nuget. Even worse, the hash of the package can vary
between sources. This makes nuget use the first enabled source
containing the package.

The order of the dependencies may be slightly different because it now
uses glob order of the lower-case package names and versions, instead of
sorting the output.

If the package actually downloaded was the first source that contains
the package, then it will be hashed from disk to avoid downloading it
again.
2022-10-02 16:09:27 -03:00
David McFarland
f8763b87e0 nuget-to-nix: exclude by package source, not list
This allows exclusions to be by version.
2022-10-02 16:09:27 -03:00
David McFarland
c91f7dd64a nuget-to-nix: skip local packages 2022-09-15 19:39:36 -03:00
Zhaofeng Li
1528ce3063 nuget-to-nix: Make exclusion file optional 2022-08-18 13:49:45 -06:00
mdarocha
a3fff0c947 buildDotnetModule: exclude sdk-specific packages in fetch-deps result 2022-08-10 16:26:49 +02:00
Evgeny Zemtsov
7ab35bdaa6 nuget-to-nix: fallback to default URL for directories
In some cases `$pkgs_src` can be a path. For example with `FSharp.Core` when it comes with dotnet SDK.
In these cases we need to fallback on default URL otherwise curl fails.
2022-07-25 11:05:10 +02:00
Evgeny Zemtsov
8d79dfe6f0 nuget-to-nix: enable default netrc
Enable default netrc for curl command. Otherwise this doesn't work for private repositories that require authentication.
2022-07-12 21:11:57 +02:00
mdarocha
2f07f578b2 nuget-to-nix: support custom package sources
If the package was not restored from nuget.org (determinted by checking
the "source" field of ".nupkg.metadata"), query the custom source for
the package endpoint (the way nuget api is built we can't determine it
without an API query) and build a custom package URL to save in the
generated deps file.
2022-06-21 12:13:34 +02:00
Ivar Scholten
e3c19ba57e nuget-to-nix: include required dependencies 2022-04-30 18:24:48 -07:00
Ivar Scholten
a42c074db0 nuget-to-nix: add missing comma
This fixes a regression introduced in bbcb7d3d34ca5ea620740184eea9db61e4b84f8b
2022-03-14 18:59:53 +01:00
Åsmund Østvold
d8012c5458
nuget-to-nix: deterministic sorting of output list (#162187)
It is the package list output that should be sorted. The current
output sequence is not logical because '.' is sorted in front of '/'
with input sorting and is not deterministic for different language
environments.

To get a deterministic and logical sorting in environments with
different language configured, env "LC_ALL=C" is set and the produced
strings is that is sorted. To get alphabetic sorting and not a pure
ASCII value sort "--ignore-case" is added.
2022-03-10 09:11:04 +01:00
Ivar Scholten
1878b7b1b2 nuget-to-nix: move to pkgs/build-support/dotnet 2022-02-11 16:38:12 +01:00