Commit Graph

7455 Commits

Author SHA1 Message Date
github-actions[bot]
fecd99b105
Merge staging-next into staging 2023-11-09 06:01:40 +00:00
github-actions[bot]
4aad65bfdb
Merge master into staging-next 2023-11-09 06:01:11 +00:00
Shogo Takata
d6e1c7cae6
fetchgit: shallow clone for submodules (#254172) 2023-11-09 04:32:13 +02:00
github-actions[bot]
d0018c61ff
Merge staging-next into staging 2023-11-07 18:01:28 +00:00
Maximilian Bosch
be31242d37
Merge pull request #265414 from lheckemann/fix-empty-closureInfo
closureInfo: handle empty path set explicitly
2023-11-07 17:18:10 +01:00
Weijia Wang
8012034692 Merge branch 'staging-next' into staging 2023-11-07 03:41:49 +01:00
github-actions[bot]
8541e5ab09
Merge master into haskell-updates 2023-11-07 00:12:32 +00:00
github-actions[bot]
38bc2a577e
Merge master into staging-next 2023-11-07 00:02:31 +00:00
Artturi
59ff987fed
Merge pull request #264684 from ShamrockLee/shellcheck-minimal 2023-11-06 23:19:00 +02:00
Weijia Wang
32da89a1a1 Merge branch 'master' into staging-next 2023-11-06 14:33:18 +01:00
K900
fa40d6457a nix-prefetch-git: download submodules with --progress 2023-11-05 20:49:03 +03:00
Linus Heckemann
bdd23d10b2 closureInfo: handle empty path set explicitly
Arguably, this is a bug in Nix's structuredAttrs: without
structuredAttrs, exportReferencesGraph with an empty path set would
still result in information being provided. With structuredAttrs, no
info is provided for an empty path set.

Nevertheless, we need to be able to build even if Nix has the bug, so
work around it by checking for an empty path set and handling it
explicitly.
2023-11-04 09:54:41 +01:00
github-actions[bot]
0f196bb1eb
Merge master into haskell-updates 2023-11-01 00:13:02 +00:00
Yueh-Shun Li
409f95731e shellcheck-minimal: init
Expose the minimal and stripped shellcheck package used by writeShellApplication.
2023-11-01 06:23:04 +08:00
github-actions[bot]
f190372f1f
Merge staging-next into staging 2023-10-31 12:01:49 +00:00
github-actions[bot]
2fd5f8dd7a
Merge master into staging-next 2023-10-31 12:01:11 +00:00
Ryan Lahfa
b10994c38c
Merge pull request #220429 from amjoseph-nixpkgs/pr/build-rust-crate/cross/linker 2023-10-31 12:12:17 +01:00
Naïm Favier
29a23fb4f9
Merge pull request #262814 from ncfavier/agda-updates
Agda 2.6.4 updates
2023-10-29 20:53:55 +01:00
Artturi
a42eddb8dd
Merge pull request #202575 from Cloudef/darwin-include-so-files 2023-10-28 22:02:49 +03:00
github-actions[bot]
519b7ea0c3
Merge master into staging-next 2023-10-28 12:01:19 +00:00
hacker1024
bc82281e01 buildDartApplication: Generate Dart wrapper with symlinkJoin 2023-10-28 21:52:36 +11:00
Eirik Wittersø
2fd6af1929 fetchFromBittorrent: Rename to fetchtorrent 2023-10-28 11:32:10 +01:00
Jari Vetoniemi
0c73f39dab darwin: fix also .so names in darwin
Darwin does not actually require `*.dylib` extension, and some ports of
unix software may still simply compile and install these as `*.so` files.

Include `*.so` in the find in this case.

Co-authored-by: Artturi <Artturin@artturin.com>
Co-authored-by: toonn <toonn@toonn.io>
2023-10-28 00:00:52 +02:00
Vladimír Čunát
d811555465
Merge branch 'staging' into staging-next 2023-10-26 10:36:50 +02:00
Atemu
e2d06c5695
Merge pull request #263201 from LunNova/lunnova/build-fhs-env-no-usr-lib
build-fhsenv-bubblewrap: remove /usr/lib and /usr/lib32 from LD_LIBRARY_PATH
2023-10-25 19:03:08 +02:00
Naïm Favier
6c2b227d34
agdaPackages.*: support literate Typst files 2023-10-24 20:34:05 +02:00
Robert Hensing
c1dc59dc8c
Merge pull request #263096 from hercules-ci/clean-up-data-writers
Clean up data writers
2023-10-24 16:18:17 +02:00
Luna Nova
a9600ce894
build-fhsenv-bubblewrap: remove /usr/lib and /usr/lib32 from LD_LIBRARY_PATH
See https://github.com/NixOS/nixpkgs/issues/262775
2023-10-24 07:13:33 -07:00
Robert Hensing
a6622bf00a writers/test: Refactor
It now also checks the executable bit.
2023-10-24 11:17:38 +02:00
Robert Hensing
e64f987fd6 writers.makeDataWriter: Deprecate 2023-10-24 11:17:38 +02:00
Robert Hensing
79130267d3 writers/data.nix: Remove duplicate implementations 2023-10-24 11:17:38 +02:00
Pol Dellaiera
8ecf5abf79
Merge pull request #262388 from drupol/php/build-support/make-validation-non-blocking
build-support/php: make validation check a non blocking process
2023-10-24 08:41:49 +02:00
Robert Scott
25920d8de2
Merge pull request #253194 from risicle/ris-nix-hardening-enable-fortify3-imply-fortify
cc-wrapper: ensure `NIX_HARDENING_ENABLE` `fortify3` implies `fortify` too
2023-10-23 19:23:02 +01:00
github-actions[bot]
2c2c0379b7
Merge staging-next into staging 2023-10-23 12:02:04 +00:00
Adam Joseph
4fc0e33698 buildRustPackage: add isMips64n32 to badPlatforms
Rust is not yet able to target the n32 ABI on mips64.

Let's add `isMips64n32` to the `meta.badPlatforms` of all
derivations created by buildRustPackage.

I use this to automatically detect which packages on my system can
be built for n32 (almost all of them) and build those using n32, and
the few packages (mainly those that depend on boost or rust) that
can't for n64.
2023-10-23 08:38:25 +00:00
Adam Joseph
3bd3809d0e buildRustCrate: add isMips64n32 to badPlatforms
Rust is not yet able to target the n32 ABI on mips64.

Let's add `isMips64n32` to the `meta.badPlatforms` of all
derivations created by buildRustCrate.

I use this to automatically detect which packages on my system can
be built for n32 (almost all of them) and build those using n32, and
the few packages (mainly those that depend on boost or rust) that
can't for n64.
2023-10-23 08:38:25 +00:00
github-actions[bot]
9f5438ccdf
Merge staging-next into staging 2023-10-23 06:01:38 +00:00
Adam Joseph
0b2036cad0 cc-wrapper: fix -mtune= validation, add ARM, add fallbacks
Before this commit, cc-wrapper/default.nix was using
`isGccArchSupported` to validate `-mtune=` values.  This has two
problems:

- On x86, `-mtune=` can take the same values as `-march`, plus two
  additional values `generic` and `intel` which are not valid for
  `-march`.

- On ARM, `-mtune=` does not take the same values as `-march=`;
  instead it takes the same values as `-mcpu`.

This commit fixes these two problems by adding a new
`isGccTuneSupported` function.  For `isx86` this returns `true` for
the two special values and otherwise defers to `isGccArchSupported`.

This commit also adds support for `-mtune=` on Aarch64.

Unfortunately on Aarch64, Clang does not accept as wide a variety of
`-mtune=` values as Gcc does.  In particular, Clang does not tune
for big.LITTLE mixed-model chips like the very popular RK3399, which
is targeted using `-march=cortex-a72.cortex-a53` in gcc.

To address this problem, this commit also adds a function
`findBestTuneApproximation` which can be used to map
clang-unsupported tunings like `cortex-a72.cortex-a53` to
less-precise tunings like `cortex-a53`.

The work which led to this commit arose because we now have
packages, like `crosvm`, which use *both* `clang` *and* `gcc`.
Previously I had been using `overrideAttrs` to set
`NIX_CFLAGS_COMPILE` on a package-by-package basis based on which
compiler that package used.  Since we now have packages which use
*both* compilers, this strategy no longer works.

I briefly considered splitting `NIX_CFLAGS_COMPILE` into
`NIX_CFLAGS_COMPILE_GCC` and `NIX_CFLAGS_COMPILE_CLANG`, but since
`NIX_CFLAGS_COMPILE` is sort of a hack to begin with I figured that
adding the logic to `cc-wrapper` would be preferable.
2023-10-23 01:31:21 +00:00
github-actions[bot]
4312247c19
Merge staging-next into staging 2023-10-22 12:01:52 +00:00
Artturi
41222ebcf2
Merge pull request #262675 from Artturin/addcomment
expand-response-params: explain what a "response file" is
2023-10-22 10:57:11 +03:00
Artturin
bd8d94aa69 expand-response-params: explain what a "response file" is
Co-authored-by: Adam Joseph <adam@westernsemico.com>
2023-10-22 08:57:24 +03:00
github-actions[bot]
09fabcdc4e
Merge staging-next into staging 2023-10-22 00:03:08 +00:00
github-actions[bot]
1cf369a0dd
Merge master into staging-next 2023-10-22 00:02:31 +00:00
Maciej Krüger
b465d339b3
Merge pull request #231483 from hacker1024/feature/flutter-on-dart
buildFlutterApplication: Wrap buildDartApplication
2023-10-21 23:42:02 +02:00
hacker1024
98a7a5edd3 dartHooks.dartFixupHook: Add trailing newline 2023-10-22 00:42:07 +11:00
hacker1024
2addb67a14 buildFlutterApplication: Wrap buildDartApplication 2023-10-22 00:31:58 +11:00
hacker1024
becdfbe17c buildDartApplication: Recognise extraWrapProgramArgs 2023-10-22 00:14:42 +11:00
github-actions[bot]
682b6995b4
Merge staging-next into staging 2023-10-21 12:01:45 +00:00
github-actions[bot]
0c34dab04f
Merge master into staging-next 2023-10-21 12:01:08 +00:00
hacker1024
5391c0204e buildDartApplication: Allow passing a sdkSetupScript 2023-10-21 22:37:01 +11:00
hacker1024
6298ac2774 buildDartApplication: Use package override mechanism from buildFlutterApplication
This allows Dart applications to benefit from the package override system, which is useful for things like FFI dependencies.
2023-10-21 22:30:23 +11:00
nikstur
6958acea7e
Merge pull request #262179 from ElvishJerricco/systemd-stage-1-specific-fs-packages
systemd-stage-1: Use specific fs packages
2023-10-21 13:25:42 +02:00
hacker1024
234b63b0f0 buildDartApplication: Allow supplying runtime dependencies 2023-10-21 22:22:02 +11:00
hacker1024
64c638bfc0 fetchDartDeps: Disable install phase in depsListDrv 2023-10-21 22:13:12 +11:00
hacker1024
eeb3936722 buildDartApplication: Format with nixpkgs-fmt 2023-10-21 21:54:21 +11:00
Pol Dellaiera
46a7c4cade
build-support/php: add composerStrictValidation attribute
Set to `true` by default
2023-10-21 11:15:51 +02:00
github-actions[bot]
613d60266a
Merge staging-next into staging 2023-10-21 00:02:49 +00:00
github-actions[bot]
fb3e2499b7
Merge master into staging-next 2023-10-21 00:02:17 +00:00
Pol Dellaiera
921e3c16cc
build-support/php: add colors in case of errors 2023-10-20 23:39:53 +02:00
Artturin
4b0c265153 fetchdocker: fix missing lib 2023-10-20 12:45:52 +03:00
Will Fancher
18013cc71e systemd-stage-1: Use specific fs packages 2023-10-19 21:13:22 -04:00
github-actions[bot]
024144542b
Merge staging-next into staging 2023-10-19 18:01:22 +00:00
github-actions[bot]
0bcaa2f556
Merge master into staging-next 2023-10-19 18:00:54 +00:00
Thiago Kenji Okada
a00733f592
Merge pull request #261115 from con-f-use/master
writeShellApplication: exclude shell checks
2023-10-19 18:37:37 +01:00
github-actions[bot]
fe1d100fb0
Merge staging-next into staging 2023-10-19 12:01:37 +00:00
github-actions[bot]
25bcfa6c2f
Merge master into staging-next 2023-10-19 12:01:00 +00:00
Gabriel Volpe
4a2788ea2a
appimageTools.extract: add postExtract option (#261190) 2023-10-19 08:23:57 +00:00
github-actions[bot]
c12ce83e4e
Merge staging-next into staging 2023-10-18 18:01:38 +00:00
github-actions[bot]
de8dd334ab
Merge master into staging-next 2023-10-18 18:01:05 +00:00
matthewcroughan
b289b43bf8 fetchFromBittorrent: init
Adds a basic FOD Fetcher for Bittorrent that uses Transmission as a client

Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2023-10-18 14:07:42 +01:00
github-actions[bot]
07245b90f3
Merge staging-next into staging 2023-10-18 00:02:49 +00:00
github-actions[bot]
35eee590be
Merge master into staging-next 2023-10-18 00:02:17 +00:00
Pol Dellaiera
614182f9e0
Merge pull request #261582 from NixOS/php/build-support/fix-diff-and-env-vars
php/build-support: fix `diff` command and env. variables
2023-10-17 21:19:55 +02:00
github-actions[bot]
c99731d9ac
Merge staging-next into staging 2023-10-17 18:01:44 +00: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
Alyssa Ross
acf111d42b
Merge remote-tracking branch 'origin/master' into staging-next
Conflicts:
	pkgs/development/python-modules/flask-wtf/default.nix
	pkgs/development/python-modules/unstructured-inference/default.nix
	pkgs/development/python-modules/unstructured/default.nix
	pkgs/development/python-modules/velbus-aio/default.nix
2023-10-17 13:05:40 +00:00
Lorenz Leutgeb
e7076170f0 build-support/php: phpDrv in nativeBuildInputs
Fixes NixOS/nixpkgs#261500
2023-10-17 12:50:37 +02:00
Pol Dellaiera
839498d572
php/build-support: fix usage of environment variables 2023-10-17 08:48:58 +02:00
Pol Dellaiera
207d5b4910
php/build-support: fix usage of diff condition
Remove double brackets and replace `diff` with `cmp`
2023-10-17 08:48:12 +02:00
github-actions[bot]
97d0182583
Merge staging-next into staging 2023-10-17 06:01:51 +00:00
github-actions[bot]
c61915bc96
Merge master into staging-next 2023-10-17 06:01:22 +00:00
Elis Hirwing
ccaba16b29
Merge pull request #261088 from NixOS/build-support/php/remove-autoloader-prefix
build-support/php: remove obsolete autoloader-suffix
2023-10-17 07:36:13 +02:00
Elis Hirwing
54952f4668
Merge pull request #261413 from yu-re-ka/composer-vcs-repos
build-support/php: fix support of vcs repositories
2023-10-17 07:29:41 +02:00
Pol Dellaiera
e34034b7a6
build-support/php: add doInstallCheck 2023-10-16 22:07:52 +02:00
Pol Dellaiera
12741f2c30 build-support/php: add installCheckPhase 2023-10-16 17:13:34 +02:00
Yureka
21488e65a7 build-support/php: fix support of vcs repositories 2023-10-16 15:35:20 +02:00
github-actions[bot]
de49fc16bc
Merge staging-next into staging 2023-10-16 12:01:54 +00:00
github-actions[bot]
cb4734193d
Merge master into staging-next 2023-10-16 12:01:25 +00:00
Domen Kožar
3c6cf39435
Merge pull request #249733 from Aleksanaa/nix-prefetch-git
nix-prefetch-git: fix make_deterministic_repo in submodules
2023-10-16 11:12:11 +01:00
con-f-use
0f3fa9e6ef writeShellApplication: exclude shell checks 2023-10-15 12:10:50 +02:00
Pol Dellaiera
ba24c3880f
build-support/php: remove obsolete autoloader-suffix
Since https://github.com/composer/composer/pull/11663, the composer output is stable and reproducible, therefore, that prefix is now obsolete.
2023-10-14 18:00:57 +02:00
github-actions[bot]
80ddbc41e6
Merge staging-next into staging 2023-10-12 18:01:34 +00:00
github-actions[bot]
176015fc74
Merge master into staging-next 2023-10-12 18:01:06 +00:00
Weijia Wang
093f098d26
Merge pull request #260011 from lilyinstarlight/fix/prefetch-npm-deps-network-error-recovery
prefetch-npm-deps: read url bodies within the retry loop
2023-10-12 19:58:20 +02:00
github-actions[bot]
4da0322a88
Merge staging-next into staging 2023-10-12 12:02:01 +00:00
Moritz Heidkamp
7db47744f5 buildGraalvmNativeImage: build with "-march=compatibility" by default
This is necessary for compatibility with all targets supported by nixpkgs.
2023-10-12 11:42:56 +02:00
Alyssa Ross
1bb67a90ba
Merge remote-tracking branch 'origin/master' into staging-next
Conflicts:
	pkgs/development/python-modules/bambi/default.nix
	pkgs/development/python-modules/jaxopt/default.nix
2023-10-12 09:08:12 +00:00
github-actions[bot]
7909827752
Merge staging-next into staging 2023-10-12 00:02:50 +00:00
Alyssa Ross
7262026f0f
rustPlatform.cargoSetupHook: fix platform check (#260068)
Cargo will never need to link for the target platform — that'd be for
the package being built to do at runtime.  Cargo should know about the
build and host linkers.

This fixes e.g. pkgsCross.musl64.fd from x86_64-linux.

Fixes: 67a4f828b4 ("rust: hooks: fix cross compilation")
2023-10-11 23:36:56 +02:00
R. Ryantm
3876a545ed makeInitrdNGTool: 0.1.0 -> 0.1.0 2023-10-11 02:44:30 +00:00
Lily Foster
554e2412e0
prefetch-npm-deps: read url bodies within the retry loop 2023-10-10 19:40:43 -04:00
github-actions[bot]
0cf0d9af7e
Merge staging-next into staging 2023-10-10 18:01:26 +00:00
github-actions[bot]
b1ae965cda
Merge master into staging-next 2023-10-10 18:00:56 +00:00
Alyssa Ross
c11cb00a1e rustc: 1.72.1 -> 1.73.0
This upgrade unfortunately removes MIPS support, as it has been
dropped to Tier 3[1] and so bootstrap tarballs are no longer provided.

It looks like it was dropped due to multiple codegen bugs, and lack of
maintenance, so bringing it back would probably involve engaging with
Rust/LLVM upstream on those.

[1]: https://github.com/rust-lang/compiler-team/issues/648
2023-10-10 14:42:30 +00:00
Tim Windelschmidt
19c5b4307d dockerTools: create /tmp in rootLayer 2023-10-09 22:15:41 +02:00
github-actions[bot]
e1565d6a86
Merge staging-next into staging 2023-10-09 18:01:36 +00:00
github-actions[bot]
75d4639be3
Merge master into staging-next 2023-10-09 18:00:59 +00:00
Lily Foster
a6df5a7719
prefetch-npm-deps: bump deps 2023-10-09 11:37:16 -04:00
Pol Dellaiera
043a094c3b php.buildComposerProject: add missing COMPOSER_ROOT_VERSION env var.
This is mostly required for vimeo/psalm
It doesn't harm anything to add it anyway
2023-10-09 10:16:23 +02:00
github-actions[bot]
6215da7844
Merge staging-next into staging 2023-10-08 18:01:27 +00:00
Fabián Heredia Montiel
2f0e87732c Merge remote-tracking branch 'origin/master' into staging-next 2023-10-08 10:14:51 -06:00
Guillaume Girol
344a502055
Merge pull request #255900 from bouk/bouk/strip-exclude-rlib
build-rust-crate: add stripExclude for .rlib
2023-10-08 13:48:41 +00:00
github-actions[bot]
81871f4c87
Merge staging-next into staging 2023-10-08 12:01:52 +00:00
github-actions[bot]
0b4a97a07f
Merge master into staging-next 2023-10-08 12:01:23 +00:00
Doron Behar
d090cd9af4
Merge pull request #258384 from doronbehar/buildNpmPackage-makeWrapperArgs
buildNpmPackage: support makeWrapperArgs
2023-10-08 12:38:33 +03:00
Artturi
187f681cb4
Merge pull request #258608 from aherrmann/macos-mktemp
MacOS compatible mktemp in cc-wrapper
2023-10-08 11:38:14 +03:00
Fabián Heredia Montiel
7f16b623fc Merge remote-tracking branch 'origin/master' into staging-next 2023-10-08 00:18:22 -06:00
Sandro Jäckel
d09cd1d7d1 fetchgit: use $NIX_BUILD_TOP instead of hardcoding /build/
Co-authored-by: Bjørn Forsman <133602+bjornfor@users.noreply.github.com>
2023-10-08 00:10:59 +02:00
Lily Foster
57087b8346
Merge pull request #255984 from SuperSandro2000/patch-1
build-npm-package: give a hint when npm prune fails
2023-10-07 17:51:52 -04:00
Sandro
30992a8c51
buildNpmPackage: give a hint when npm prune fails
Co-authored-by: Lily Foster <lily@lily.flowers>
2023-10-07 21:53:56 +02:00
Alyssa Ross
182718fecc
Merge remote-tracking branch 'origin/staging-next' into staging
Conflicts:
	pkgs/top-level/linux-kernels.nix
2023-10-07 19:52:18 +00:00
Doron Behar
fc96f6d0fd buildNpmPackage: support makeWrapperArgs 2023-10-07 14:09:05 +03:00
Jan Tojnar
76a7aa445a Merge branch 'master' into staging-next
Conflicts:
- pkgs/development/python-modules/xdot/default.nix
  between 2f244e3647 and 1a9a257cf7
2023-10-06 23:18:00 +02:00
Elis Hirwing
f0987a05a9
php.packages.composer: Make sure that both composers use the same version
So in php we have a bootstrapping composer (that lives in
composer-phar.nix) that downloads the binary distribution of composer
to be able to bootstrap and build a composer built from source.

However, it's desirable to keep composer updated at all time, and this
includes the phar one that isn't used by users directly. So this makes
sure we don't "forget" about the phar one since it now borrows the
version from the source version. However, then it also made sense to
move the hash for the phar to the same file as the source
composer. Then we can control the full upgrade life cycle of both the
phar and source versions of composer from the same file.
2023-10-06 20:09:48 +02:00
Elis Hirwing
13441fc1f5
Merge pull request #259349 from NixOS/php/bump-composer-2-6-5
phpPackages.composer: 2.6.4 -> 2.6.5
2023-10-06 19:51:30 +02:00
Bjørn Forsman
55e30da2eb buildFHSEnvBubblewrap: preserve pname, version
It's useful to have access to these attributes from packages built with
buildFHSEnvBubblewrap, and it reduces the difference between FHS and
non-FHS packages.

'name' is already handled by runCommandLocal.
2023-10-06 19:37:39 +02:00
Pol Dellaiera
3360cb0bb0 phpPackages.composer: 2.6.4 -> 2.6.5 2023-10-06 10:30:07 +02:00
github-actions[bot]
2c70ec4a27
Merge staging-next into staging 2023-10-05 18:01:34 +00:00
github-actions[bot]
ca639e401e
Merge master into staging-next 2023-10-05 18:01:05 +00:00
Sandro Jäckel
025a028c47 fetchgit: fix private fetching via netrc
This fixes a regression introduced in https://github.com/NixOS/nixpkgs/pull/256628
which broke fetching with private = true through a netrc file.
Tested locally with a really special github enterprise.
2023-10-05 13:54:00 +00:00
Linus Heckemann
81f6dc0864
Merge pull request #257919 from Ma27/structured-attrs-env-vars
structured attrs: prefer `NIX_ATTRS_*_FILE` over `.attrs.*`
2023-10-05 12:48:00 +02:00
Andreas Herrmann
13a4690d0d cc-wrapper: Use MacOS compatible mktemp command
The commit 6f2b3ba027 introduced a
`mktemp` invokation that uses the `--tmpdir` flag, which is not
available on MacOS.

This changes the invokation to a portable one based on the following
StackOverflow answer https://stackoverflow.com/a/31397073/841562 .
2023-10-05 10:44:34 +02:00
github-actions[bot]
d4ed9dd5cd
Merge staging-next into staging 2023-10-05 00:02:58 +00:00
Vladimír Čunát
fa7835846a
Merge branch 'master' into staging-next 2023-10-04 22:40:54 +02:00
Maximilian Bosch
c8f5c30c37
pkgs/build-support: refactor drvs using __structuredAttrs = true
Derivations affected by this patch set `__structuredAttrs = true;` and
provide their own `builder`, i.e. it's necessary to `source .attrs.sh`.

Rather than adding even more `if`-`source` monstrums, I decided to
modify all of those derivations to use `buildCommand` or `runCommand`,
without `builder` being set.

Then, `$stdenv/setup` is sourced already and as a result it's safe to
assume that `NIX_ATTRS_JSON_FILE`/`NIX_ATTRS_SH_FILE` point to a usable
location both in a build and a shell session.
2023-10-04 18:37:00 +02:00
Maximilian Bosch
8bc5104a6e
treewide: refactor .attrs.sh detection
When specifying the `builder` attribute in `stdenv.mkDerivation`, this
will be effectively transformed into

    builtins.derivation {
      builder = stdenv.shell;
      args = [ "-e" builder ];
    }

This also means that `default-builder.sh` is never sourced and as a
result it's not guaranteed that `$NIX_ATTRS_SH_FILE` is set to a correct
location[1].

Also, we need to source `.attrs.sh` to source `$stdenv`. So, the
following is done now:

* If `$NIX_ATTRS_SH_FILE` points to a correct location, then use it.
  Directly using `.attrs.sh` is problematic for `nix-shell(1)` usage
  (see previous commit for more context), so prefer the environment
  variable if possible.

* Otherwise, if `.attrs.sh` exists, then use it. See [1] for when this
  can happen.

* If neither applies, it can be assumed that `__structuredAttrs` is
  turned off and thus nothing needs to be done.

[1] It's possible that it doesn't exist at all - in case of Nix 2.3 or
    it can point to a wrong location on older Nix versions with a bug in
    `__structuredAttrs`.
2023-10-04 18:36:57 +02:00
Pol Dellaiera
2b12e3efe3 php.buildComposerProject: improve workflow in case of missing composer.lock file 2023-10-04 15:12:08 +02:00
Yureka
dd104a90a8 php.buildComposerProject: warn about outdated vendorHash 2023-10-04 15:12:08 +02:00
Yureka
7d2c531f28 php.buildComposerProject: don't allow use without lockfile 2023-10-04 15:12:08 +02:00
github-actions[bot]
c020c1ab3c
Merge staging-next into staging 2023-10-03 18:01:51 +00:00
Alyssa Ross
1cbe5c3e8b rust.toRustTargetForUseInEnvVars: support custom targets
> If using a target spec JSON file, the <triple> value is the filename
> stem. For example --target foo/bar.json would match [target.bar].

- https://doc.rust-lang.org/cargo/reference/config.html#target

I've also exposed toRustTargetSpecShort as a public function, because
it's useful to be able to know what the target subdirectory will be.
2023-10-03 12:30:04 +00:00
K900
03fddbfb87
Merge pull request #256525 from K900/auto-patchelf-flags
autoPatchelfHook: add `patchelfFlags` option
2023-10-02 08:07:03 +03:00
Alyssa Ross
d4a1009f5a
Merge remote-tracking branch 'origin/master' into staging-next 2023-10-01 13:53:00 +00:00
Weijia Wang
f4098e348c
Merge pull request #257122 from bjornfor/fix-buildfhsenv-pname
buildFHSEnvBubblewrap: allow being passed 'pname'
2023-10-01 13:55:09 +02:00
github-actions[bot]
c3098253b5
Merge master into staging-next 2023-09-30 12:01:05 +00: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
Artturi
bf25d8782b
Merge pull request #249069 from amjoseph-nixpkgs/pr/lib/systems/ubootArch
lib.systems: add ubootArch
2023-09-30 10:45:36 +03:00
K900
10cb2bd443 autoPatchelfHook: add patchelfFlags option
This may be useful. Eventually. Maybe.
2023-09-30 10:26:35 +03:00
figsoda
14d44173e4
Merge pull request #256949 from andresilva/build-rust-package-profiles
buildRustPackage: support custom cargo profiles
2023-09-29 15:54:49 -04:00
github-actions[bot]
c1a6c05aa7
Merge master into staging-next 2023-09-29 12:01:16 +00:00
Elis Hirwing
a7f6f0b654
Merge pull request #258005 from NixOS/php/composer/bump-2-6-4
phpPackages.composer: 2.6.3 -> 2.6.4
2023-09-29 13:18:47 +02:00
Pol Dellaiera
a39417a673 phpPackages.composer: 2.6.3 -> 2.6.4
Security release: To be mitigated since we are not using a publicly accessible composer.phar (GHSA-jm6m-4632-36hf / CVE-2023-43655).

Changelog: https://github.com/composer/composer/releases/tag/2.6.4
2023-09-29 12:25:04 +02:00
Thiago Kenji Okada
88c5afe153
Merge pull request #257433 from thiagokokada/graalvm-bump
graalvm-ce: 22.3.1 -> 21.0.0
2023-09-29 11:12:22 +01:00
Robert Scott
4c6fd59fcd cc-wrapper: ensure NIX_HARDENING_ENABLE fortify3 implies fortify too
even if fortify3 is in hardening_unsupported_flags
2023-09-28 21:49:14 +01:00
github-actions[bot]
bd2b03a095
Merge master into staging-next 2023-09-28 18:00:54 +00:00
Evils
ef1b2ae152 appimage-run: add pciutils for FreeCAD 2023-09-28 19:15:01 +02:00
Jules Aguillon
187d777aad ocamlPackages.buildTopkgPackage: Added
This function helps building an OCaml package that builds with topkg.
There are currently many such packages in nixpkgs and this function
would greatly simplify adding more.

This is heavily inspired by `ocamlPackages.buildDunePackage`.
2023-09-28 12:03:20 +02:00
github-actions[bot]
6626399ea9
Merge staging-next into staging 2023-09-27 12:01:37 +00:00
github-actions[bot]
81ae4e07a3
Merge master into staging-next 2023-09-27 12:01:06 +00:00
Thiago Kenji Okada
45eff9d9c7 graalvm-ce: 22.3.1 -> 21.0.0
This initially may look like a downgrade, but this is caused by how
upstream is tagging versions.

Before they would have the GraalVM having its own version (e.g. 22.3.1),
and each version would support multiple JVM versions (e.g. 11, 17, 19).
Now each release supports only one JVM version (e.g.: 21), and they
track the same version as the JVM.

They also changed packaging, making all sub-products (e.g.: GraalPy,
GraalRuby, etc.) standalone, so they do not depend in GraalVM anymore
and have their own version. Thanks to this change, we will need to
repackage everything.

To simplify, this commit will remove all sub-products and only care
about the GraalVM/Native Image (that is back to GraalVM itself) part.
Other commits will re-added each sub-product.

Fix (partial): https://github.com/NixOS/nixpkgs/issues/257292
2023-09-27 10:25:44 +01:00
Dan Buch
14f76a96e8
fetch-yarn-deps: warn on undefined expected hash
instead of rejecting, given that the expected hash may not be known/provided.
2023-09-27 00:17:40 +00:00
Adam Joseph
67a4f828b4 rust: hooks: fix cross compilation
Currently there is a state of severe confusion in
pkgs/build-support/rust/hooks/ regarding host vs target; right now
there is only "host" defined, but whether it means "host" or
"target" seems to fluctuate.

This commit corrects that, ensuring that all variables come in all
three flavors (build, host, target) and are used consistently with
the nixpkgs convention.

This also fixes the cross-compilation of packages which use
`maturinBuildHook` -- hooks go in `nativeBuildInputs` and are
phase-shifted backwards by one platform, so they need to be careful
about distinguishing between build and host.

Closes #247441
2023-09-26 06:30:44 +00:00
Adam Joseph
c1df604e9f rust: add rust.envVars 2023-09-26 06:30:44 +00:00
github-actions[bot]
aa53f32537
Merge staging-next into staging 2023-09-26 06:01:27 +00:00
github-actions[bot]
3bfcfd7eef
Merge master into staging-next 2023-09-26 06:01:00 +00:00
Pol Dellaiera
f0dc8516ed
build-support/php/hooks: add cacert 2023-09-25 22:10:28 +02:00
github-actions[bot]
a09f7f5b08
Merge staging-next into staging 2023-09-25 18:01:43 +00:00
github-actions[bot]
fc1f757bf6
Merge master into staging-next 2023-09-25 18:01:06 +00:00
Yureka
5d20a2b99a buildPecl: pass hash attr to fetchurl 2023-09-25 19:24:40 +02:00
Pol Dellaiera
a7b3106959
Merge pull request #256628 from alyssais/nix-prefetch-git-config
nix-prefetch-git: ignore global and user git config
2023-09-25 18:40:40 +02:00
github-actions[bot]
38723050e6
Merge staging-next into staging 2023-09-25 00:02:40 +00:00
github-actions[bot]
680b13891d
Merge master into staging-next 2023-09-25 00:02:13 +00:00
Hraban Luyat
1b26fc011a emacs: allow using as shebang on darwin 2023-09-24 19:50:52 -03:00
Hraban Luyat
949ea0426d emacs: remove unused makeWrapper dependency
As far as I can tell this is unused. The wrapper script is fully custom.
2023-09-24 19:50:52 -03:00
Bjørn Forsman
70b5588b4e buildFHSEnvBubblewrap: allow being passed 'pname'
`buildFHSEnvBubblewrap { pname = ...; }` currently results in eval error
because args.name doesn't exist then. Fix it by only using args.name if
it exists.
2023-09-24 19:57:21 +02:00
André Silva
8674922276
buildRustPackage: support custom cargo profiles 2023-09-24 18:40:24 +01:00
github-actions[bot]
655d301f37
Merge staging-next into staging 2023-09-24 12:01:43 +00:00
github-actions[bot]
b6d5fc29bc
Merge master into staging-next 2023-09-24 12:01:00 +00:00
Atemu
aa827460ae
Merge pull request #257049 from alyssais/buildFHSEnv-passthru
buildFHSEnv: add base paths to passthru
2023-09-24 11:41:22 +02:00
Alyssa Ross
00a28d0ed9
buildFHSEnv: add base paths to passthru
It's useful to be able to introspect all packages which are available
in the fhsenv.  I've renamed basePkgs and baseMultiPkgs to be
consistent with the naming scheme used for the bits that were
previously public — names ending in "Pkgs" are for functions, and
names ending in "Paths" are the results of those functions.
2023-09-24 08:43:20 +00:00
Pol Dellaiera
bd3d5995d9
Merge pull request #256557 from NixOS/bump/build-support/php/composer-local-repo-plugin-1-0-3
build-support/php/composer-local-repo-plugin: 1.0.2 -> 1.0.3
2023-09-24 09:16:08 +02:00
github-actions[bot]
035c6df194
Merge staging-next into staging 2023-09-24 00:03:26 +00:00
github-actions[bot]
0e6413dbff
Merge master into staging-next 2023-09-24 00:02:23 +00:00
Silvan Mosberger
390a4247e0
Merge pull request #255512 from nbraud/sha512-to-hash
treewide: sha512 → hash
2023-09-24 00:03:31 +02:00
Bouke van der Bijl
352ff3f226
Update pkgs/build-support/rust/build-rust-crate/default.nix
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
2023-09-23 10:19:03 +02:00
nicoo
fab52fca51 treewide: sha512 → hash 2023-09-22 18:37:42 +02:00
Alyssa Ross
7d40fbbc04
nix-prefetch-git: ignore global and user git config
nix-prefetch-git is either run as part of a build, usually sandboxed,
or outside a build, unsandboxed, to prefetch something that will later
be used in a build.  It's important that the latter use produces
hashes that can be reproduced by the former.

One way that they can differ is if the user's git config does
something that changes the result of git clone.  I ran into this,
because my global git config automatically enables git-lfs, whereas
nix-prefetch-git otherwise only uses git-lfs if specifically
requested.  This led to very confusing hash mismatches.
2023-09-22 06:59:40 +00:00
Pol Dellaiera
9675e82ea1
build-support/php/composer-local-repo-plugin: 1.0.2 -> 1.0.3 2023-09-21 21:15:57 +02:00
github-actions[bot]
e939ee5495
Merge staging-next into staging 2023-09-21 12:01:49 +00:00
github-actions[bot]
4c610adf95
Merge master into staging-next 2023-09-21 12:01:19 +00:00
Jörg Thalheim
53204fe466
Merge pull request #256423 from Artturin/fixwritecbin
writers.writeCBin: fix binary name when cross-compiling
2023-09-21 08:36:09 +02:00
github-actions[bot]
8530ff3965
Merge staging-next into staging 2023-09-21 06:01:35 +00:00
github-actions[bot]
743d7baa31
Merge master into staging-next 2023-09-21 06:01:07 +00:00
Elis Hirwing
edd1e27480
Merge pull request #256315 from NixOS/php/bump-composer-2-6-3
phpPackages.composer: 2.6.2 -> 2.6.3
2023-09-21 07:56:44 +02:00
Artturin
8a77757b7e writers.writeCBin: fix binary name when cross-compiling
`$name` contains cross-compilation info `bin/wrapped-argv0-aarch64-unknown-linux-gnu`

name should not be set directly.
2023-09-21 04:13:45 +03:00
github-actions[bot]
0c130bfad2
Merge staging-next into staging 2023-09-21 00:02:39 +00:00
github-actions[bot]
2b20c287ac
Merge master into staging-next 2023-09-21 00:02:13 +00:00
Maciej Krüger
6cecfa12b5
Merge pull request #239570 from hacker1024/feature/flutter-wrapper-gapps
flutter: Use wrapGAppsHook
2023-09-20 23:34:26 +02:00
Fabián Heredia Montiel
b2f85dbf28 Merge remote-tracking branch 'origin/master' into staging-next 2023-09-20 15:08:16 -06:00
Pol Dellaiera
c8b9e229e1
phpPackages.composer: 2.6.2 -> 2.6.3 2023-09-20 16:53:03 +02:00
Artturi
6096abb008
Merge pull request #255208 from rhendric/rhendric/make-binary-wrapper 2023-09-20 09:41:44 +03:00
Artturi
6f27ba80ea
Merge pull request #255488 from natto1784/libcxxabi 2023-09-20 09:12:51 +03:00
github-actions[bot]
d55e56f8ac
Merge staging-next into staging 2023-09-19 18:01:57 +00:00
ajs124
831148bf27 testers.testMetaPkgConfig: fix warning
follow-up to feabc3db0fa3c875a45116734aa4ae4751c6ef76
2023-09-19 16:11:42 +02:00
github-actions[bot]
e22ad0ef4c
Merge master into staging-next 2023-09-19 12:01:22 +00:00
Artturi
f36165c2f1
Merge pull request #253116 from pwaller/fix-static-linktype 2023-09-19 11:41:44 +03:00
Bouke van der Bijl
4270524d3f build-rust-crate: add stripExclude for .rlib 2023-09-18 16:03:04 +02:00
Pol Dellaiera
6e55577f33 build-support/php/composer-local-repo-plugin: 1.0.0 -> 1.0.2
Also fix https://github.com/NixOS/nixpkgs/issues/255860
2023-09-18 14:21:26 +02:00
Ryan Hendrickson
df8b425f89 makeBinaryWrapper: protect wildcards in flags 2023-09-18 02:49:33 -04:00
Amneesh Singh
accafc0ed3
cc-wrapper: add libcxxabi include flag for LLVM
Removed workaround from llvm 16.

Fixes including cxxabi.h on llvm >=15 libcxxStdenv.

```c
int main() {}
```

```
/nix/store/qwnvng0cbyx0bijm654jpmpl0516hfhx-libcxxabi-15.0.7-dev/include/cxxabi.h:20:10: fatal error: '__cxxabi_config.h' file not found
```

Before llvm 15 this used to work because `libcxx` copied the headers
from `cxxabi` to it's own `include`, which was then picked up by the
line above this one

Alternative fix would be to copy all files from `${cxxabi.dev}/include/c++/v1` to `${cxxabi.dev}/include` so the cc-wrapper setup hook would pick them up, but that would depend on in cxxabi being in buildInputs.

Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2023-09-18 06:43:32 +05:30
github-actions[bot]
d2fdbb7e40
Merge master into staging-next 2023-09-17 18:00:59 +00:00
Artturi
9466d15361
Merge pull request #255188 from NickCao/make-binary-wrapper
makeBinaryWrapper.extractCmd: fix use in cross compilation
2023-09-17 17:31:00 +03:00
Nick Cao
c6e11d15ce
makeBinaryWrapper.extractCmd: fix use in cross compilation 2023-09-16 22:17:22 -04:00
Artturi
9acebc35f9
Merge pull request #235473 from szlend/fix-deterministic-uname-getops 2023-09-17 04:46:44 +03:00
Simon Žlender
b485dd0036 deterministic-uname: fix default output 2023-09-17 00:08:43 +03:00
Atemu
88a0ff46e5
Merge pull request #253982 from rnhmjoj/pr-fhs
buildFHSEnv: disable security features by default
2023-09-16 21:09:24 +02:00
Elis Hirwing
28fd868e47
Merge pull request #255156 from NixOS/build-support/php/update-install-procedure
build-support/php: prevent the creation of symlinks
2023-09-15 08:39:55 +02:00
Pol Dellaiera
a2f8623363
build-support/php: prevent the creation of symlinks
Using symbolic links create issues on Darwin, therefore, using `makeWrapper` fix this.
2023-09-14 21:40:33 +02:00
Weijia Wang
0cfc319f83 fetchDebianPatch: Require patch names with extensions
Otherwise the fetcher is unuseable with patches
whose filename (in Debian) doesn't end in `.patch`.
2023-09-14 18:55:30 +00:00
toonn
924efe5313
Merge pull request #249268 from Enzime/remmina-bundle
writeDarwinBundle: use binary wrapper
2023-09-14 15:05:13 +02:00
Elis Hirwing
350cac13cf
Merge pull request #248184 from NixOS/php/add-new-builder-only
php: add new Composer builder
2023-09-14 07:50:27 +02:00
Pol Dellaiera
3eb168da92
build-support/php: add composerNoDev, composerNoPlugins and composerNoScripts attributes 2023-09-13 17:08:04 +02:00
Pol Dellaiera
1173a34d15
build-support/php: move internal tools in php/build-support/php/pkgs 2023-09-13 17:07:48 +02:00
Elis Hirwing
1e238b8afe
php: Fix shellcheck string warnings in composer-install-hook 2023-09-13 15:00:04 +02:00
Elis Hirwing
2160ed2bcc
composer: Stop exposing composer built from a phar file 2023-09-13 15:00:04 +02:00
Elis Hirwing
9e701e6328
composer-local-repo-plugin: Stop exposing this internal tool 2023-09-13 15:00:03 +02:00
Pol Dellaiera
b36ad2f517
php: add new builder buildComposerProject 2023-09-13 15:00:03 +02:00
Pol Dellaiera
27e3b694e7
composer-local-repo-plugin: init at 1.0.0 2023-09-13 15:00:03 +02:00
Jan Tojnar
1cd6d30f2f Merge branch 'master' into staging-next 2023-09-13 12:03:35 +02:00
Artturi
edada48556
Merge pull request #254815 from johannwagner/fix-leading-hyphens-for-testVersion 2023-09-13 01:23:09 +03:00
Robert Scott
9e64f794d1
Merge pull request #208944 from risicle/ris-dockertools-makeoverridable
dockerTools: use makeOverridable for buildImage family of functions
2023-09-12 23:16:06 +01:00
Johann Wagner
da073295d0 testers.testVersion: Fix usage of hyphens within the version argument 2023-09-12 21:54:10 +02:00
Vladimír Čunát
300eaad172
Merge branch 'master' into staging-next 2023-09-12 19:06:44 +02:00
Rick van Schijndel
a31a3eca58
Merge pull request #251066 from lilyinstarlight/feature/prefetch-npm-deps-tokens
prefetch-npm-deps: add support for NIX_NPM_TOKENS env var
2023-09-12 17:31:26 +02:00
Anderson Torres
3fc613c5ba
Merge branch 'master' into staging-next 2023-09-11 23:25:38 +00:00
Lily Foster
7f76ac6e09
fetchNpmDeps: pass NIX_NPM_TOKENS as an impure env var 2023-09-11 16:50:17 -04:00
Lily Foster
e271266179
prefetch-npm-deps: add support for NIX_NPM_TOKENS env var 2023-09-11 16:49:36 -04:00
Robert Scott
38c1400f67 dockerTools: use makeOverridable for buildImage family of functions
this allows nix users to modify existing images without having
to rely on container image inheritance mechanisms via fromImage
2023-09-11 21:10:37 +01:00
Artturi
bb446a19f7
Merge pull request #247682 from minijackson/fix-ppc64be-linker 2023-09-11 22:13:42 +03:00
Minijackson
5581c0677c
bintools-wrapper: fix dynamic linker for powerpc64 big-endian
fixes #245162
2023-09-11 13:55:43 +02:00
Lily Foster
9b2ca17abc
npmHooks.npmInstallHook: avoid script output in npm pack command 2023-09-10 10:31:41 -04:00
github-actions[bot]
66c722f52f
Merge master into staging-next 2023-09-09 18:01:05 +00:00
sternenseemann
bd374243c0 npmHooks: use adjacent packages, not buildPackages
Hooks are essentially implemented as special shell packages that run on
their respective host platform. When they are used, they appear as
nativeBuildInputs (as they need to be executed as part of the build of a
package using them) so are taken from buildPackages relative to the
derivation using them.

Since the override in buildNpmPackage nullifies splicing, we take
npmHooks from buildPackages manually.

Fixes pkgsCross.ghcjs.buildPackages.emscripten and thus
pkgsCross.ghcjs.haskellPackages.ghc.
2023-09-09 17:55:37 +02:00
github-actions[bot]
a376e04925
Merge master into staging-next 2023-09-09 00:02:10 +00:00
Maciej Krüger
6146406653
Merge pull request #252343 from nbraud/fetchurl/hashValidation 2023-09-09 00:55:19 +02:00
rnhmjoj
c945723356
buildFHSEnv: disable security features by default
The implicit contract of buildFHSUserEnv was that it allows to run
software built for a typical GNU/Linux distribution (not NixOS) without
patching it (patchelf, autoPatchelfHook, etc.). Note that this does not
inherently imply running untrusted programs.

buildFHSUserEnv was implemented by using chroot and assembling a
standard-compliant FHS environment in the new root. As expected, this
did not provide any kind of isolation between the system and the
programs.

However, when it was later reimplemented using bubblewrap
(PR #225748), which *is* a security tool, several isolation features
involving detaches Linux namespaces were turned on by default.
This decision has introduced a number of breakages that are very
difficult to debug and trace back to this change.
For example: `unshareIPC` breaks software audio mixing in programs using
ALSA (dmix) and `unsharePID` breaks gdb,

Since:

  1. the security features were enable without any clear threat model;
  2. `buildFHSEnvBubblewrap` is supposed to be a drop-in replacement of
     `buildFHSEnvChrootenv` (see the release notes for NixOS 23.05);
  3. the change is breaking in several common cases (security does not
     come for free);
  4. the contract was not changed, or at least communicated in a clear
     way to the users;

all security features should be turned off by default.

P.S. It would be useful to create a variant of buildFHSEnv that does
provide some isolation. This could unshare some namespaces and mount
only limited parts of the filesystem.
Note that buildFHSEnv mounts every directory in / under the new root, so
again, very little is gained by unsharing alone.
2023-09-08 09:15:50 +02:00
Artturi
fa3a4a18c0
Merge pull request #192459 from danielfullmer/fix-cc-wrapper-libdir 2023-09-07 01:58:51 +03:00
github-actions[bot]
aba6d8043f
Merge staging-next into staging 2023-09-06 18:01:28 +00:00
Silvan Mosberger
7cbc8215fd
Merge pull request #252865 from emily-is-my-username/fix/fetchgit-deepclone
`fetchgit`: don't shallow clone if `deepClone` is requested
2023-09-06 14:08:06 +02:00
github-actions[bot]
848091ac53
Merge staging-next into staging 2023-09-06 06:01:30 +00:00