Commit Graph

8562 Commits

Author SHA1 Message Date
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
Yueh-Shun Li
758056dac7 treewide: handle postPhases __structuredAttrs-agnostically
Always specify the postPhases attribute as a list instead of a string.

Append elements to the postPhases Bash variable using appendToVar
instead of string or Bash array concatenation.
2024-09-03 05:56:17 +08:00
Yueh-Shun Li
054c5f0e10 treewide: handle preDistPhases __structuredAttrs-agnostically
Always specify the preDistPhases attribute as a list instead of a string.

Append elements to the preDistPhases Bash variable using appendToVar
instead of string or Bash array concatenation.

Handle element insertion before a specific element using string
substitution as before, but handle both structured and unstructured
attributes.
2024-09-03 05:33:59 +08:00
Yueh-Shun Li
5d42a8b38c treewide: handle preConfigurePhases __structuredAttrs-agnostically
Always specify the preConfigurePhases attribute as a list instead of a
string.

Append elements to the preConfigurePhases Bash variable using
appendToVar instead of string or Bash array concatenation.
2024-09-03 05:33:59 +08:00
Yueh-Shun Li
21c0129841 treewide: handle prePhases __structuredAttrs-agnostically
Always specify the prePhases attribute as a list instead of a string.

Append elements to the prePhases Bash variable using appendToVar
instead of string or Bash array concatenation.
2024-09-03 05:33:59 +08: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
Anderson Torres
8f4200d165 installShellFiles: move setup script to the same directory
So that it can be migrated to by-name later.
2024-08-28 18:51:06 -03:00
Philip Taron
0d1b26857b
treewide: support structuredAttrs in setup hooks (part 2) (#335666) 2024-08-28 14:07:58 -07:00
Artturin
740804dd5f
patch-shebangs: don't patch shebangs with bash builtins (#330188) 2024-08-27 03:54:10 +03:00
lelgenio
80a2825733 npmHooks.npmInstallHook: extract npmInstall{Manuals,Executables} 2024-08-26 20:43:42 -03:00
github-actions[bot]
eb9c198aae
Merge staging-next into staging 2024-08-26 12:05:49 +00:00
github-actions[bot]
132f2322d0
Merge master into staging-next 2024-08-26 12:05:25 +00:00
lassulus
9eda2c63f4
writers.*: use lib.makeBinPath in documentation (#337437) 2024-08-26 13:20:29 +02:00
Alexander Sieg
3b0ba6a6e1
writers.*: use lib.makeBinPath in documentation
This also fixes a syntax error with `,` being used as a array element
separator.
2024-08-26 12:19:19 +02:00
Silvan Mosberger
ea17c502d2 tests.trivial-builders: Prevent rebuilds when Nix files change
There's no need to use a Nix file in the path here. By using a different
file we won't cause rebuilds when we change the Nix file, in particular
also when the Nix file is reformatted.
2024-08-25 04:59:11 +02:00
Wolfgang Walther
1efcffa700
stdenv: support default values in concatTo
The previously used pattern was introduced in #318614, but technically
leaked the default flags into the global scope. While this would
probably not make much of a practical difference, making concatTo
support default values is a much cleaner approach.
2024-08-24 12:23:35 +02:00
github-actions[bot]
6c92725f2c
Merge staging-next into staging 2024-08-24 06:04:36 +00:00
github-actions[bot]
fd3525921f
Merge master into staging-next 2024-08-24 06:04:09 +00:00
Gabriella Gonzalez
0b6fa5ee40
virtualisation.oci-containers: Add new imageStream option (#335430)
This adds a new `imageStream` option that can be used in conjunction
with `pkgs.dockerTools.streamLayeredImage` so that the image archive
never needs to be materialized in the `/nix/store`.  This greatly
improves the disk utilization for systems that use container images
built using Nix because they only need to store image layers instead of
the full image.  Additionally, when deploying the new system and only
new layers need to be built/copied.
2024-08-24 04:38:27 +02:00
Nathan Henrie
16f3c7ebcb rustPlatform.buildRustPackage: provide debug symbols on darwin
Currently we cannot debug rust binaries on darwin (via lldb).

The debug symbols seem to be provided by default in a number of files
in `target/debug/deps/*.rcgu.o`. As far as I can tell these have
hardcoded paths referring to the ephemeral build directory. However,
`split-debuginfo=packed` conveniently produces a `.dSYM` file that can
be copied to `$out/bin/` and immediately provide debugging information.

Fixes https://github.com/NixOS/nixpkgs/issues/262131
2024-08-23 13:07:16 -06:00
github-actions[bot]
a3836576dd
Merge staging-next into staging 2024-08-23 18:04:38 +00:00
github-actions[bot]
1f86c1b2e8
Merge master into staging-next 2024-08-23 18:04:09 +00:00
Tim Cuthbertson
911aa1440f treewide: support NIX_SSL_CERT_FILE as an impureEnvVar
This envvar is also added to lib.proxyImpureEnvVars since it's
typically required for https proxies.

This change also updates fetchgit and go module fetching to use this
envvar. NIX_GIT_SSL_CAINFO is still supported for backwards
compatibility in fetchgit.
2024-08-23 21:34:22 +10:00
Adam Joseph
bbb42450c5 default-crate-overrides: proc-macro-crate assumes env::var("CARGO")
Since version 2.0.0, proc-macro-crate has assumed it can exec()
`env::var("CARGO")` in order to run `cargo locate-project`.

This commit adds a crate override to proc-macro-crate which simply writes the
path to buildPlatform.cargo into the proc-macro-crate sources.

This way we don't need to set `env.CARGO` for every build that depends on
proc-macro-crate -- if we do that, the $CARGO environment variable would be
visible to the entire build.  This could potentially lead to incredibly
hard-to-troubleshoot heisenbugs if there is some other crate that expects
`env::var("CARGO")` to exist -- that other crate would mysteriously work only
in projects that use proc-macro-crate but not anywhere else!
2024-08-23 09:36:47 +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
K900
5c68540f8b Merge remote-tracking branch 'origin/staging-next' into staging 2024-08-22 13:20:38 +03:00
Philip Taron
f300433fcc
Merge pull request #336383 from motiejus/compress-drv-docs 2024-08-21 12:46:48 -07:00
Motiejus Jakštys
26249b62fd compressDrv: fix a confusing comment 2024-08-21 21:52:00 +03:00
Sigmanificient
f03b7856a6 makePythonWriter: add doCheck toggle 2024-08-21 19:17:36 +02:00
Pol Dellaiera
dbc4f15b89
Merge pull request #308059 from drupol/build-support/php/remove-composer-local-repo-plugin
build-support/php: init `buildComposerProject2` and `mkComposerRepository2`
2024-08-20 18:38:44 +02:00
Philip Taron
be245de559
Merge pull request #333262 from nbraud/doc/runCommandWith
nixpkgs-manual: Document `runCommandWith`, refactor `runCommand{,CC,Local}`
2024-08-19 12:29:58 -07:00
nicoo
80e3fd91a9 doc/build-helpers: document runCommandWith
Co-authored-by: Johannes Kirschbauer <hsjobeki+github@gmail.com>
2024-08-19 19:16:42 +00:00
Sandro Jäckel
0505523e98
compress-drv: correct comment 2024-08-19 13:19:27 +02:00
Sandro Jäckel
0654f81d56
compress-drv: carry pname, version forward
This is required to overwrite to use a compressed version of nextcloud in services.nextcloud.package because the module accesses version
2024-08-19 13:17:05 +02:00
Sandro Jäckel
4cc5dee048
compress-drv: allow passing extra arguments to find
This is useful for eg. nextcloud to prevent compressing thousands of
later unused files which are actually not used by the web server.
2024-08-19 13:15:55 +02:00
Sandro Jäckel
0ca4bfa700
compress-drv: add zstd 2024-08-19 13:15:54 +02:00
Sandro Jäckel
9581a2bdca
compress-drv: misc cleanup 2024-08-19 13:15:54 +02:00
Sandro Jäckel
6449d32b0a
compress-drv: add htm, otf formats to default 2024-08-19 13:15:46 +02:00
Sandro Jäckel
7ebbf27832
compress-drv: sort formats 2024-08-19 13:15:46 +02:00
Philip Taron
bd346e9f29
Merge pull request #335575 from felschr/make-startupitem-extra-args-fix
make-startupitem: fix {prepend,append}ExtraArgs for Exec without arguments
2024-08-18 19:56:39 -07:00
Motiejus Jakštys
1bd350449a gitea: fix passthru.data-compressed
Fixes two bugs:
- pass a forgotten `{}` to `compressDrv`.
- remove incorrect usage of `lndir` in `compressDrv`. I added a brief
  comment on why, see [this comment][1] for more details.

Tested with:

```
$ nix build .#legacyPackages.x86_64-linux.gitea.passthru.data-compressed
$ ls -lh result/public/assets/licenses.txt*
lrwxrwxrwx 1 root root  90 Jan  1  1970 result/public/assets/licenses.txt -> /nix/store/p21irsr57hckd3x3ym18aa0cr9zmm3an-gitea-1.22.1-data/./public/assets/licenses.txt
-r--r--r-- 1 root root 30K Jan  1  1970 result/public/assets/licenses.txt.br
-r--r--r-- 1 root root 82K Jan  1  1970 result/public/assets/licenses.txt.gz
```

[1]: https://github.com/NixOS/nixpkgs/pull/332752#discussion_r1721043286
2024-08-18 22:47:03 +03:00
Philip Taron
661aa513a1
writers: remove with statements from aliases 2024-08-18 06:31:14 -07:00
Philip Taron
c406a6ed33
fetchsvn: remove with statements 2024-08-18 06:31:14 -07:00
Felix Schröter
498d662662
make-startupitem: fix {prepend,append}ExtraArgs for Exec without arguments 2024-08-18 12:28:06 +02:00
github-actions[bot]
150d965bfb
Merge staging-next into staging 2024-08-17 18:01:41 +00:00
Yueh-Shun Li
51ef09110b singularity-tools: make runscript modifiable 2024-08-18 00:37:37 +08:00
Philip Taron
bc0fb46cd2
Merge pull request #334995 from pbsds/fix-test-version-1723771306 2024-08-17 07:53:03 -07:00
github-actions[bot]
7fab29afce
Merge staging-next into staging 2024-08-17 06:01:46 +00:00
Philip Taron
cd7b95ee37
Merge pull request #333236 from nbraud/testers/runCommand
testers.runCommand: init
2024-08-16 18:07:41 -07:00
Peder Bergebakken Sundt
ecb342fd4e testers.testVersion: ignore echoed store paths
Fixes the error mode where the test always passes if the store path of the binary is echoed by the test command.
2024-08-16 20:16:44 +02:00
Doron Behar
0d920a91a2
Merge pull request #225051 from ShamrockLee/go-module-overlay-stdenv
buildGoModule: Fix overriding with overlay-style stdenv
2024-08-16 15:44:15 +00:00
github-actions[bot]
4c8722e915
Merge staging-next into staging 2024-08-15 18:02:28 +00:00
Someone
10ce447aea
Merge pull request #333843 from ShamrockLee/singularity-tools-fixes2
singularity-tools: miscellaneous fixes (2nd round)
2024-08-15 17:29:01 +00:00
Yueh-Shun Li
c2eb0aa56e singularity-tools: don't preserve store content ownership
Don't preserve store content ownership to prepare for unprivileged-build
workflow.
2024-08-15 21:33:18 +08:00
Yueh-Shun Li
c229d14f50 singularity-tools: proper line looping with while-read 2024-08-15 21:33:06 +08:00
Yueh-Shun Li
5396a84b1d singularity-tools: string-interpolate and and quote members in contents
String-interpolation converts path objects inside `contents` into store
paths to ensure they are properly included in the result image.

See tests.trivial-builders.references for the necessity of
string-interpolation.

Quote each string-interpolated content member to accomodates spaces
inside.
2024-08-15 20:09:56 +08:00
github-actions[bot]
688ae1bcd3
Merge staging-next into staging 2024-08-15 12:02:43 +00:00
Pol Dellaiera
65c0e4ebf6
build-support/php: implement v2 2024-08-15 13:43:00 +02:00
Pol Dellaiera
b356a808fd
build-support/php: copy v1 into v2 2024-08-15 13:43:00 +02:00
Markus Kowalewski
b909e2c80d
Merge pull request #333444 from markuskowa/fix-mpi-check-hook
mpiCheckPhaseHook: update to use openmpi-5 compatible parameters
2024-08-15 11:34:51 +02:00
github-actions[bot]
78a583fbf0
Merge staging-next into staging 2024-08-15 06:01:41 +00:00
lassulus
4b3c31b884
Merge pull request #334776 from aos/aos/update-writepy3-example
fix: Update writePython3Bin docs
2024-08-15 07:42:45 +02:00
Aos Dabbagh
55e4114fb3 fix: Update writePython3Bin docs
Was trying out the recommended example for `writePython3Bin` and it
failed with:
```
Traceback (most recent call last):
  File "/nix/store/gcmhfm7mslpndjasfhvs66f1ca24vxim-test_py3/bin/test_py3", line 4, in <module>
    y = yaml.load("""
TypeError: load() missing 1 required positional argument: 'Loader'
```

Looks like `yaml.load(input)` was deprecated in 5.1: https://msg.pyyaml.org/load

`nixos-24.05` uses `6.0.1` so we're in the clear.
2024-08-15 00:57:39 -04:00
squalus
0a3ed67ff6
autoPatchelfHook: add keep_libc flag (#332617)
* autoPatchelfHook: add keep_libc flag

- Add keep_libc flag to disable the default libc handling. Intended
  to be used by systemd.
- Add autoPatchelfFlags to autoPatchelfHook for passing arguments to
  the autoPatchelf script

This reverts part of the change made in #307068 / 80be926.

Fixes #332533
2024-08-14 02:54:27 -04:00
github-actions[bot]
1582d7624e
Merge staging-next into staging 2024-08-14 06:01:31 +00:00
github-actions[bot]
261f1edcbd
Merge master into staging-next 2024-08-14 06:01:07 +00:00
adisbladis
bed19bdf39 fetchPypiLegacy: Pass cacert to enable TLS verification when username/password is used
The intent was for TLS verification to be enabled when transfering credentials only, and normally disabled for long-term reproducibility.

See https://github.com/nix-community/poetry2nix/issues/1740
2024-08-14 13:22:31 +12:00
adisbladis
e5d7d560f8
Merge pull request #334059 from adisbladis/fetchpypilegacy-netrc-pureeval
fetchPypiLegacy: pass NETRC via impureEnvVars if inPureEval
2024-08-14 13:16:46 +12:00
adisbladis
482a26382f fetchPypiLegacy: pass NETRC via impureEnvVars if inPureEval
Co-authored-by: Matthew Croughan <matt@croughan.sh>
2024-08-14 11:58:15 +12:00
Someone
ccaaa9ca53
Merge pull request #318614 from wolfgangwalther/structured-attrs-setup-hooks
treewide: support structuredAttrs in setup hooks
2024-08-13 19:29:36 +00:00
Martin Weinelt
0906206d42
Merge remote-tracking branch 'origin/master' into staging-next
Conflicts:
- pkgs/top-level/python-packages.nix
2024-08-13 13:21:03 +02:00
adisbladis
14e1662fa6
Merge pull request #334136 from hsjobeki/importNpmLock/opts
importNpmLock: init fetcherOps per package
2024-08-13 20:59:12 +12:00
Johannes Kirschbauer
3ed5055f0f
importNpmLock: init fetcherOps per package 2024-08-13 09:38:37 +02:00
Markus Kowalewski
b898495c9a mpiCheckPhaseHook: update to use openmpi-5 compatible parameters 2024-08-12 21:45:24 +02:00
github-actions[bot]
62f43c3094
Merge master into staging-next 2024-08-12 18:02:11 +00:00
Philip Taron
7fbfc53b54
Merge pull request #334176 from philiptaron/pr-333270/follow-up
pkgs.writers: improve documentation on {makeScriptWriter,makeScriptWriterBin}
2024-08-12 09:16:24 -07:00
Alyssa Ross
6f95189f88 wrapBintoolsWith: add s390(x)-linux dynamic linkers
This fixes autoPatchElfHook for these platforms.
2024-08-12 17:52:03 +02:00
Philip Taron
989f10d419
pkgs.writers: improve documentation on {makeScriptWriter,makeScriptWriterBin} 2024-08-12 08:42:11 -07:00
adisbladis
2a9ab9c1e0 fetchPypiLegacy: Reformat with nixfmt 2024-08-12 17:05:37 +12:00
Yueh-Shun Li
eed069a5bc buildGoModule: fix overrideAttrs overriding
Fix overriding of vendorHash and various attributes via the fixed point
attribute support of stdenv.mkDerivation.

Pass as derivation attributes
goModules, modRoot, vendorHash, deleteVendor, and proxyVendor.

Move goModules and vendorHash out of passthru.

Co-authored-by: Doron Behar <doron.behar@gmail.com>
2024-08-11 13:38:11 +08:00
Yueh-Shun Li
7487a6207d singularity-tools: quote shell variables 2024-08-11 13:22:39 +08:00
Yueh-Shun Li
4be1e115d6 singularity-tools: rename the VM mountpoint as "workspace" 2024-08-11 13:22:39 +08:00
Yueh-Shun Li
a7b54b36c5 singularity-tools: create VM disk image outside $out
Place the VM disk image in a local directory "disk-image" instead of
"$out", so that we don't have to delete it to reserve "$out" for the
container image.
2024-08-11 13:22:39 +08:00
Yueh-Shun Li
e8360a61bc singularity-tools: make extensible 2024-08-11 13:22:39 +08:00
Yueh-Shun Li
3ca6a8c60e singularity-tools: add bashInteractive and runScript into layerClosure 2024-08-11 13:22:02 +08:00
github-actions[bot]
45080a9559
Merge master into staging-next 2024-08-10 18:01:08 +00:00
Pol Dellaiera
c4e73af4dd
Merge pull request #284161 from felschr/make-startupitem-extra-args
make-startupitem: add `prependExtraArgs` and `appendExtraArgs`
2024-08-10 18:39:01 +02:00
Jörg Thalheim
7a3ae61af1
Merge pull request #333270 from hsjobeki/doc/writers
Pkgs.writers: improve and document {makeScriptWriter,makeScriptWriterBin}
2024-08-10 18:48:21 +03:00
Someone
a3a5fb4bbc
Merge pull request #332437 from ShamrockLee/singularity-tools-fixes
singularity-tools: miscellaneous fixes
2024-08-10 13:44:11 +00:00
github-actions[bot]
68894e5504
Merge master into staging-next 2024-08-10 00:02:11 +00:00
Sandro Jäckel
f4e18f55ef fetch-npm-deps: be less noisy
Before every package in node_modules was printed. Lets be a bit more
quiet and drop that.
2024-08-09 15:08:33 -04:00
Johannes Kirschbauer
85a8d22290
Pkgs.writers: document {makeScriptWriter,makeScriptWriterBin} 2024-08-09 14:13:02 +02:00
Yueh-Shun Li
a1318915d3 singularity-tools: deprecate build helpers mkLayer and shellScript
Deprecate singularity-tools.mkLayer and singularity-tools.shellScript,
for they are no longer related to image building.

Use writers.writeBash instead of singularity-tools.shellScript.
2024-08-09 09:15:52 +00:00
Yueh-Shun Li
d3692ddf54 singularity-tools: drop override argument storeDir 2024-08-09 09:09:52 +00:00
Yueh-Shun Li
c2fa248bca singularity-tools: fix singularity run with bashInteractive 2024-08-09 09:07:46 +00:00
nicoo
18dd486bb9 emptyFile: use SRI hash 2024-08-08 20:06:21 +00:00
nicoo
244229a8b6 python3Packages.bork: add test using testers.runCommand
This will serve as a “real-world” example, running tests requiring network.
2024-08-08 15:29:15 +00:00
nicoo
d0a96c6eda testers.runCommand: add, document, and test 2024-08-08 15:29:14 +00:00
nicoo
906598c914 testers: format inputs per RFC166 2024-08-08 13:26:37 +00:00
github-actions[bot]
d240a34ea6
Merge master into staging-next 2024-08-08 06:01:15 +00:00
David McFarland
7f2de09531
Merge pull request #331398 from MattSturgeon/dotnet-finalAttrs
buildDotnetModule: add `finalAttrs` support
2024-08-07 22:06:07 -03:00
github-actions[bot]
3c3dab7679
Merge master into staging-next 2024-08-08 00:02:33 +00:00
Philip Taron
b0b3172fb4
replaceVars: init 2024-08-07 07:27:50 -07: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
github-actions[bot]
3b5460f093
Merge staging-next into staging 2024-08-06 00:02:48 +00:00
Philip Taron
fcefb0a17c
Merge pull request #332558 from motiejus/compressDrv
compressDrv: get rid of unneeded extra params
2024-08-05 14:58:06 -07:00
Philip Taron
1e6e7faa18
Merge pull request #332466 from hsjobeki/doc/compressDrv
Doc: pkgs{compressDrv,compressDrvWeb} improve clarity
2024-08-05 14:56:30 -07:00
Motiejus Jakštys
6b70cde244 compressDrv: get rid of unneeded extra params
This is a leftover from the original versions of #292324. Reduces the
API surface to not accept accidental arguments.
2024-08-05 23:26:17 +03:00
github-actions[bot]
cf88251824
Merge staging-next into staging 2024-08-05 18:01:40 +00:00
Marcus Ramberg
8e931f3330
Merge pull request #332462 from bolives-hax/bootstrap-tools-cross-add-s390x
Bootstrap tools cross add s390x
2024-08-05 18:41:17 +02:00
Johannes Kirschbauer
782c1eabe2
Docs: pkgs{compressDrv,compressDrvWeb} improve clarity 2024-08-05 14:16:54 +02:00
github-actions[bot]
b4c408518b
Merge staging-next into staging 2024-08-05 12:01:48 +00:00
Maximilian Bosch
d8446a5095
Merge pull request #332226 from dotlambda/nextcloud
fetchNextcloudApp: use fetchurl by default
2024-08-05 11:37:14 +00:00
Robert Schütz
da8b0f0621 fetchNextcloudApp: use fetchurl by default 2024-08-05 03:53:38 -07:00
bl0v3
bdb500ace1 bintools-wrapper: add dynamicLinker for s390x 2024-08-05 12:30:26 +02:00
Vladimír Čunát
d4720e9c1e
Merge branch 'staging-next' into staging
There was a nontrivial conflict in pkgs/stdenv/linux/bootstrap-tools*
(reorganizing code vs. modifying it)  I hope I really got it right.
2024-08-05 11:05:55 +02:00
Yueh-Shun Li
ae8017ec0b singularity-tools: move defaultSingularity let-in to the top 2024-08-05 08:24:56 +08:00
Yueh-Shun Li
41061c6754 singularity-tools.buildImage: remove gawk from nativeBuildInputs 2024-08-05 08:24:55 +08:00
Yueh-Shun Li
912bf66199 singularity-tools.buildIname: use nativeBuildInputs and strictDeps 2024-08-05 08:24:55 +08:00
Yueh-Shun Li
99b7831572 singularity-tools.buildImage: use .sif instead of .img as image name suffix 2024-08-05 08:24:54 +08:00
Yueh-Shun Li
fd956cc3a9 singularity-tools: name sandboxed meta directory .singularity.d
Name the directory inside SIF (the SquashFS image) ".singularity.d"
instead of ".${projectName}.d" for compatibility across Apptainer and
Singularity.
2024-08-05 08:24:54 +08:00
Someone
976c81ad91
Merge pull request #332168 from ShamrockLee/singularity-tools-format
singularity-tools: format expression
2024-08-05 02:58:21 +03:00
Motiejus Jakštys
bbd0655ae8 add compressDrv and compressDrvWeb
*compressDrv* compresses files in a given derivation.

*compressDrvWeb* compresses a derivation for a loosely-defined
pre-compressed "web server" usage.

This intends to replace the `passthru.data-compressed` derivations that
have accumulated in nixpkgs with something more reusable.
2024-08-04 10:10:16 +03:00
Yueh-Shun Li
d17eef519d singularity-tools: rearrarnge the input parameters 2024-08-04 13:38:47 +08:00
Yueh-Shun Li
bcece72177 singularity-tools: format with nixfmt-rfc-style (Nix RFC 166) 2024-08-04 13:24:18 +08:00
Aleksana
85bcad4a96
Merge pull request #304583 from rayanpiro/sparse-protocol
rustPlatform.importCargoLock: Adding sparse protocol
2024-08-03 21:23:13 +08:00
Wolfgang Walther
d7c257035d
setup-hooks/autoreconf: support structuredAttrs
Tested db with and without __structuredAttrs.
2024-08-03 12:56:08 +02:00
github-actions[bot]
78947ebef4
Merge staging-next into staging 2024-08-02 12:01:52 +00:00
Jörg Thalheim
b475b0c767
Merge pull request #331712 from Mic92/fix-netboot
Fix netboot
2024-08-02 12:34:54 +02:00
Jörg Thalheim
3de4714572 make-initrd-ng: also print json itself if it fails to parse
The current error message is hard to debug because the error is in the
nix store:

> Error: failed to parse JSON in
"/build/.attr-1s42g1c76fxb77skzq0b4wdhcrg8jmzb54czmxvh1qm7psgsbcni"
>
> Caused by:
> missing field `source` at line 1 column 102
>
> Location:
> src/main.rs:329:10
2024-08-02 10:24:34 +02:00
Matt Sturgeon
77a13aa9ad
buildDotnetModule: format with nixfmt 2024-08-01 13:58:28 +01:00
Robert Schütz
2c1d58e90c nextcloudPackages: update
We no longer use fetchzip because nc4nix no longer unpacks the tarball
before computing the hash.
2024-08-01 04:13:25 -07:00
K900
a4a42b3aec Merge remote-tracking branch 'origin/staging-next' into staging 2024-08-01 08:57:50 +03:00
David McFarland
ebd3b37e6b
Merge pull request #327651 from corngood/dotnet-unpacked-packages
dotnet: use unpacked packages in store
2024-07-31 20:20:13 -03:00
K900
4f29b5a16b Merge remote-tracking branch 'origin/staging-next' into staging 2024-07-31 08:57:17 +03:00
David McFarland
d3ca5027fa dotnet: use unpacked nuget packages 2024-07-31 00:47:14 -03:00
Guillaume Girol
19178a0b4b
Merge pull request #329652 from dragano/expose-appimage-var
appimage-run: Expose $APPIMAGE
2024-07-30 23:17:18 +02:00
David McFarland
7402aa90cf buildDotnetModule: fix typo 2024-07-30 12:16:45 -03:00
David McFarland
b87ddc0dd5 nuget-to-nix: catch errors from process substitution 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
Matthieu Coudron
ca1657217d
streamLayeredImage: add dynamic tagging of docker image (#329425)
* streamLayeredImage: self-document the script

'podman load' doesn't let me override the name/tag from the image.
This name and tag is dynamic and in a CI environment so I would like to
be able to adjust the tag dynamically.
Since the image is streamed by stream_layered_image.py, there is no need
to stick with the nix-hardcoded image name/tag: the python script can
accept another name

I've added argparse to expose the feature. It has the added benefit of
adding `--help` support to the script, which makes its usage
self-explanatory.

* blackified file
2024-07-29 19:45:58 +02:00
Minijackson
24655f7804
patch-shebangs: don't patch shebangs with bash builtins
'command -v builtin' returns 'builtin', which doesn't suit us since
we're looking for program in the given PATH. This could give us shebangs
like this:

    #!builtin

which is surprising.

Switch to 'type -P command' which always returns a path, even if command
is both a builtin and an executable (for example 'test'), or fail is
'command' is just a builtin.
2024-07-29 11:40:29 +02:00
Robert Hensing
c38f9ee113
Merge pull request #324789 from NixOS/devShellTools-env
`devShellTools`: add environment functions
2024-07-29 10:00:40 +02:00
Jörg Thalheim
5356420466 treewide: remove unused with statements from maintainer lists
$ find -type f -name '*.nix' -print0 | xargs -P "$(nproc)" -0 sed -i \
  -e 's!with lib.maintainers; \[ *\];![ ];!' \
  -e 's!with maintainers; \[ *\];![ ];!'
2024-07-29 10:06:20 +08:00
Randy Eckenrode
9a4c598e0a
Merge pull request #317224 from ju1m/NIX_CFLAGS_COMPILE
cc-wrapper: fix -Bprefix to not confuse lib/libc++.so and bin/c++
2024-07-28 20:18:22 -04:00
github-actions[bot]
2b898b30ea
Merge staging-next into staging 2024-07-29 00:03:08 +00:00
Yueh-Shun Li
010277de84 buildGoModule: respect user-specified passthru
Prioritize user-specified passthru arguments over those added by
buildGoModule.
2024-07-29 06:47:12 +08:00
Robert Hensing
b5389e2ae9 nixosTests.docker-tools-nix-shell: Enable on aarch64-linux
The docker-tools test, where this originates, was not run on aarch64-linux, but this is an artifact of its age more so than anything else.

Co-authored-by: Ivan Trubach <mr.trubach@icloud.com>
2024-07-29 00:23:05 +02:00
Robert Hensing
32c9e3193c tests.devShellTools: Fix release.nix / ofborg eval 2024-07-28 23:19:58 +02:00
Robert Hensing
b3561f17f6 devShellTools.unstructuredDerivationInputEnv: Support older Nix 2024-07-28 23:19:58 +02:00
Robert Hensing
412601690e build-support/docker/default.nix: Refer to docs and tests
This removes redundant inline docs, because
- users should consult the better docs in the manual,
- contributors should add to the manual, not the inline comments
2024-07-28 23:19:58 +02:00
Robert Hensing
6881d9b181 nixosTests.docker-tools-nix-shell: Extract
These tests should run as part of the `tests.devShellTools` suite,
and they're a significant portion of the general docker tools test
duration.
2024-07-28 23:19:56 +02:00
Robert Hensing
1cf3103bca devShellTools.unstructuredDerivationInputEnv: Match passAsFile basename 2024-07-28 23:17:18 +02:00
Robert Hensing
7237aa700f devShellTools: Docs, fix args env 2024-07-28 23:17:18 +02:00
Robert Hensing
bde2e05c70 devShellTools.unstructuredDerivationInputEnv: Skip args 2024-07-28 23:17:18 +02:00
Robert Hensing
33aaac17c5 devShellTools.unstructuredDerivationInputEnv: Return attrsOf str
... and test it.
2024-07-28 23:17:18 +02:00
Robert Hensing
43df2b50f9 devShellTools.{unstructuredDerivationInputEnv,derivationOutputEnv}: extract 2024-07-28 23:17:18 +02:00
Atemu
142b0dcd96
Merge pull request #330478 from SuperSandro2000/bwrap-no-chroot
buildFHSEnv: replace all chroot occurences with generic names
2024-07-28 23:00:08 +02:00
Sandro Jäckel
cd11c4bba3
buildFHSEnv: replace all chroot occurences with generic names
Co-authored-by: Atemu <git@atemu.net>
2024-07-28 22:39:35 +02:00
Sandro Jäckel
3bc32efbc8
buildFHSEnv: use relative symlinks
If we would add more commands below which I did for debugging purposes,
the symlinks wouldn't be valid.
2024-07-28 21:18:39 +02:00
Julien Moutinho
97c400a0e8 cc-wrapper: fix -Bprefix to not confuse lib/libc++.so and bin/c++
Before this commit, `pkgs/build-support/cc-wrapper/add-flags.sh`
was using `-B@out@/bin` instead of `-B@bintools@/bin`
to force `cc` to use `ld-wrapper.sh` when calling `ld`.
That was confusing `cc` when asked to print
the location of a library precisely named `c++`
because `-B` prefixes are also used by `cc` to find libraries,
see https://gcc.gnu.org/onlinedocs/gcc/Directory-Options.html#index-B

Indeed, instead of having `cc --print-file-name c++`
failing to found a `c++` library and just returning the given `c++` string
to let a linker resolve it thereafter,
it was finding that `@out@/bin/c++` executable,
mistaking it for a library and returning its absolute path,
forcing the linker to load an executable as a library.

Before this commit:

```console
$ nix run -f . stdenv.cc -- --print-file-name c++
/nix/store/9bv7dcvmfcjnmg5mnqwqlq2wxfn8d7yi-gcc-wrapper-13.2.0/bin/c++
```

After this commit:

```console
$ nix run -f . stdenv.cc -- --print-file-name c++
c++
```

Fixes https://gitlab.haskell.org/ghc/ghc/-/issues/23138#note_567034
where this behavior was breaking GHC on Darwin.

[Confirmed by @414owen](https://github.com/NixOS/nixpkgs/pull/317224#issuecomment-2171276177):

> This fixed all our haskell builds on Arm64 darwin, which were trying
> to link in clang++...
2024-07-28 20:55:32 +02:00
Robert Scott
48bde3a189 cc-wrapper: add support for pacret hardening flag on aarch64 2024-07-28 19:27:14 +01:00
tomberek
cc7b011fe1
Merge pull request #318034 from ExpidusOS/feat/zig-cc
Add stdenv & CC support for Zig
2024-07-28 14:09:31 -04:00
Emily
8a837af302
Merge pull request #326819 from risicle/ris-shadowstack
cc-wrapper: add support for `shadowstack` hardening flag
2024-07-28 19:07:52 +01:00
github-actions[bot]
38b57cc2a9
Merge staging-next into staging 2024-07-28 12:01:38 +00:00
Vladimír Čunát
a5b2fe7374
Merge #328673: staging-next 2024-07-20 2024-07-28 13:45:55 +02:00
Robert Hensing
4ca52fdf5f
Merge pull request #323613 from CyberShadow/fix-nix-path-without-channels-v2
nix-channel: do not set empty nix-path when disabling channels
2024-07-28 13:31:10 +02:00
Tristan Ross
9f589ea3a0
arocc: init at 0-unstable-06-01 2024-07-27 19:43:41 -07:00
Tristan Ross
e9fb54b256
cc-wrapper: add zig 2024-07-27 19:43:40 -07:00
github-actions[bot]
8c2e73a4ed
Merge staging-next into staging 2024-07-26 18:01:39 +00:00
Randy Eckenrode
2c54952847
darwin.apple_sdk.frameworks: remove NIX_COREFOUNDATION_RPATH hook
Darwin no longer supports switching between CoreFoundation implementations as of https://github.com/NixOS/nixpkgs/pull/265102. The setup hook is vestigial and was mostly harmless until https://github.com/NixOS/nixpkgs/pull/329526 was necessitated to fix build failures on staging-next https://github.com/NixOS/nixpkgs/pull/328673.

The correct fix is to remove the hook. It’s not used by the 11.0 or 12.3 SDKs. This makes the 10.12 SDK a bit more like the other SDKs.
2024-07-26 12:41:45 -04:00
Martin Weinelt
93f4195fe0
Merge remote-tracking branch 'origin/master' into staging-next
Conflicts:
- pkgs/applications/graphics/seamly2d/default.nix
2024-07-26 18:05:04 +02:00
Sigmanificient
6dd44107ac treewide: remove unused lib (and other) arguments 2024-07-26 11:18:09 +02:00
tomberek
4f6603762b
Merge pull request #329584 from ExpidusOS/fix/pkgsllvm/xorg/libx11
xorg.libX11: fix compiling with llvm
2024-07-25 19:01:06 -04:00
github-actions[bot]
f20ed12f93
Merge master into staging-next 2024-07-25 12:01:18 +00:00
Adam Joseph
9cac7a7475 fetch-yarn-deps: improve diagnostic messages
When the hash of an url being fetched does not match the expected value, this
commit will cause fetch-yarn-deps to include the url in the error message to
assist debugging.
2024-07-25 11:37:44 +02:00
Adam Joseph
84a75e9488 fetchYarnDeps: fix broken fetching logic for github releases
When a dependency references a github *release* URL, that dependency must be
fetched using https rather than git, since github does not require that
release tarballs have any relationship whatsoever to the git history.

This commit causes them to be fetched using https, not git.

A test case (which fails prior to this commit, and passes afterwards) is included.
2024-07-25 11:37:39 +02:00
Tristan Ross
3c6127cf01
cc-wrapper: exclude clang flags when cpp 2024-07-24 20:31:38 -07:00
github-actions[bot]
7208220b63
Merge master into staging-next 2024-07-24 18:01:18 +00:00
Robert Hensing
c5e5aa7266
Merge pull request #308822 from yorickvP/yorickvp/streamLayeredImage-overridable
dockerTools.streamLayeredImage: add includeNixDB argument, expose conf and streamScript
2024-07-24 16:02:35 +02:00
Christoph Traut
20a037237c appimage-run: Expose $APPIMAGE
Is supposed to be visible by the AppImage: https://docs.appimage.org/packaging-guide/environment-variables.html
2024-07-24 15:17:30 +02:00
github-actions[bot]
8402add1f4
Merge master into staging-next 2024-07-24 12:01:12 +00:00
Artturin
60e9cffe2c Merge branch 'master' into staging-next 2024-07-22 22:53:31 +03:00
Anderson Torres
539575ab2b treewide: remove yana from meta.maintainers [orphans] 2024-07-22 16:22:39 -03:00
Franz Pletz
719e8e672b
Merge pull request #328876 from katexochen/buildGoPackage/deprecate 2024-07-21 22:32:03 +02:00
Paul Meyer
b6c7f1bfd6 buildGoPackage: deprecate
Signed-off-by: Paul Meyer <49727155+katexochen@users.noreply.github.com>
2024-07-21 12:50:54 +02:00
Will Fancher
6f959a9e96 nixos/make-initrd-ng: dlopen ELF notes 2024-07-21 06:31:42 -04:00
Will Fancher
e6c544270c nixos/make-initrd-ng: Pass contents as JSON 2024-07-21 06:31:42 -04:00
Arian van Putten
80be92660e autoPatchelfHook: add support for .note.dlopen
also retain libc in rpath if it was there originally
2024-07-21 06:25:51 -04:00
Will Fancher
ffbecb3c19 autoPatchelfHook: Stop using deprecated alias types 2024-07-21 06:25:51 -04:00
github-actions[bot]
be3262bae8
Merge master into staging-next 2024-07-21 00:02:58 +00:00
Alyssa Ross
f03d6497cb separateDebugInfo: tell rustc not to strip
There's no point generating debug info if the compiler immediately
strips it before we get a chance to do anything with it.

This is especially important since Cargo 1.77, which asks rustc to
strip by default.
2024-07-20 10:05:57 +02:00
Ivan Trubach
b40d043d5a test.testers: update tests for testers.testEqualContents
Updates tests for testers.testEqualContents with diffoscope and fixes
some bugs in tests (e.g. fileDiff always succeed because subshell does
not inherit errexit option).
2024-07-20 04:32:20 +03:00
github-actions[bot]
401d4660b3
Merge staging-next into staging 2024-07-18 18:01:57 +00:00
Ivan Trubach
fc5c829532 testers.testEqualContents: use diffoscope instead of diffing find output
Before this change, testers.testEqualContents implementation had several
bugs (e.g. executables at different paths were not considered equal). So
we switch to diffoscope that that is designed to handle exactly these
kinds of comparisons and gives more insights into the differences in the
output.
2024-07-18 19:33:44 +03:00
Ivan Trubach
b631366870 test.testers: add failing tests for testers.testEqualContents
This change adds tests for tests.testEqualContents to demonstrate that
the current implementation is failing in some cases.
2024-07-18 18:49:57 +03:00
lassulus
cb1303b5bc
Merge pull request #325619 from MatthewCroughan/mc/vmtools-custom-qemu
vmTools: allow qemu to be overridden via customQemu argument
2024-07-18 16:07:23 +02:00
K900
999be9b339
Merge pull request #279789 from nazarewk/hardware-firmware-edid-fix
nixos/hardware.display: init module
2024-07-18 17:02:02 +03:00
Krzysztof Nazarewski
4ede20cc6f makeModulesClosure: include /lib/firmware/edid
modules-closure.sh seems to consider everything under
 /lib/firmware to be a kernel module,
 this change adds a special handling of `edid` directory,
 which does not contain kernel modules

fixes #279739
2024-07-18 16:57:18 +03:00
Ivan Trubach
c2e1be3be0 doc: fixup doc/build-helpers references 2024-07-18 14:15:53 +03:00
Randy Eckenrode
f9b7f4ec09
tree-wide: use top-level cctools 2024-07-17 22:36:19 -04:00
Weijia Wang
078fdedf26 Merge branch 'staging-next' into staging 2024-07-17 13:10:23 +02:00
Florian Nagel
e18d3b4894
Added an error message when using enableFakechroot on Darwin (#327336)
* Added an error message when using enableFakechroot on Darwin

Co-authored-by: Valentin Gagarin <valentin@gagarin.work>
2024-07-17 10:06:42 +02:00
toonn
c3c5870e96
Merge pull request #307880 from reckenrode/ld64
cctools: 973.0.1 -> 1010.6
2024-07-17 08:22:14 +02:00
Robert Hensing
3fb14db08a testers.shellcheck: init
Needed for testing upcoming commit.
2024-07-16 20:10:02 +02:00
github-actions[bot]
df8055b727
Merge staging-next into staging 2024-07-16 18:01:37 +00:00
Artturin
a516ea8c99 Merge branch 'staging-next' into staging 2024-07-16 19:07:48 +03:00
Smaug123
7924a2513e
dotnet: fix fetchDeps null handling 2024-07-16 08:34:23 +01:00
David McFarland
d50a509660
Merge pull request #326785 from Smaug123/nuget-deterministic
dotnet: strip signature files from NuGet
2024-07-14 21:23:38 -03:00
Smaug123
368fc1c5b1
dotnet: strip signature files from NuGet packages 2024-07-14 22:41:30 +01:00
Robert Scott
b207b6ef74 cc-wrapper: add support for shadowstack hardening flag 2024-07-14 21:25:47 +01:00
Atemu
476b450df8
Merge pull request #272380 from chayleaf/gradle2
gradle: add setup hook
2024-07-14 22:08:41 +02:00
Vladimír Čunát
211398c03e
Merge branch 'staging-next' into staging 2024-07-14 08:35:35 +02:00
David McFarland
417776fc8a
Merge pull request #316362 from Smaug123/fetchdeps-script
buildDotnetModule: split fetch-deps script to new file
2024-07-13 21:10:17 -03:00
Randy Eckenrode
c922cb27b6
bintools-wrapper: drop postLinkSignHook
When the linker signs a Mach-O binary, it sets a flag in the signature’s code directory indicating that the signature was generated by a linker. Tools such as `strip` and `install_name_tool` read this flag and will
update ad hoc signatures after they perform their modifications.

The updated l64 supports signing binaries automatically. Both the updated cctools and LLVM will check for the linker-signed flag and resign binaries they modify automatically when it’s present. Given that, use of postLinkSignHook is unnecessary and potentially harmful.

In particular, if the hook is used and an unwrapped `strip` or `install_name_tool` is on the user’s path, they will not automatically update an ad hoc signature. Instead, they will issue a warning and create a binary with a broken signature.

It is more robust to let the tools handled this since the only time a signature would not be linker-signed is when the user is manually invoking `codesign` (or another tool such as `sigtool` or `rcodesign`), which by nature of the invocation updates the signature to a valid  one.

Since `strip` no longer needs to be wrapped for code-signing, binutils-wrapper now uses the GNU strip wrapper on Darwin.

Fixes https://github.com/NixOS/nixpkgs/issues/208951.
2024-07-13 17:54:36 -04:00
Randy Eckenrode
4712e8fe80
libredirect: use llvmPackages unconditionally
Darwin and its bootstrap tools both use LLVM 16, which is sufficient for
arm64e support in LLVM. Thsi change removes an unnecessary LLVM 13 build
from the stdenv bootstrap.
2024-07-13 10:59:41 -04:00