about summary refs log tree commit diff
path: root/pkgs/build-support/dotnet
AgeCommit message (Collapse)AuthorFilesLines
2023-05-17Merge pull request #229008 from whonore/dafny-4Guillaume Maudoux2-0/+5
dafny: 2.3.0 -> 4.0.0
2023-05-05mkNugetSource: remove mono from build closureRaphael Robatsch2-9/+39
A directory full of *.nupkg files is a valid nuget source. We do not need mono and the Nuget command line tool to create this structure. This has two advantages: - Nuget is currently broken due to a kernel bug affecting mono (#229476). Replacing the mkNugetSource implementation allows affected users on 6.1+ kernels compile .NET core packages again. - It removes mono from the build closure of .NET core packages. .NET core builds should not depend on .NET framework tools like mono. There is no equivalent of the `nuget init` command in .NET core. The closest command is `dotnet nuget push`, which just copies the *.nupkg files around anyway, just like this PR does with `cp`. `nuget init` used to extract the *.nuspec files from the nupkgs, this new implementation doesn't. .NET core doesn't care, but it makes the license extraction more difficult. What was previously done with find/grep/xml2 is now a python script (extract-licenses-from-nupkgs.py).
2023-04-29buildDotnetModule: add support for dotnet toolsGuillaume Maudoux2-0/+5
2023-04-17Merge pull request #217587 from winterqt/build-dotnet-module-darwin-sandbox7c6f434c1-1/+5
buildDotnetModule: fix sandboxed builds on darwin
2023-03-31Merge pull request #218991 from Trundle/builddotnetmodule-space-wrapper-argsSandro1-1/+2
2023-03-24treewide: don't hardcode /nix/store (no rebuilds changes)Artturin1-1/+1
improve experience for other store locations
2023-03-19buildDotnetModule: add support for using combinePackages as dotnet-sdkmdarocha2-8/+16
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-06Merge pull request #218849 from ↵Atemu1-1/+11
Atemu/buildDotnetModule-put-dep-file-path-in-fetch-script buildDotnetModule: point fetch-deps at module's deps file by default
2023-03-01buildDotnetModule: add support for args with spaces in makeWrapperArgsAndreas Stührk1-1/+2
2023-02-28buildDotnetModule: point fetch-deps at module's deps file by defaultAtemu1-1/+11
Previously, you had to provide the path to the deps.nix of the package inside your Nixpkgs checkout as an argument manually. Now it just does that by default when no argument is passed.
2023-02-21buildDotnetModule: fix sandboxed builds on darwinWinter1-1/+5
ICU tries to unconditionally load files from /usr/share/icu on Darwin, which makes builds fail in the sandbox. Thus, let's disable ICU during the build on Darwin by setting DOTNET_SYSTEM_GLOBALIZATION_INVARIANT [0]. [0]: https://learn.microsoft.com/en-us/dotnet/core/runtime-config/globalization#invariant-mode
2023-02-15Merge staging-next into staginggithub-actions[bot]1-3/+1
2023-02-14treewide: use lib.optionalsFelix Buehler1-3/+1
2023-02-07treewide: makeSetupHook deps -> propagatedBuildInputsArtturin1-5/+5
2023-01-17buildDotnetModule: proper escaping of disabledTestsmdarocha2-2/+6
2023-01-09build-dotnet-module: fix mktempErik Arvstedt1-1/+1
Re-add missing `-t` arg which I erroneously removed in a98e52085584d806bd80ab203c7b75c4e361f522. Without it, the tmpdir is created in $PWD.
2023-01-07build-dotnet-module: avoid `/run/user` for downloading packagesErik Arvstedt1-1/+7
Inside `nix-shell`, `TMPDIR` (used by `mktemp`) is set to `/run/user/<uid>` which is usually a tmpfs stored in RAM. When fetching a large dotnet deps tree to this tmpdir from a nix-shell (e.g. via `btcpayserver/update.sh`), this can easily exceed system RAM and `fetch-deps` fails. mktemp arg `-t` is deprecated and can be omitted.
2022-12-19build-dotnet-module: restore for current runtime by defaultDavid McFarland5-15/+20
2022-12-19build-dotnet-module: add useAppHost parameter so it can be disabledDavid McFarland3-1/+12
2022-12-19buildDotnetModule: run tests on projectFile if testProjectFile is unsetDavid McFarland1-1/+1
2022-12-19build-dotnet: make passthru.packages a derivationDavid McFarland1-4/+1
2022-12-19build-dotnet-module: strip --runtime flags without using ridDavid McFarland1-3/+2
2022-12-19dotnetCorePackages: move systemToDotnetRid out of sdkDavid McFarland1-3/+1
2022-12-17treewide: fix typosfigsoda1-1/+1
2022-11-25buildDotnetModule: generate a NuGet.config with sourcemdarocha1-0/+12
Some references, like <Sdk />, ignore the --source argument. To fix that, we generate a simple NuGet.config containing only the given nuget source.
2022-10-25build-dotnet-module: don't end with exit code 1 when update was sucessfullSandro Jäckel1-1/+3
otherwise scripts might end prematurely
2022-10-18nuget-to-nix: fix warning when package is installed from sdkDavid McFarland1-1/+1
2022-10-02nuget-to-nix: find sources deterministicallyDavid McFarland3-31/+73
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-02nuget-to-nix: exclude by package source, not listDavid McFarland2-7/+4
This allows exclusions to be by version.
2022-10-02build-dotnet-module: fix fetch-deps usage messageDavid McFarland1-1/+1
2022-10-02build-dotnet-module: limit package platforms by sdk supportDavid McFarland1-4/+7
2022-10-02build-dotnet-module: clean up tmp file handlingDavid McFarland1-8/+10
Having: rm -rf "$src" "$HOME" Was slightly terrifying IMO, especially where the trap was installed before HOME was set.
2022-09-18buildDotnetModule: add the option to keep sources to fetch-depsIvar Scholten1-27/+49
2022-09-18buildDotnetModule: move nugetDeps throw to when its actually neededIvar Scholten1-12/+10
Previously we had an assert that would complain when nugetDeps wasnt set, which also didnt allow any passthru attributes (like fetch-deps) to be build. That causes a cycle where you need nugetDeps to fetch the nuget deps, but arent able to build the script to do so.
2022-09-18buildDotnetModule: dont require specifing a projectFileIvar Scholten4-54/+91
In a lot of cases dotnet can figure this out by itself, so we can just invoke it without the project argument.
2022-09-18buildDotnetModule: minor changes to hooksIvar Scholten4-23/+28
Abide by `set -e` rules and use `local -r` where applicable.
2022-09-18buildDotnetModule: format with nixpkgs-fmtIvar Scholten1-124/+130
2022-09-16build-dotnet-module/fetch-deps: fixup temp naming when pname has a capital X ↵Cole Helbling1-3/+3
in it For example, this script doesn't work for `xivlauncher` because its proper `pname` is `XIVLauncher`, and `mktemp` complains about "too few X's": $ mktemp -td "XXXXXX-XIVLauncher-home" mktemp: too few X's in template ‘XXXXXX-XIVLauncher-home’ vs $ mktemp -td "XIVLauncher-home-XXXXXX" /tmp/XIVLauncher-home-EdGMei
2022-09-15nuget-to-nix: skip local packagesDavid McFarland1-1/+3
2022-09-15make-nuget-deps: use . for version separatorDavid McFarland1-1/+1
This allows the output to be used as a nuget source.
2022-09-11Merge pull request #187359 from IvarWithoutBones/dotnetmodule-updatescriptsIvv1-21/+66
treewide: migrate buildDotnetModule update scripts to use fetch-deps
2022-09-11dotenv: convert CRLF line endings into LFSandro Jäckel1-20/+20
otherwise git converts the line endings with every rebase on Linux
2022-09-11buildDotnetModule: restore for all platforms in fetch-depsIvar Scholten1-21/+66
This makes buildDotnetModule restore nuget dependencies for the platforms set in meta.platforms. This should help with generating lockfiles for platforms other than the host machine. Co-authored-by: mdarocha <git@mdarocha.pl>
2022-08-18build-dotnet-module: Allow specifying the output path of fetch-depsZhaofeng Li1-3/+3
2022-08-18nuget-to-nix: Make exclusion file optionalZhaofeng Li1-1/+1
2022-08-18buildDotnetModule: set fetch-deps utils via PATHEvan Petousis1-12/+14
2022-08-18buildDotnetModule: use coreutils in fetch-depsEvan Petousis1-11/+11
cp on macOS doesn't support the -T flag, which causes the fetch-deps script to fail. Use Nix's coreutils to ensure the script works consistently across all platforms.
2022-08-18buildDotnetModule: use platform-agnostic cp formatEvan Petousis1-1/+1
cp on macOS doesn't support the -T flag, which causes the fetch-deps script to fail. Appending `/.` to the source argument replicates the same functionality.
2022-08-14Merge pull request #181512 from mdarocha/dotnet-6-updateIvv3-6/+36
dotnet-sdk: 6.0.301 -> 6.0.400, refactor to streamline dotnet updates
2022-08-10buildDotnetModule: exclude sdk-specific packages in fetch-deps resultmdarocha3-3/+15