Reno Dakota
52bf1163fa
treewide: use getLib when accessing clang / libclang / stdenv.cc.cc
...
In preparation to eliminate the lib output for the unwrapped clang, use
`lib.getLib` to access the `lib` output.
2024-11-07 10:27:41 +00:00
David McFarland
9bb309d5b5
buildDotnetModule: set --no-restore in check/publish/pack
2024-09-24 20:43:24 -03:00
David McFarland
00fe5f61ba
buildDotnetModule: remove duplicate attribute key
2024-09-24 20:43:24 -03:00
David McFarland
2c97d67f62
dotnet: split sdk packages by platform
2024-09-24 20:43:24 -03:00
David McFarland
b1685747a7
nuget-package-hook: move package unpacking from buildDotnetModule
2024-09-17 01:12:11 -03:00
David McFarland
c1ee815d03
dotnet-fixup-hook: obey dontFixup
2024-09-17 01:12:11 -03:00
David McFarland
e05c0c4f98
dotnet-fixup-hook: remove confusing logs
2024-09-17 01:12:11 -03:00
David McFarland
773cc0de74
dotnet-sdk-setup-hook: move nuget configuration from dotnetBuildModule
2024-09-17 01:12:11 -03:00
David McFarland
f820d2cf3c
dotnetCorePackages: split fetch-deps logic into addNuGetDeps
2024-09-17 01:12:11 -03:00
Sergei Trofimovich
35671aabff
dotnet/build-dotnet-module: fix eval of fetch-deps
...
Without the change the eval fails as:
$ nix build --no-link -f. csharp-ls.fetch-deps --show-trace
error:
… while evaluating a path segment
at pkgs/build-support/dotnet/build-dotnet-module/default.nix:258:36:
257| else
258| ''$(mktemp -t "${finalAttrs.pname ? finalAttrs.finalPackage.name}-deps-XXXXXX.nix")'';
| ^
259| nugetToNix = (nuget-to-nix.override { inherit dotnet-sdk; });
error: cannot coerce a Boolean to a string: false
Switch from `?` operator (attribute presence predicate) to an `or`
("else" form).
2024-09-13 07:12:37 +01:00
David McFarland
cc9c59c478
buildDotnetModule: use individual dependencies for nugetDeps
2024-09-06 16:05:19 -03:00
David McFarland
2d43ecc400
buildDotnetModule: clean-up stdenv attributes
...
- stop binding attributes we don't care about (e.g. name, doCheck)
- remove attributes we handle in nix (e.g. useAppHost)
- inherit attributes with default values (e.g. packNupkg)
2024-09-05 23:46:23 -03:00
David McFarland
e49642596f
buildDotnetModule: set TMPDIR in fetch-deps
...
Some packages assume TMPDIR is unshared, even in nix-shell.
2024-09-05 22:47:39 -03:00
David McFarland
e530139caa
buildDotnetModule: fix tool manifest detection
2024-09-05 22:47:38 -03:00
Ivan Trubach
2d33d5c778
buildDotnetModule: inherit enableParallelBuilding
...
After this change, enableParallelBuilding defaults to true for packages
using buildDotnetModule. The argument value already defaults to true,
but we did not use it. Note that default values in Nix are not present
in the arguments attribute set, e.g. `args` does not contain `def` for
`{ def ? true }@args: …` function unless this argument is explicitly
passed.
2024-09-03 22:57:52 +03:00
Matt Sturgeon
1c379e3a57
buildDotnetModule: add testFilters
arg
...
In addition to the existing `disabledTests`, allow defining more general
test filters using `testFilters`.
2024-08-22 19:52:07 +01:00
Matt Sturgeon
79d26048de
buildDotnetModule: add finalAttrs
support
...
Allow users to pass arguments to `buildDotnetModule` in the form:
```nix
buildDotnetModule (finalAttrs: {
# Args
})
```
Exposing the behaviour of the underlying `mkDerivation` and allowing
packages to be defined in a recursive way that works correctly even when
the package is overridden, e.g. using `overrideAttrs`.
Added some simple test cases that piggyback on the existing
`structured-attrs` test.
2024-08-06 16:33:49 +01:00
Matt Sturgeon
77a13aa9ad
buildDotnetModule: format with nixfmt
2024-08-01 13:58:28 +01:00
David McFarland
d3ca5027fa
dotnet: use unpacked nuget packages
2024-07-31 00:47:14 -03:00
David McFarland
7402aa90cf
buildDotnetModule: fix typo
2024-07-30 12:16:45 -03:00
David McFarland
0c1f3e6c93
buildDotnetModule: remove nugetDeps from derivation args
...
This allows fetch-deps to work even when the deps file is missing.
2024-07-30 12:16:45 -03:00
Smaug123
7924a2513e
dotnet: fix fetchDeps null handling
2024-07-16 08:34:23 +01:00
Smaug123
45037a9d73
buildDotnetModule: split fetch-deps script to new file
...
This makes the minimal change to put the script in a new file.
It does not fix the resulting ShellCheck warnings (which would
have been present in the previous version; I've just exposed
them).
2024-07-12 09:53:13 +01:00
Ivan Trubach
4caf9a61f9
buildDotnetModule: convert makeWrapperArgs to an array
2024-06-19 00:34:15 +03:00
David McFarland
b5447275d2
Merge pull request #313005 from tie/dotnet-cross
...
buildDotnetModule: fix structured attributes support
2024-06-17 09:43:51 -03:00
Alexis Hildebrandt
755b915a15
treewide: Remove indefinite article from meta.description
...
nix run nixpkgs#silver-searcher -- -G '\.nix$' -0l 'description.*"[Aa]n?' pkgs \
| xargs -0 nix run nixpkgs#gnused -- -i '' -Ee 's/(description.*")[Aa]n? (.)/\1\U\2/'
2024-06-09 23:07:45 +02:00
Ivan Trubach
f7d8046fb8
buildDotnetModule: fix structured attributes support
...
This change refactors internal hooks used by buildDotnetModule to
support derivations with structured attributes. Note that this changes
variable names that the internal hooks expect.
2024-05-29 08:45:25 +03:00
Ivan Trubach
cfd1bd6141
buildDotnetModule: remove unnecessary callPackage calls
...
This change removes no-op callPackage calls and reformats the file with
nixpkgs-fmt.
2024-05-22 03:12:30 +03:00
Ivan Trubach
0e64e645c9
buildDotnetModule: fix cross-compilation and remove dotnet-test-sdk
...
This change fixes cross-compilation for .NET packages (that are not
using .sln as project files). See relevant comment in the change list
for more details.
In addition to that, it removes dotnet-test-sdk that appears to be
broken, that is, dotnet --list-sdks does not recognize SDKs from PATH,
and when propagated from the check hook it was shadowed by inputs from
preceding hooks.
Note that dotnet-test-sdk used to work when it was introduced in PR
144062, but PR 155257 probably overlooked this case. However, currently
it is not used in Nixpkgs and I think dotnetCorePackages.combinePackages
should cover the intended use case for dotnet-test-sdk.
2024-05-22 03:08:42 +03:00
Ivan Trubach
7877140075
buildDotnetModule: do not run dotnet command using env
...
There should be no reason to use env here:
1. In places where it is used to run dotnet with environment variables,
the same can be done with shell syntax.
For example, `env "FOO=$bar" baz` is equivalent to `FOO="$bar" baz`.
2. Otherwise, it just unnecessarily forces PATH lookup for dotnet
command. In addition to that, some dotnet invocations did not use
env.
2024-05-20 03:02:23 +03:00
David McFarland
26c3d6878a
dotnet: fix dotnet executables in darwin sandbox
...
This fixes:
Could not load ICU data. UErrorCode: 2
We're using a hook instead of a wrapper because various things like to
reference the unwrapped dotnet executable.
2024-05-04 19:14:39 -03:00
éclairevoyant
858f4db304
buildDotnetModule: fix handling executables
with an empty list
2024-04-02 13:08:31 -04:00
David McFarland
6b047e397a
mkNugetDeps: provide default for nugetDeps
2024-03-03 09:57:47 -04:00
Ryan Lahfa
d74aefe80e
Merge pull request #251267 from lilyinstarlight/fix/dotnet-installPath
...
buildDotnetModule: actually use installPath
2024-01-12 19:30:12 +01:00
mdarocha
5b43e78193
buildDotnetModule: fix rare error when evaluation of version fails
2023-12-04 20:24:09 +01:00
mdarocha
d016404ccd
buildDotnetModule: parse version before passing it to dotnet
...
This avoids problems when the Nix version attribute does not fit the
format required by .NET
2023-10-17 18:59:52 +02:00
mdarocha
8318df5b63
buildDotnetModule: fix running fetch-deps with no nugetDeps defined.
...
This eases the initial setup when creating a package
2023-09-30 13:21:12 +02:00
Lily Foster
20e1dd2d1e
buildDotnetModule: actually use installPath
2023-08-24 20:15:13 -04:00
TomaSajt
ed60ed3562
Fix useDotnetFromEnv's DOTNET_ROOT detection
2023-08-08 00:37:49 +02:00
David McFarland
bca3a9edfc
buildDotnetModule: fix indentation
2023-06-24 19:13:16 -03:00
David McFarland
afe26f5f1d
buildDotnetModule: remove fetch-deps from tool packages
...
This helps if we want to run nixpkgs.*.fetch-deps. Previously
e.g. fable.fetch-deps existed, but was broken.
2023-06-24 19:13:16 -03:00
David McFarland
d6fa0f0a26
buildDotnetModule: use tmp file for fetch-deps output
2023-06-24 19:13:16 -03:00
David McFarland
cf9976de74
buildDotnetModule: unset TMPDIR instead of setting it empty
...
This was breaking nix-prefetch-url when running fetch-deps in nix-shell.
e.g.
$ TMPDIR= nix-prefetch-url foo
nix-prefetch-url: src/libutil/util.cc:119: nix::Path
nix::canonPath(PathView, bool): Assertion `path != ""' failed. [2]
881198 abort (core dumped)
2023-06-24 19:13:16 -03:00
David McFarland
9c16cea2bb
buildDotnetModule: allow lockFile path to be set in nugetDeps
...
This allows fetch-deps to find the lock-file for roslyn.
2023-06-24 17:17:41 -03:00
mdarocha
29e770e0eb
buildDotnetModule: support native binaries in nuget packages
...
This helps with ie. crossgen2 building, and packages that use protoc
2023-06-21 17:06:30 +02:00
mdarocha
c51141d997
buildDotnetModule: pass runtimeId whenever possible and disable trimming when not allowed.
...
This fixes up some build errors
2023-06-21 17:06:30 +02:00
mdarocha
abf6081bc2
buildDotnetModule: add useDotnetFromEnv option
...
This causes an alternative wrapper to be used, that takes the dotnet
runtime from the environment.
2023-06-20 17:20:51 +02:00
mdarocha
6c639e869c
buildDotnetModule: tweaks to support paket
...
Projects that use paket, and have it setup so that it's executed
transparently during "dotnet restore" as a dotnet tool should now work.
2023-06-20 17:20:51 +02:00
Guillaume Maudoux
6efefdc8c1
buildDotnetModule: add support for dotnet tools
2023-04-29 18:54:04 -04:00
7c6f434c
17b4ad7c2f
Merge pull request #217587 from winterqt/build-dotnet-module-darwin-sandbox
...
buildDotnetModule: fix sandboxed builds on darwin
2023-04-17 14:08:21 +00:00