Commit Graph

8371 Commits

Author SHA1 Message Date
github-actions[bot]
50da31693c
Merge staging-next into staging 2024-09-07 06:04:40 +00:00
github-actions[bot]
319af78438
Merge master into staging-next 2024-09-07 06:04:15 +00:00
éclairevoyant
3207bc2237
rustPlatform.fetchCargoTarball: support pname, version 2024-09-07 01:10:00 -04:00
éclairevoyant
1f0f59d5a1
rustPlatform.fetchCargoTarball: nixfmt 2024-09-07 01:09:59 -04:00
github-actions[bot]
899adc3017
Merge staging-next into staging 2024-09-07 00:13:22 +00:00
github-actions[bot]
b6b2ac4f61
Merge master into staging-next 2024-09-07 00:12:59 +00:00
John Ericson
f43cc75868
Clean up cross bootstrapping, take 2 (#321525) 2024-09-06 14:56:54 -04:00
John Ericson
5f134ec6cf Clean up cross bootstrapping
For a long time, we've had `crossLibcStdenv`, `*Cross` libc attributes,
and `*bsdCross` pre-libc package sets. This was always bad because
having "cross" things is "not declarative": the naming doesn't reflect
what packages *need* but rather how we *provide* something. This is
ugly, and creates needless friction between cross and native building.

Now, almost all of these `*Cross` attributes are gone: just these are
kept:

- Glibc's and Musl's are kept, because those packages are widely used
  and I didn't want to risk changing the native builds of those at this
  time.

- generic `libcCross`, `theadsCross`, and friends, because these relate
  to the convolulted GCC bootstrap which still needs to be redone.

The BSD and obscure Linux or freestnanding libcs have conversely all
been made to use a new `stdenvNoLibc`, which is like the old
`crossLibcStdenv` except:

1. It usable for native and cross alike

2. It named according to what it *is* ("a standard environment without
   libc but with a C compiler"), rather than some non-compositional
   jargon ("the stdenv used for building libc when cross compiling",
   yuck).

I should have done this change long ago, but I was stymied because of
"infinite recursions". The problem was that in too many cases we are
overriding `stdenv` to *remove* things we don't need, and this risks
cyles since those more minimal stdenvs are used to build things in the
more maximal stdenvs.

The solution is to pass `stage.nix` `stdenvNoCC`, so we can override to
*build up* rather than *tear down*. For now, the full `stdenv` is also
passed, so I don't need to change the native bootstraps, but I can see
this changing as we make things more uniform and clean those up.

(adapted from commit 51f1ecaa59)
(adapted from commit 1743662e55)
2024-09-06 10:26:56 -04:00
github-actions[bot]
d76d809dd4
Merge staging-next into staging 2024-09-05 00:13:35 +00:00
github-actions[bot]
74cdd9c9b1
Merge master into staging-next 2024-09-05 00:13:11 +00:00
Emily
a1dbc04bb9
gst_all_1.gstreamer: disable Rust if unavailable (#338999) 2024-09-04 16:12:25 +01:00
lelgenio
7783e118af yarnInstallHook: init 2024-09-04 11:15:47 -03:00
K900
23b4832da0 Merge remote-tracking branch 'origin/master' into staging-next 2024-09-04 08:53:48 +03:00
David McFarland
683ffbdc5c
buildDotnetModule: inherit enableParallelBuilding (#339335) 2024-09-03 20:56:37 -07: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
Jörg Thalheim
0e21bc6af9
buildGoModule: be nicer when overrideAttrs clears passthru (#339042) 2024-09-03 20:54:14 +02:00
Alyssa Ross
0852f8eb84
rustc: expose platform lists
Previously, it wasn't possible to access the list of platforms we can
build Rust programs for outside of buildRustPackage.  This was a
problem for packages that have optional Rust components, like
gstreamer or Meson, as there was no way to only build the Rust parts
for supported platforms.  Now it's possible to get that information
from rustc's passthru.
2024-09-03 17:47:27 +02:00
K900
105933cf4f pkgs/build-support/rust: fix warning-related eval issue 2024-09-03 17:04:55 +03:00
github-actions[bot]
a07f612219
Merge master into staging-next 2024-09-03 00:13:11 +00:00
Artturin
89bb3dfc21
cc-wrapper: fix guessing mainProgram (#323611) 2024-09-03 02:17:57 +03:00
Alyssa Ross
459e958661 rust.lib: enable planned deprecation warnings 2024-09-02 21:48:21 +02:00
github-actions[bot]
ce19166255
Merge master into staging-next 2024-09-02 18:04:19 +00:00
Sandro Jäckel
bc12ef1bf0
buildGoModule: be nicer when overrideAttrs clears passthru
Before an overlay in the form of:

package.overrideAttrs (old: {
  passthru = {};
})

would fail evaluation like:

       error: attribute 'overrideModAttrs' missing
       at /nix/store/afwc3m1sm49qq57xjv2hmd7iy4x0j33h-source/pkgs/build-support/go/module.nix:179:20:
          178|     outputHashAlgo = if finalAttrs.vendorHash == "" then "sha256" else null;
          179|   }).overrideAttrs finalAttrs.passthru.overrideModAttrs;
             |                    ^
          180|

Now instead we take the fallback default.
2024-09-02 17:53:36 +02:00
David McFarland
7bc85af0c5
buildDotnetModule: add testFilters arg (#336571) 2024-09-02 07:09:06 -07:00
github-actions[bot]
4aa8416117
Merge master into staging-next 2024-09-02 12:05:34 +00:00
Alyssa Ross
2ade30b7af rustPlatform.buildRustPackage: merge custom platforms
We should constrain the set of supported platforms to the platforms
supported by the compiler.  Otherwise we run into the unfortunate
situation where setting meta.platforms in a Rust package to
platforms.unix or platforms.linux will reintroduce CPU architectures
unsupported by the compiler.
2024-09-02 08:58:07 +02:00
github-actions[bot]
023a2c3d2a
Merge staging-next into staging 2024-08-31 06:04:54 +00:00
github-actions[bot]
8158f1d5b3
Merge master into staging-next 2024-08-31 06:04:15 +00:00
Jörg Thalheim
e6c09b2d57
breakpointHook: move to by-name (#338497) 2024-08-31 07:01:11 +02:00
github-actions[bot]
fab50d5f8d
Merge staging-next into staging 2024-08-31 00:13:46 +00:00
github-actions[bot]
dcad9b571a
Merge master into staging-next 2024-08-31 00:13:18 +00:00
Philip Taron
ef0bb1fc69
singularity-tools: make runscript modifiable (#334826) 2024-08-30 15:57:50 -07:00
Philip Taron
1b9af797ec
breakpointHook: move to by-name, mark broken instead of asserting 2024-08-30 15:03:42 -07:00
github-actions[bot]
758138647a
Merge staging-next into staging 2024-08-30 12:05:38 +00:00
github-actions[bot]
43febad8fc
Merge master into staging-next 2024-08-30 12:05:11 +00:00
Doron Behar
3326d57216
npmInstallHook: extract nodejsInstall{Manuals,Executables} (#336644) 2024-08-30 06:06:06 +00:00
github-actions[bot]
a2cea72749
Merge staging-next into staging 2024-08-30 00:13:56 +00:00
github-actions[bot]
22c53603c5
Merge master into staging-next 2024-08-30 00:13:29 +00:00
Philip Taron
3e0f69b8c9
treewide: use a consistent meta.priority default (#338223) 2024-08-29 14:15:22 -07:00
github-actions[bot]
eacf5283f3
Merge staging-next into staging 2024-08-29 18:04:46 +00:00
github-actions[bot]
d83e365b06
Merge master into staging-next 2024-08-29 18:04:21 +00:00
Artturin
65bf97a942
buildFHSEnv: use relative symlinks (#330712) 2024-08-29 20:57:43 +03:00
Philip Taron
ae92f312bf
treewide: use a consistent meta.priority default 2024-08-29 09:04:57 -07:00
adisbladis
9c7ff7277c
importNpmLock.buildNodeModules: init
`importNpmLock.buildNodeModules` returns a derivation with a pre-built `node_modules` directory, as imported by `importNpmLock`.
This is to be used together with `importNpmLock.hooks.linkNodeModulesHook` to facilitate `nix-shell`/`nix develop` based development workflows:

```nix
pkgs.mkShell {
  packages = [
    importNpmLock.hooks.linkNodeModulesHook
    nodejs
  ];

  npmDeps = importNpmLock.buildNodeModules {
    npmRoot = ./.;
    inherit nodejs;
  };
}
```
will create a development shell where a `node_modules` directory is created & packages symlinked to the Nix store when activated.

This code is adapted from https://github.com/adisbladis/buildNodeModules
2024-08-29 06:12:07 -07:00
github-actions[bot]
4a1df24885
Merge staging-next into staging 2024-08-29 06:05:29 +00:00
github-actions[bot]
b430e34392
Merge master into staging-next 2024-08-29 06:05:05 +00:00
seth
278e1bfb89
yarnConfigHook: apply as a postConfigure hook
This follows in this example of npmConfigHook and allows for using this
hook alongside others that may override configurePhase
2024-08-28 23:30:55 -04:00
Anderson Torres
e548b31708 installShellFiles: migrate to by-name 2024-08-28 18:51:06 -03:00
Anderson Torres
8b674370c4 installShellFiles: nixfmt-rfc-style 2024-08-28 18:51:06 -03:00
Anderson Torres
f72e74d7ae installShellFiles: migrate tests to tests subdirectory
Rationale: Since RFCs 140 and 146, the old category-based hierarchy is
deprecated and obsolete, and a new approach took place: packages should be as
self-contained as possible.

This paradigm is reflected in many new strict checks that prohibit a package to
refer to files outside its directory tree.

Following this spirit, this commit essentially moves nixpkgs
pkgs/test/default.nix to ./tests/default.nix.

Further, to keep the top-level `tests` attribute, a green alias is kept in the
place of older file.
2024-08-28 18:51:06 -03:00