Commit Graph

7929 Commits

Author SHA1 Message Date
Emily Trau
8bb29a3881
Merge pull request #295954 from bjornfor/revert-avrlibc-revdeps-breakage
Revert "avrlibc: hook up libdir for cc-wrapper"
2024-03-16 14:34:01 +11:00
annalee
636ed70ab3
Merge remote-tracking branch 'upstream/staging-next' into staging 2024-03-16 00:07:22 +00:00
github-actions[bot]
00729a3d21
Merge master into staging-next 2024-03-15 18:01:19 +00:00
lassulus
6fd3c2ebcf
Merge pull request #295982 from philiptaron/remove-lib-or-usages
Avoid `lib.or` in `pkgs/build-support/writers/`
2024-03-15 20:23:18 +07:00
github-actions[bot]
241984a941
Merge staging-next into staging 2024-03-15 00:02:27 +00:00
github-actions[bot]
2bffd64e73
Merge master into staging-next 2024-03-15 00:01:59 +00:00
Philip Taron
dc59ca2bd9
Avoid lib.or in pkgs/build-support/writers/ 2024-03-14 14:11:11 -07:00
Pol Dellaiera
8c40e060f3
build-support/php: update warnings when composer validate fails 2024-03-14 21:52:08 +01:00
Bjørn Forsman
6ff5b79096 Revert "avrlibc: hook up libdir for cc-wrapper"
This reverts commit b2844f89d1.

It broke simavr:

  $ nix-build -A simavr
  [...]
  /nix/store/3k4djrsq23m2yg9ar4h1lkkz1ijv0ghv-avr-binutils-2.41/bin/avr-ld: /nix/store/3rpyzla18mbj690hv7j5dang0kd3c1fq-avr-libc-avr-2.1.0/avr/lib/libc.a(vfprintf_std.o): in function `.L15':
  vfprintf.c:(.text.avr-libc+0xd8): undefined reference to `__mulqi3'
  /nix/store/3k4djrsq23m2yg9ar4h1lkkz1ijv0ghv-avr-binutils-2.41/bin/avr-ld: /nix/store/3rpyzla18mbj690hv7j5dang0kd3c1fq-avr-libc-avr-2.1.0/avr/lib/libc.a(vfprintf_std.o): in function `.L18':
  vfprintf.c:(.text.avr-libc+0xe4): undefined reference to `__mulqi3'
  collect2: error: ld returned 1 exit status
  make[1]: *** [../Makefile.common:161: atmega644_adc_test.axf] Error 1
  make[1]: Leaving directory '/build/source/tests'
  make: *** [Makefile:21: build-tests] Error 2

Fixes #295610.
2024-03-14 20:09:11 +01:00
github-actions[bot]
9f5148f1e0
Merge staging-next into staging 2024-03-14 18:01:54 +00:00
github-actions[bot]
c160165e60
Merge master into staging-next 2024-03-14 18:01:26 +00:00
Silvan Mosberger
f60515ddea
Merge pull request #293416 from DanielSidhion/remove-makesnap
snapTools: remove
2024-03-14 16:46:22 +01:00
Lily Foster
ae86a507ed npmHooks.npmInstallHook: ignore bundle deps when calculating files to install
This assumes that downstream users of `buildNpmPackage` would rather our
own built `node_modules` be copied to the output rather than only the
`bundleDependencies` specified in the `package.json` file.

Having the latter behavior seems unexpected and unintuitive, and would
not work as installing from an `npm pack` is intended to (since doing
that would not do a `rebuild` step on those dependencies and it would
skip reifying a full dependency tree).
2024-03-14 14:04:51 +01:00
Robert Hensing
09364e249d
Merge pull request #295378 from hercules-ci/makeDerivationArgument
make-derivation.nix: Factor out `makeDerivationArgument`
2024-03-14 13:01:35 +01:00
Ulysses Zhan
acaf847d4f nuget-to-nix: fix the bug of wrong url in the generated nix file when the package base address of the nuget source does not have a trailing slash 2024-03-14 00:29:50 -07:00
lassulus
7154ccbbd5
Merge pull request #293420 from DavHau/writers-wrap
writers: add support for wrapping
2024-03-14 01:14:31 +07:00
Yueh-Shun Li
5010678492 checkpointBuildTools.prepareCheckpointBuild: stop at install
Switch off phases following installPhase, including fixupPhase,
installCheckPhase, distPhase and postPhases.
2024-03-13 20:11:31 +08:00
Robert Hensing
8dad51a2e2 make-derivation.nix: Split makeDerivationArgument, mkDerivation with duplicate functionality 2024-03-12 18:16:56 +01:00
Philip Taron
e27bcfed1c
Avoid top-level with in pkgs/build-support/cc-wrapper/default.nix (#295213) 2024-03-12 08:34:58 +01:00
github-actions[bot]
0917422ffe
Merge staging-next into staging 2024-03-12 06:01:24 +00:00
Silvan Mosberger
1d14cc5182
Merge pull request #294944 from hercules-ci/docs-dedup-trivial-builders
trivial-builders: Deduplicate docs
2024-03-12 02:16:01 +01:00
Silvan Mosberger
aabd5fbfcf
Merge pull request #292259 from dawidd6/docker-nix-ssl
dockerTools: set NIX_SSL_CERT_FILE in image
2024-03-12 02:01:08 +01:00
a-n-n-a-l-e-e
ce789e7e35
llvmPackages_{12,13,14,15,16,17,git}.{libcxx,libcxxabi}: merge libcxxabi into libcxx (#292043)
- merge libcxxabi into libcxx for LLVM 12, 13, 14, 15, 16, 17, and git.
- remove the link time workaround `-lc++ -lc++abi` from 58 packages as it is no longer required.
- fixes https://github.com/NixOS/nixpkgs/issues/166205
- provides alternative fixes for. https://github.com/NixOS/nixpkgs/issues/269548 https://github.com/NixOS/nix/issues/9640
- pkgsCross.x86_64-freebsd builds work again

This change can be represented in 3 stages
1. merge libcxxabi into libcxx -- files: pkgs/development/compilers/llvm/[12, git]/{libcxx, libcxxabi}
2. update stdenv to account for merge -- files: stdenv.{adapters, cc.wrapper, darwin}
3. remove all references to libcxxabi outside of llvm (about 58 packages modified)

### merging libcxxabi into libcxx
- take the union of the libcxxabi and libcxx cmake flags
- eliminate the libcxx-headers-only package - it was only needed to break libcxx <-> libcxxabi circular dependency
- libcxx.cxxabi is removed. external cxxabi (freebsd) will symlink headers / libs into libcxx.
- darwin will re-export the libcxxabi symbols into libcxx so linking `-lc++` is sufficient.
- linux/freebsd `libc++.so` is a linker script `LINK(libc++.so.1, -lc++abi)` making `-lc++` sufficient.
- libcxx/default.nix [12, 17] are identical except for patches and `LIBCXX_ADDITIONAL_LIBRARIES` (only used in 16+)
- git/libcxx/defaul.nix  does not link with -nostdlib when useLLVM is true so flag is removed. this is not much different than before as libcxxabi used -nostdlib where libcxx did not, so libc was linked in anyway.

### stdenv changes
- darwin bootstrap, remove references to libcxxabi and cxxabi
- cc-wrapper: remove c++ link workaround when libcxx.cxxabi doesn't exist (still exists for LLVM pre 12)
- adapter: update overrideLibcxx to account for a pkgs.stdenv that only has libcxx

### 58 package updates
- remove `NIX_LDFLAGS = "-l${stdenv.cc.libcxx.cxxabi.libName}` as no longer needed
- swift, nodejs_v8 remove libcxxabi references in the clang override

https://github.com/NixOS/nixpkgs/pull/292043
2024-03-11 03:53:37 -07:00
Robert Hensing
e99021ff75 trivial-builders: Deduplicate docs
I didn't have the opportunity to do all work at once, so I've added
TODOs to bring attention to the situation.
2024-03-11 11:33:14 +01:00
hellwolf
09b82b349a
build-fhsenv-bubblewrap: fix fhsenv etc entries
* added more comments.
* symlink fhsenv etc entries when necessary.
2024-03-10 19:23:45 +02:00
github-actions[bot]
1966fd4ba6
Merge staging-next into staging 2024-03-09 18:01:41 +00:00
David McFarland
445b240555
Merge pull request #290351 from corngood/dotnet-fixes
dotnet: infrastructure cleanup
2024-03-09 11:34:48 -04:00
github-actions[bot]
38b6fd7904
Merge staging-next into staging 2024-03-08 06:01:32 +00:00
github-actions[bot]
b2ae37aca4
Merge master into staging-next 2024-03-08 06:01:02 +00:00
adisbladis
434df3c94b
Merge pull request #289231 from adisbladis/fetchnpmlock
importNpmLock: init
2024-03-08 15:14:37 +13:00
David McFarland
92a255d13b nuget-to-nix: fix error handling 2024-03-06 10:14:21 -04:00
github-actions[bot]
b859baf176
Merge staging-next into staging 2024-03-06 12:01:41 +00:00
github-actions[bot]
d6370b05b5
Merge master into staging-next 2024-03-06 12:01:15 +00:00
Pol Dellaiera
c224b6e894
Merge pull request #293582 from drupol/build-support/php/improve-composer-validate
build-support/php: update `composer validate` steps
2024-03-06 10:47:35 +01:00
github-actions[bot]
b5be23cc08
Merge staging-next into staging 2024-03-06 00:02:47 +00:00
github-actions[bot]
8660ec23c7
Merge master into staging-next 2024-03-06 00:02:17 +00:00
David McFarland
5706443baf
Merge pull request #190129 from corngood/dotnet-sdk
dotnetCorePackages.dotnet_8: build from source
2024-03-05 18:41:04 -04:00
Pol Dellaiera
b2af238d31
build-support/php: update composer validate steps 2024-03-05 22:50:46 +01:00
Pol Dellaiera
bc627a6aca
build-support/php: move functions around (dry) 2024-03-05 19:39:35 +01:00
Pol Dellaiera
cf9e77ef8e
phpPackages.composer: 2.6.6 -> 2.7.1
Diff: https://github.com/composer/composer/compare/2.6.6..2.7.1
Changelog: https://github.com/composer/composer/releases/tag/2.7.1
Fix CVE: CVE-2024-24821
2024-03-05 19:39:35 +01:00
Pol Dellaiera
39502e7aa7
build-support/php/composer-local-repo-plugin: 1.0.3 -> 1.1.0 2024-03-05 19:39:35 +01:00
DavHau
9a5b86c189 writers: add support for wrapping
Add a makeWrapperArgs argument to all script writers under pkgs.writers.

This can be used to set, prefix, or suffix the PATH or other environment variables which improves the ability to generate scripts with reproducible behavior.

Some of the writers (writeBash, writeDash, writeFish, writeNu) previously did not support passing an argument set, for example
```
writeBash "example" "echo hello"

```

In order to add the new capability to these writers as well, their call signature is now overloaded in order to allow the following:
(The old call style from the example above remains intact)
```
writeBash "example"
  { makeWrapperArgs = [ "--prefix" "PATH" ":" "${pkgs.hello}/bin" ]; }
  ''
    hello
  ''
```

Done as well:
- add tests
- add more docs
- fix some misleading docs
- extend existing docs with more examples
2024-03-05 14:25:42 +07:00
DS
1d85557b50 snapTools: remove
`snapTools.makeSnap` has produced broken snaps since at least Oct 2020,
as indicated by the following issue: https://github.com/NixOS/nixpkgs/issues/100618

No person has shown interest in maintaining it, and given that there is
no fix available, it's assumed that all attempts made to fix that
function have not succeeded.

Given that `snapTools` only contained `makeSnap`, it was removed
completely.
2024-03-04 22:22:14 -08:00
adisbladis
b6e4b86809 importNpmLock: init
This is an alternative to `fetchNpmDeps` that is notably different in that it uses metadata from `package.json` & `package-lock.json` instead of specifying a fixed-output hash.

Notable features:
- IFD free.
- Only fetches a node dependency once. No massive FODs.
- Support for URL, Git and path dependencies.
- Uses most of the existing `npmHooks`

`importNpmLock` can be used _only_ in the cases where we need to check in a `package-lock.json` in the tree.
Currently this means that we have 13 packages that would be candidates to use this function, though I expect most usage to be in private repositories.

This is upstreaming the builder portion of https://github.com/adisbladis/buildNodeModules into nixpkgs (different naming but the code is the same).
I will archive this repository and consider nixpkgs the new upstream once it's been merged.

For more explanations and rationale see https://discourse.nixos.org/t/buildnodemodules-the-dumbest-node-to-nix-packaging-tool-yet/35733

Example usage:
``` nix
stdenv.mkDerivation {
  pname = "my-nodejs-app";
  version = "0.1.0";

  src = ./.;

  nativeBuildInputs = [
    importNpmLock.hooks.npmConfigHook
    nodejs
    nodejs.passthru.python # for node-gyp
    npmHooks.npmBuildHook
    npmHooks.npmInstallHook
  ];

  npmDeps = buildNodeModules.fetchNodeModules {
    npmRoot = ./.;
  };
}
```
2024-03-05 12:23:28 +13:00
github-actions[bot]
77ea4cb645
Merge staging-next into staging 2024-03-04 12:06:32 +00:00
github-actions[bot]
6620dd578c
Merge master into staging-next 2024-03-04 12:06:01 +00:00
github-actions[bot]
7e5216523f
Merge staging-next into staging 2024-03-04 06:11:00 +00:00
github-actions[bot]
1a3380fec6
Merge master into staging-next 2024-03-04 06:10:33 +00:00
Vladimír Čunát
ea4b95755d
Revert "writers: add support for wrapping" 2024-03-04 07:05:23 +01:00
lassulus
97345af560
Merge pull request #291854 from DavHau/writers-wrap
writers: add support for wrapping
2024-03-04 08:37:18 +07:00
David McFarland
6b047e397a mkNugetDeps: provide default for nugetDeps 2024-03-03 09:57:47 -04:00
David McFarland
ca181cefee nuget-to-nix: skip local sources 2024-03-03 09:57:47 -04:00
Sandro
0c448ca515
Merge pull request #292616 from alyssais/libredirect-LFS64
libredirect: don't test LFS64 functions on musl
2024-03-02 20:31:14 +01:00
Martin Weinelt
76d0baf0c2
Merge pull request #292777 from alyssais/rustdoc-wrap
wrapRustc: wrap rustdoc
2024-03-02 15:09:14 +01:00
Alyssa Ross
6f8fa05acf
wrapRustc: wrap rustdoc
We need to set -crt-static on musl for rustdoc as well, so let's unify
the wrappers.  Ideally, rather than wrapping rustdoc, we'd have
rustdoc use the wrapped rustc, but that's currently only possible with
an unstable option (--test-builder).

The options set by the wrapper, -C target-feature and --sysroot, are
supported by both rustdoc and rustc, but other flags maybe not be
supported by both, so I've introduced different environment
variables (the existing NIX_RUSTFLAGS and a new NIX_RUSTDOCFLAGS) to
allow those to be set independently.

This fixes cargo-auditable in pkgsMusl., which broke because its
doctests stopped working when -crt-static was moved to the wrapper.

Fixes: 79156bf13a ("rustc: move crt-static default override to wrapper (#291829)")
2024-03-02 13:09:07 +01:00
Jonas Fierlings
f4871a62d2
dockerTools: Do not pass compressor to streamLayeredImage 2024-03-02 10:18:56 +01:00
Jonas Fierlings
f73a079352
dockerTools: Test changing compression of buildLayeredImage 2024-03-02 10:18:53 +01:00
github-actions[bot]
9819563ca9
Merge master into staging-next 2024-03-02 06:00:53 +00:00
Gabriella Gonzalez
b8698cd8d6
macOS support for NixOS tests (#282401)
Closes #193336
Closes #261694
Related to #108984

The goal here was to get the following flake to build and run on
`aarch64-darwin`:

```nix
{ inputs.nixpkgs.url = <this branch>;

  outputs = { nixpkgs, ... }: {
    checks.aarch64-darwin.default =
      nixpkgs.legacyPackages.aarch64-darwin.nixosTest {
        name = "test";

        nodes.machine = { };

        testScript = "";
      };
  };
}
```

… and after this change it does.  There's no longer a need for the
user to set `nodes.*.nixpkgs.pkgs` or
`nodes.*.virtualisation.host.pkgs` as the correct values are inferred
from the host system.
2024-03-02 06:33:14 +01:00
Alyssa Ross
13eea132c0
libredirect: don't test LFS64 functions on musl
These were removed in musl 1.2.4.
2024-03-02 01:02:36 +01:00
github-actions[bot]
18bc3c64e6
Merge master into staging-next 2024-03-01 12:00:58 +00:00
Vladimír Čunát
0e4d8e918e
Merge #291901: clang: don't set -march for overridden target
...into staging-next
2024-03-01 11:32:18 +01:00
Alyssa Ross
12b0e8ac74
clang: don't set -march for overridden target
If -target is explicitly passed to clang, we shouldn't pass our -march
value for the default target, because it probably won't exist for the
target being used.  Up until now, clang has been lenient with this,
but it's a hard error with clang 17, so since gcc.arch is always set
on aarch64, fixing this is a hard requirement for upgrading our
default clang to 17.

Before (with clang 17 on aarch64-linux):

	$ clang -target bpf -c -o /dev/null test.bpf.c
	clang: warning: ignoring '-fstack-protector-strong' option as it is not currently supported for target 'bpf' [-Woption-ignored]
	clang: error: unsupported option '-march=' for target 'bpf'
	clang: warning: argument unused during compilation: '--gcc-toolchain=/nix/store/cngak08nb1yk44gnjipv5rg1ahh1xkax-gcc-13.2.0' [-Wunused-command-line-argument]

After:

	$ clang -target bpf -c -o /dev/null test.bpf.c
	clang: warning: ignoring '-fstack-protector-strong' option as it is not currently supported for target 'bpf' [-Woption-ignored]
	clang: warning: argument unused during compilation: '--gcc-toolchain=/nix/store/cngak08nb1yk44gnjipv5rg1ahh1xkax-gcc-13.2.0' [-Wunused-command-line-argument]
2024-03-01 09:51:49 +01:00
lassulus
2db7e7c5e2
Merge pull request #292300 from hsjobeki/writers
doc & fix: Clean up writers/data.nix file
2024-03-01 13:44:29 +07:00
github-actions[bot]
c7d7e4a7a5
Merge staging-next into staging 2024-02-29 18:01:30 +00:00
Pol Dellaiera
2bf7ff4806
Merge pull request #289840 from PigeonF/master
Make `dockerTools.buildImageWithNixDb` reproducible
2024-02-29 13:03:07 +01:00
DavHau
3e3ae4ecf5 writers: add support for wrapping
Add a makeWrapperArgs argument to all script writers under pkgs.writers.

This can be used to set, prefix, or suffix the PATH or other environment variables which improves the ability to generate scripts with reproducible behavior.

Some of the writers (writeBash, writeDash, writeFish, writeNu) previously did not support passing an argument set, for example
```
writeBash "example" "echo hello"

```

In order to add the new capability to these writers as well, their call signature is now overloaded in order to allow the following:
(The old call style from the example above remains intact)
```
writeBash "example"
  { makeWrapperArgs = [ "--prefix" "PATH" ":" "${pkgs.hello}/bin" ]; }
  ''
    hello
  ''
```

Done as well:
- add tests
- add more docs
- fix some misleading docs
- extend existing docs with more examples
2024-02-29 17:31:58 +07:00
Johannes Kirschbauer
54658a47d0
doc: improve pkgs.writers comments 2024-02-29 10:38:03 +01:00
Dawid Dziurla
de8942e125
dockerTools: set NIX_SSL_CERT_FILE in image 2024-02-29 07:58:55 +01:00
Martin Weinelt
65b31e498a Merge remote-tracking branch 'origin/staging-next' into staging
Conflicts:
- pkgs/development/python-modules/influxdb/default.nix
- pkgs/development/tools/misc/binutils/default.nix
2024-02-29 07:19:15 +01:00
Thomas Lepoix
6aa4ed4487
applyPatches: Fix a bug (#283887) 2024-02-29 01:29:48 +01:00
Silvan Mosberger
cd5dc76d83 substitute: Deprecate replacements, introduce replacementsList
Also:
- Add tests
- Treewide update
- Improve docs
2024-02-29 00:35:27 +01:00
Alyssa Ross
79156bf13a
rustc: move crt-static default override to wrapper (#291829)
Previously, when cross compiling from non-musl to musl, the crt-static
default override wouldn't be applied, because the compiler wouldn't
have been built with it due to fastCross.  Moving it to the wrapper
fixes this without having to introduce extra compiler rebuilds.  And
because the wrapper is applied even to the bootstrap rustc, we no
longer need special handling of crt-static in the Cargo expression.

Unlike --sysroot, rustc allows -C target-feature= to be passed
multiple times, with later instances taking precedence over earlier
ones.  This means that it's very easy to set the default in the
wrapper, just by our overridden default before any other arguments.

This fixes pkgsCross.aarch64-multiplatform-musl.mesa from x86_64-linux.
2024-02-28 23:10:07 +01:00
github-actions[bot]
6de655cb49
Merge staging-next into staging 2024-02-28 06:01:43 +00:00
Robert Hensing
57c1108204
Merge pull request #282886 from WxNzEMof/docker-tools-uid
Allow streaming layered containers with non-root Nix store
2024-02-28 03:43:07 +01:00
github-actions[bot]
ac95e31c0c
Merge staging-next into staging 2024-02-27 00:02:36 +00:00
Thomas Gerbet
3a19a727c8
Merge pull request #285828 from drupol/php/remove-COMPOSER-ROOT-VERSION-env
build-support/php: set `COMPOSER_ROOT_VERSION` environment variable
2024-02-26 20:38:02 +01:00
WxNzEMof
b2f19980db Remove the redundant comments from streamLayeredImage parameters
The proper place to describe them is the documentation, where they are
described thoroughly.
2024-02-26 19:29:04 +00:00
WxNzEMof
2697d34603 streamLayeredImage: Change mode of /nix, /nix/store to 755
The change is insignificant when the owner is root.  However, when it
is not root, this change is needed to allow using Nix (as an
unprivileged user) inside the container.
2024-02-26 18:10:51 +00:00
WxNzEMof
0ec13cdb90 streamLayeredImage: Allow customizing ownership
This opens the way towards building images where Nix can be used as an
unprivileged user (in single-user mode).
2024-02-26 18:10:51 +00:00
Luflosi
3cd7775172
substituteAll: fix typo in comment 2024-02-26 14:11:42 +01:00
github-actions[bot]
41e7732291
Merge staging-next into staging 2024-02-25 18:01:23 +00:00
Thomas Heijligen
f2a142727c gnatPackages: Add scope for all ada packages
Ada depencencies musst be build with the same gnat version as the
project. Use a namespace as preperation to build with different gnat
versions.

gprbuild and gnatprove are still globaly visable.
2024-02-25 18:19:50 +01:00
Pol Dellaiera
f43fb4c110
build-support/php: set COMPOSER_ROOT_VERSION by default 2024-02-25 10:03:22 +01:00
Robert Scott
4a91b3e798 cc-wrapper: add trivialautovarinit hardening flag support
this equates to -ftrivial-auto-var-init=pattern

clang has removed support for -ftrivial-auto-var-init=zero and
are unlikely to re-add it, so use -ftrivial-auto-var-init=pattern
on both compilers if only to make behaviour more consistent
between the two.

add to pkgsExtraHardening's defaultHardeningFlags.
2024-02-24 12:00:09 +00:00
Weijia Wang
5f5062d1ef Merge branch 'master' into staging-next 2024-02-23 05:09:55 +01:00
Sandro
f9bc4e1718
Merge pull request #277494 from trofi/buildFHSEnv-fix-eval 2024-02-22 21:00:19 +01:00
Bruno Bigras
8be4892fcb
Merge pull request #283572 from baracoder/appimage-pipewire
appimage-run: Add pipewire support
2024-02-22 14:17:54 -05:00
github-actions[bot]
2d9ce4a9af
Merge master into staging-next 2024-02-19 18:01:11 +00:00
Robert Hensing
d2dfcfcfad
Merge pull request #289584 from athre0z/docker-zstd
dockerTools: configurable compression schema
2024-02-19 18:06:54 +01:00
Herman Fries
30f9f9c2e5 appimage-run: Add pipewire support 2024-02-18 22:34:27 +01:00
pigeon
2cea1dce6d
nixos/dockerTools: make buildImageWithNixDb reproducible
The loaded database contains timestamps of when the nix paths were
registered. Depending on the host store, these can differ between runs.
Resetting them to a well known values ensures that the produced image is
reproducible.
2024-02-18 21:16:35 +01:00
Joel Höner
4b603ad9cd dockerTools: configurable compression schema
This commit adds support for swapping out the compression algorithm
used in all major docker-tools commands that generate images. The
default algorithm remains unchanged (gzip).
2024-02-17 18:52:42 +01:00
github-actions[bot]
e662338182
Merge staging-next into staging 2024-02-17 12:01:31 +00:00
DavHau
81d43b9b83 fetchPypiLegacy: add test 2024-02-17 17:11:59 +13:00
adisbladis
d52b3a7cc0 fetchPypiLegacy: init PyPi legacy API fetcher
This fetcher is to be used with PyPi mirrors exposing the "legacy" API, such as devpi.

A variant of this fetcher has been used in poetry2nix for years and
has served us well there to support private PyPi mirrors and Devpi.

Example usage:
``` nix
fetchPypiLegacy {
  file = "urllib3-1.26.2.tar.gz";
  hash = "sha256:19188f96923873c92ccb987120ec4acaa12f0461fa9ce5d3d0772bc965a39e08";
  pname = "urllib3";
  url = "https://pypi.org/simple";
}
```

cc @lewo who wrote the this originally
cc contributors @rskew @gmacon @jperras @Smaug123
2024-02-17 17:11:59 +13:00
Rick van Schijndel
b728d76d0e
Merge pull request #255463 from emilylange/stdenv/patch-shebangs-trailing-newline
patch-shebangs: fix crash with shebang without trailing newline
2024-02-16 18:33:27 +01:00
Pol Dellaiera
4dfb2b2405
build-support/php: replace preCheckInstall, postCheckInstall with preInstallCheck, postInstallCheck 2024-02-15 22:26:18 +01:00
Robert Hensing
dcf985388c
Merge pull request #271976 from r-k-b/fix-dockerTools-includeStorePaths
nixos/dockerTools: fix includeStorePaths when enableFakechroot
2024-02-14 23:38:44 +01:00
R. Ryantm
2214a3f6e4 makeInitrdNGTool: 0.1.0 -> 0.1.0 2024-02-12 05:11:50 +00:00
Will Fancher
f8781c3668
Merge pull request #283770 from r-ryantm/auto-update/makeInitrdNGTool
makeInitrdNGTool: 0.1.0 -> 0.1.0
2024-02-10 22:19:21 -05:00
github-actions[bot]
a7f4ae0644
Merge master into staging-next 2024-02-09 12:01:11 +00:00
Orivej Desh (NixOS)
a1c4193600
Merge pull request #285964 from melvyn2/patch-1
build-fhs-user-env: add compatibility for pipewire alsa emulation
2024-02-09 08:17:38 +00:00
github-actions[bot]
13d222c591
Merge master into staging-next 2024-02-08 18:01:04 +00:00
Silvan Mosberger
b94e9dd7a5
Merge pull request #285223 from DanielSidhion/update-dockertools-envhelpers
doc: update environment helpers in dockerTools docs, add fakeNss section
2024-02-08 16:31:33 +01:00
github-actions[bot]
d87f22085f
Merge master into staging-next 2024-02-04 12:00:55 +00:00
Mario Rodas
1be8478d00
Merge pull request #283080 from marsam/postgresql-test-hook-settings
postgresqlTestHook: add postgresqlExtraSettings variable
2024-02-04 06:36:16 -05:00
Melvyn
d0a99254bf
build-fhs-user-env: add compatibility for pipewire alsa emulation 2024-02-02 22:38:49 -08:00
github-actions[bot]
0675b4b947
Merge staging-next into staging 2024-02-02 12:01:43 +00:00
h7x4
0e08f348b7
Merge pull request #284985 from wegank/fetchzip-nix-prefetch
fetchFromGitHub: fix compatibility issue with nix-prefetch
2024-02-02 09:54:55 +01:00
github-actions[bot]
3a8e4cc2aa
Merge staging-next into staging 2024-02-02 06:01:42 +00:00
Rebecca Turner
88ce0b0019
writeShellApplication: Expand test suite 2024-02-01 16:02:34 -08:00
Rebecca Turner
63f7c9b415
writeShellApplication: Document arguments 2024-02-01 16:02:33 -08:00
Rebecca Turner
863786b98b
writeTextFile,writeShellApplication: Allow setting extra arguments 2024-02-01 16:02:33 -08:00
Rebecca Turner
a64766913f
writeShellApplication: Add runtimeEnv argument 2024-02-01 16:02:33 -08:00
Rebecca Turner
ac20bcf449
writeShellApplication: Add bashOptions argument 2024-02-01 16:02:32 -08:00
Martin Weinelt
27fa02d0f1
Merge remote-tracking branch 'origin/staging-next' into staging
Conflicts:
-	pkgs/development/compilers/llvm/10/clang/default.nix
- pkgs/development/compilers/llvm/8/clang/default.nix
2024-02-01 12:25:11 +01:00
DS
0445c39047 doc: update environment helpers in dockerTools docs, add fakeNss section
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2024-02-01 01:37:31 -08:00
Nick Cao
1b391ffbd5 testers.hasPkgConfigModules: use PKG_CONFIG envvar instead of hardcoding
fixes cross compilation
2024-01-31 19:50:05 +01:00
Weijia Wang
a2fa54fa67 fetchFromGitHub: fix compatibility issue with nix-prefetch 2024-01-30 12:21:13 +01:00
Tulili
1e7dc0e1b8 pkgs.writers: fix type in description for writeHaskellBin 2024-01-30 06:48:51 +01:00
Tulili
703a085c0a pkgs.writers: tests for lua ruby, and remove failed tests because of external package errors 2024-01-30 06:48:43 +01:00
Tulili
f6e0ee5545 pkgs.writers: remove tests that dont work anymore and add comments tracking issues 2024-01-30 06:48:35 +01:00
Tulili
05ad04bdd3 pkgs.writers add snu, lua and ruby 2024-01-30 06:48:15 +01:00
github-actions[bot]
6a27b0be74
Merge staging-next into staging 2024-01-29 18:01:37 +00:00
Ryan Lahfa
ec84d47ff6
Merge pull request #274440 from bouk/missing-build-rust-env
build-rust-crate: add missing CARGO_PKG env variables
2024-01-29 17:31:54 +01:00
John Ericson
b5a8242f93
Merge pull request #279039 from wegank/mingw-w64-bump
windows.mingw_w64: 10.0.0 -> 11.0.1
2024-01-29 08:15:02 -05:00
Sergei Trofimovich
c1d3b6b7ba build-support/testers: don't fail the test on empty list of pkg-config modules
Without the change tests like `xorg.imake.tests.pkg-config` fail as:

    $ nix build --no-link -f. -L xorg.imake.tests.pkg-config
    error: builder for '/nix/store/i3zb1ykjzm0622497cn4dvifk36sx00r-check-pkg-config-.drv' failed to produce output path for output 'out' at '/nix/store/i3zb1ykjzm0622497cn4dvifk36sx00r-check-pkg-config-.drv.chroot/nix/store/63y92rvkp7gzzp0hlcjyj92srzjwndrq-check-pkg-config-'
    error: 1 dependencies of derivation '/nix/store/8qycf49a4h9jj2662d9cf4d56aq6djjj-check-meta-pkg-config-modules-for-imake-1.0.9.drv' failed to build

Let's always produce empty output for zero-modules tests.
2024-01-29 10:26:20 +00:00
Bouke van der Bijl
34ad6be1cd build-rust-crate: add missing CARGO_PKG env variables
See https://doc.rust-lang.org/cargo/reference/environment-variables.html
for supported variables
2024-01-28 18:59:53 +01:00
github-actions[bot]
5e17795097
Merge staging-next into staging 2024-01-28 12:01:36 +00:00
Alyssa Ross
59fca7cb67
compressFirmwareXz: don't allow references 2024-01-28 11:57:38 +01:00
Alyssa Ross
24bb06069f
compressFirmwareXz: fail on broken symlinks
This would have caught the last two issues we had with compression.
2024-01-28 11:57:37 +01:00
Alyssa Ross
a136def4f7
compressFirmwareXz: fix symlink type check
The previous version didn't work in the case of relative symlinks in
subdirectories.  If "foo/bar" was a link to "baz", it would check for
a link to "baz" in the root, rather than under "foo".

We don't need to dereference the symlink ourselves for [ anyway, as it
dereferences its arguments itself, so all we need to do to fix this is
to pass it the link.

Fixes: 14f83d5c6f ("compressFirmwareXz: fix links to directories")
2024-01-28 11:57:30 +01:00
Ryan Lahfa
c34dd88211
Merge pull request #284307 from alyssais/rustc-sysroot=
wrapRustc: handle --sysroot=
2024-01-28 00:30:51 +01:00
Alyssa Ross
42b05f1c6d
wrapRustc: handle --sysroot=
This form is used by Linux 6.8.
2024-01-27 19:01:40 +01:00
Weijia Wang
4354538139 Merge branch 'staging-next' into staging 2024-01-27 04:17:36 +01:00
Franz Pletz
0dfe2e933f
Merge pull request #283110 from fpletz/pkgs/compress-firmware-xz-ln-filesuffix 2024-01-26 22:54:35 +01:00
Thiago Kenji Okada
1fee681897 buildGraalvmNativeImage: fix UTF-8 encoding issue for JVM dependencies
Now that we can pass build arguments for the GraalVM builder again (see
https://github.com/NixOS/nixpkgs/pull/282901), this should work again.

Fix issue: https://github.com/NixOS/nixpkgs/issues/283953
2024-01-26 11:12:54 +00:00
Jörg Thalheim
c8758686ec
Merge pull request #283239 from alyssais/rust-lld
rust.envVars: use wrapped LLD for aarch64 musl
2024-01-25 16:16:48 +01:00
R. Ryantm
d4e775bd1a makeInitrdNGTool: 0.1.0 -> 0.1.0 2024-01-25 13:37:20 +00:00
github-actions[bot]
9bf128cad3
Merge staging-next into staging 2024-01-24 00:02:51 +00:00
github-actions[bot]
6a4e9dff73
Merge master into staging-next 2024-01-24 00:02:25 +00:00
Sergei Trofimovich
8ffff1e699 buildFHSEnv: don't export multiPaths attribute
`multiPaths` is defined via invalid operation on `null` value for
non-multilib environments. Noticed on `notesnook` evan failure as:

    nix-repl> notesnook.fhsenv.multiPaths
              253|   passthru = {
              254|     inherit args baseTargetPaths targetPaths baseMultiPaths multiPaths ldconfig;
                 |            ^
              255|   };
           error: attempt to call something which is not a function but null

The change makes `multiPaths` a private variable.
2024-01-23 20:24:17 +00:00
Matthew Planchard
d538fefb62
Use fakeroot for proot cmd in streamLayeredImage
Resolves #275705
2024-01-23 14:55:08 -05:00
Alyssa Ross
3bf20e5bf8
rust.envVars: use wrapped LLD for aarch64 musl
The unwrapped version doesn't know where to look for libraries, so
this is required to e.g. build anything that uses openssl-sys with
OPENSSL_NO_VENDOR.  A randomly chosen example package that's fixed by
this change is pkgsStatic.gitoxide.
2024-01-23 17:25:50 +01:00
Alyssa Ross
f3a07da669
rust: use pkgsBuildHost/pkgsTargetTarget
We're already using pkgsBuildBuild, and we'll soon be using
pkgsBuildTarget, so for consistency, change buildPackages and
targetPackages to their corresponding two-component names.
2024-01-23 17:25:23 +01:00
Franz Pletz
14f83d5c6f
compressFirmwareXz: fix links to directories
Only add the `.xz` suffix to links if link target is a regular file.
This breaks if the target is a directory.

Fixes #283005.
2024-01-23 07:16:59 +01:00
github-actions[bot]
0c0f70ab25
Merge staging-next into staging 2024-01-22 18:01:24 +00:00
github-actions[bot]
3c7375b75c
Merge master into staging-next 2024-01-22 18:00:55 +00:00
sohalt
9d353905ea build-graalvm-native-image: pass whole environment
Pass the whole environment to the native-image build process by
generating a -E option for every environment variable.

This has the same effect as setting
NATIVE_IMAGE_DEPRECATED_BUILDER_SANITATION=true
but is compatible with packages providing -E options themselves
2024-01-22 18:11:14 +01:00
sohalt
2f6981d6e1 build-graalvm-native-image: do not use NATIVE_IMAGE_DEPRECATED_BUILDER_SANITATION
Packages that require access to environment variables in the build
should specify these using `-E` arguments in `nativeImageBuildArgs` or
using a `native-image.properties` as described here:
https://www.graalvm.org/22.1/reference-manual/native-image/BuildConfiguration/#embedding-a-configuration-file

Specifying NATIVE_IMAGE_DEPRECATED_BUILDER_SANITATION=true breaks with
packages that list their environment variables explicitly in `native-image.properties`.
2024-01-22 12:44:31 +01:00
Mario Rodas
70b51d8d17 postgresqlTestHook: add postgresqlExtraSettings variable
Add `postgresqlExtraSettings` to allow to setup the `postgresql.conf`.
This would be useful in cases where we need to set
`shared_preload_libraries`.
2024-01-22 04:20:00 +00:00
Robert Scott
506ec38e7f cc-wrapper, clang: use new mechanism to selectively unsupport zerocallusedregs
this allows a compiler derivation to provide a
hardeningUnsupportedFlagsByTargetPlatform passthru attr
that will be called with the targetPlatform to determine
the unsupported hardening flags for that platform.

we can do this because even though a clang compiler is
multi-target by nature, cc-wrapper effectively fixes the
target platform at wrapping time. otherwise we'd have to
sniff the intended target at runtime, which wouldn't
be fun at all.

the advantage of using a new attribute instead of
allowing hardeningUnsupportedFlags to optionally be a
function is that hardeningUnsupportedFlags retains its
simple overriding pattern for simple cases (i.e.
  `(prev.hardeningUnsupportedFlags or []) ++ [ "foo" ]`
) which will continue to work as long as the bottom-most
function of hardeningUnsupportedFlagsByTargetPlatform
falls back to hardeningUnsupportedFlags.
2024-01-21 11:16:07 +00:00
Robert Scott
40868719b0 cc-wrapper: add zerocallusedregs hardening flag
this uses the value `used-gpr` which seems to be a commonly
chosen value for general use
2024-01-20 13:48:33 +00:00
github-actions[bot]
0cd628f6d5
Merge master into staging-next 2024-01-20 06:01:03 +00:00
Adam Joseph
86c28ee650 cc-wrapper: relocate proprietary-compiler-specific material
PR #275947, which was self-merged without approvals, inserted
functionality specific to a propriteary closed-source compiler
(CUDA) into cc-wrapper.

This commit relocates this CUDA-specific functionality into the
appropritate place: `cuda-modules`.

It is unclear to me exactly what this function is supposed to be
doing; much of it (like the `.kind` attributes) do not appear to be
used *anywhere* in nixpkgs.  Making sure we don't insert unexplained
deadcode like this is one of the important functions of the review
process.
2024-01-20 05:46:57 +00:00
Adam Joseph
d07ab95104 cc-wrapper: revert speculative commentary
This commit deletes speculative comments which were self-merged with
no approvals in PR #275947.

If you think that "The above 'fix' may be incorrect" the correct
response is to submit a PR which removes the 'fix' and get it reviewed.

Likewise, if you think that "For clang it's not necessary" you
should submit a PR which wraps it in `if !isClang`.

`cc-wrapper` is full of too much junk as it is, let's not make
things worse.
2024-01-20 05:46:41 +00:00
Weijia Wang
1fcb965033
Merge pull request #273499 from raphaelr/fix/tests.writers.simple.fsharp
tests.writers.simple.fsharp: Add missing dependency
2024-01-20 06:12:22 +01:00
github-actions[bot]
650e10b010
Merge master into staging-next 2024-01-20 00:02:16 +00:00
Maciej Krüger
45308f5528
Merge pull request #281662 from hacker1024/feature/flutter-build-web
Support Web builds in buildFlutterApplication
2024-01-19 23:56:52 +01:00
hacker1024
64f9fa0d2c buildFlutterApplication: Change flutterHostPlatform to targetFlutterPlatform 2024-01-19 11:07:33 +11:00
K900
967d49b8a8 Merge remote-tracking branch 'origin/staging-next' into staging 2024-01-18 19:15:32 +03:00
Adam Joseph
0c3d9f28c6 cc-wrapper: drop no-longer-necessary hack
The commit prior to this one, "gcc: fix c++ headers when same
triplet cross compiling" causes gcc's c++ headers to be in the same
outpath subdirectory regardless of whether the gcc build is a
host==target or host!=target compiler.

As a result of that change, the hack in cc-wrapper which adapted to
the different paths is no longer needed.  And, in fact, it must be
removed, since if it is left in place builds such as
pkgsCross.aarch64-multiplatform.firefox will fail as shown below.

```
firefox-unwrapped>  0:02.01(B checking the host C compiler works... yes(B(B
firefox-unwrapped>  0:02.01(B checking for the host C++ compiler... /nix/store/1asqji9djmdlapzs70q7jw2j308ry7cn-clang-wrapper-16.0.6/bin/c++(B(B
firefox-unwrapped>  0:02.14(B checking whether the host C++ compiler can be used... yes(B(B
firefox-unwrapped>  0:02.14(B checking the host C++ compiler version... 16.0.6(B(B
firefox-unwrapped>  0:02.21(B checking the host C++ compiler works... yes(B(B
firefox-unwrapped>  0:02.40(B checking for target linker... lld(B(B
firefox-unwrapped>  0:02.51(B checking for host linker... lld(B(B
firefox-unwrapped>  0:02.60(B checking for 64-bit OS... yes(B(B
firefox-unwrapped>  0:02.67(B checking for new enough STL headers from libstdc++...(B(B
firefox-unwrapped>  0:02.67(B DEBUG: <truncated - see config.log for full output>(B(B
firefox-unwrapped>  0:02.67(B DEBUG: |                 #if defined(__GLIBCXX__) && !defined(_GLIBCXX_RELEASE)(B(B
firefox-unwrapped>  0:02.67(B DEBUG: | #  error libstdc++ not new enough(B(B
firefox-unwrapped>  0:02.67(B DEBUG: | #endif(B(B
firefox-unwrapped>  0:02.67(B DEBUG: | #if defined(_GLIBCXX_RELEASE)(B(B
firefox-unwrapped>  0:02.67(B DEBUG: | #  if _GLIBCXX_RELEASE < 8(B(B
firefox-unwrapped>  0:02.67(B DEBUG: | #    error libstdc++ not new enough(B(B
firefox-unwrapped>  0:02.67(B DEBUG: | #  else(B(B
firefox-unwrapped>  0:02.67(B DEBUG: |      (void) 0(B(B
firefox-unwrapped>  0:02.67(B DEBUG: | #  endif(B(B
firefox-unwrapped>  0:02.67(B DEBUG: | #endif(B(B
firefox-unwrapped>  0:02.67(B DEBUG: |                   ;(B(B
firefox-unwrapped>  0:02.67(B DEBUG: |                   return 0;(B(B
firefox-unwrapped>  0:02.67(B DEBUG: |                 }(B(B
firefox-unwrapped>  0:02.67(B DEBUG: Executing: `/nix/store/7v4bi4q334yircaznwm353h1l5i7k98f-aarch64-unknown-linux-gnu-clang-wrapper-16.0.6/bin/aarch64-unknown-linux-gnu-clang++ /build/conftest.qvbo58dv.cpp -c`(B(B
firefox-unwrapped>  0:02.67(B DEBUG: The command returned non-zero exit status 1.(B(B
firefox-unwrapped>  0:02.67(B DEBUG: Its error output was:(B(B
firefox-unwrapped>  0:02.67(B DEBUG: | /build/conftest.qvbo58dv.cpp:1:10: fatal error: 'cstddef' file not found(B(B
firefox-unwrapped>  0:02.67(B DEBUG: | #include <cstddef>(B(B
firefox-unwrapped>  0:02.67(B DEBUG: |          ^~~~~~~~~(B(B
firefox-unwrapped>  0:02.67(B DEBUG: | 1 error generated.(B(B
firefox-unwrapped>  0:02.67(B ERROR: The libstdc++ in use is not new enough.  Please run ./mach bootstrap to update your compiler, or update your system libstdc++ installation.(B(B
firefox-unwrapped> *** Fix above errors and then restart with "./mach build"
error: build of '/nix/store/5in7xkji5hzqkl14ygwq3vxnni54lykk-firefox-unwrapped-aarch64-unknown-linux-gnu-119.0.1.drv' on 'ssh://root@192.168.22.103' failed: builder for '/nix/store/5in7xkji5hzqkl14ygwq3vxnni54lykk-firefox-unwrapped-aarch64-unknown-linux-gnu-119.0.1.drv' failed with exit code 1
error: builder for '/nix/store/5in7xkji5hzqkl14ygwq3vxnni54lykk-firefox-unwrapped-aarch64-unknown-linux-gnu-119.0.1.drv' failed with exit code 1;
```
2024-01-18 09:01:04 +00:00
Weijia Wang
b0fb3f62d0
Merge pull request #278242 from raphaelr/mknugetsource-remove-ifd
mkNugetSource: Remove meta.licenses attribute
2024-01-18 09:22:38 +01:00
hacker1024
3b33435d02 flutter.buildFlutterApplication: Add multiShell attribute 2024-01-18 14:20:03 +11:00
hacker1024
e3b2edadef dartHooks.dartInstallHook: Add trailing newline 2024-01-18 12:17:43 +11:00
hacker1024
046da09ddd flutter.buildFlutterApplication: Properly throw unsupported host platform error 2024-01-18 11:59:38 +11:00
hacker1024
f51a0b053d flutter.buildFlutterApplication: Allow building for the Web 2024-01-18 10:27:32 +11:00
hacker1024
b43ee05f4e dartHooks.dartInstallHook: Allow disabling cache installation independently 2024-01-18 10:15:35 +11:00
hacker1024
196a0a5b2d buildDartApplication: Add custom outputs to the end of the list 2024-01-18 10:13:57 +11:00
Robert Hensing
1f9e86f314 nixosTests.docker-tools: Use both code paths in includeStorePath test 2024-01-17 13:50:01 +01:00
github-actions[bot]
7e5906aca4
Merge staging-next into staging 2024-01-16 12:01:24 +00:00
Valentin Gagarin
675aa305a1
Merge pull request #281227 from fricklerhandwerk/fix-backticks 2024-01-16 08:19:26 +01:00
github-actions[bot]
4c8ce132ff
Merge staging-next into staging 2024-01-16 06:01:25 +00:00
Vladimír Čunát
141a1ec41d
Merge #279934: fetchFromGitHub: drop unzip 2024-01-16 05:52:01 +01:00
Maciej Krüger
60e27c9596
Merge pull request #280875 from hacker1024/fix/dart-language-version-regex
pub2nix: Fix language version RegEx on Darwin
2024-01-16 02:17:34 +01:00
github-actions[bot]
35f426a31b
Merge staging-next into staging 2024-01-16 00:02:37 +00:00
Valentin Gagarin
eaebe13ebd doc: use markdown backticks for code tokens 2024-01-15 23:03:14 +01:00
Valentin Gagarin
2392daed23
Merge pull request #277534 from mcdonc/doc-trivial-builders-writetext
* doc: improve documentation for trivial text writing functions

Co-authored-by: Brian Merchant <bzm3r@proton.me>
Co-authored-by: Robert Hensing <robert@roberthensing.nl>
Co-authored-by: Alexander Groleau <alex@proof.construction>
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2024-01-15 22:34:40 +01:00
Yureka
0eed8836c5 buildRustPackage: disable cargo-auditable on pkgsStatic aarch64 2024-01-15 22:34:02 +01:00
Yureka
48a6213611 rust: use lld on pkgsStatic aarch64 2024-01-15 22:34:02 +01:00
Yureka
b8076b893e rust: allow linker to be different from compiler 2024-01-15 22:34:02 +01:00
Robert Hensing
559d06bbb2 trivial-builders: Remove redundant docs - link instead 2024-01-15 09:02:45 +01:00
Jörg Thalheim
a292058564
Merge pull request #276685 from katexochen/buildGoModule/buildid
buildGoModule: always set `-buildid=` as ldflag
2024-01-14 14:13:16 +01:00
hacker1024
ee18b58cf4 pub2nix: Fix language version regex on Darwin 2024-01-14 17:21:51 +11:00
Will Fancher
9e9a77c512
Merge pull request #279329 from r-ryantm/auto-update/makeInitrdNGTool
makeInitrdNGTool: 0.1.0 -> 0.1.0
2024-01-13 19:02:08 -05:00
Valentin Gagarin
fd78de6eeb
Merge pull request #267285 from fricklerhandwerk/code-comment 2024-01-13 20:51:37 +01:00
Ryan Lahfa
41aa423726
Merge pull request #236370 from amarshall/applypatches-nopatches
applyPatches: skip creating additional drv when no patches
2024-01-13 16:50:34 +01:00
Someone
bc5ed95a04
Merge pull request #275947 from SomeoneSerge/fix/cuda-cc-wrapper
cudaPackages.backendStdenv.cc: gccForLibs
2024-01-13 09:36:02 +00:00
Mario Rodas
19ce690703
Merge pull request #277899 from trofi/build-support-fetchgithub-fix-metadata-eval
build-support/fetchgithub: fix metadata eval for arguments without lo…
2024-01-12 17:56:46 -05:00
Weijia Wang
fda4c4e299 bintools: disable relro/bindnow hardening on windows 2024-01-12 22:11:17 +01:00
Andrew Marshall
52c27352ce applyPatches: skip creating additional drv when no patches
If there are no `patches` or `postPatch`, then this will just do work to
make something equivalent to `src`. Instead, just return `src` in that
case.
2024-01-12 15:49:24 -05:00
Weijia Wang
71a024e1f6 fetchFromGitHub: drop unzip 2024-01-12 20:26:20 +01:00
Weijia Wang
c28c56f379 fetchzip: allow dropping unzip 2024-01-12 20:26:16 +01:00
Ryan Lahfa
d74aefe80e
Merge pull request #251267 from lilyinstarlight/fix/dotnet-installPath
buildDotnetModule: actually use installPath
2024-01-12 19:30:12 +01:00
Someone Serge
8eda4c36a5
cc-wrapper: cxxStdlib: expose solib and package separately 2024-01-12 17:38:00 +00:00
Rahul Butani
290ea23649
cc-wrapper: expose the c++ std library being used
(cherry picked from commit dc6a8f9f7912363577e11520bafa040c0db14359)
2024-01-12 17:38:00 +00:00
github-actions[bot]
5ee7600250
Merge master into staging-next 2024-01-11 12:01:18 +00:00
Maciej Krüger
f3f4f93651
Merge pull request #280003 from hacker1024/feature/dart-auto-pubspec-lock
buildDartApplication: Allow reading pubspec.lock with IFD
2024-01-11 09:21:59 +01:00
github-actions[bot]
28d4a2210a
Merge master into staging-next 2024-01-11 06:01:20 +00:00
John Ericson
3eb8277236
Merge pull request #278679 from kolloch/feature/build-rust-crate-without-sharedLibrary-extension
build-rust-crate: Allow missing `hostPlatform.extensions.sharedLibrary`
2024-01-10 21:50:54 -05:00
Weijia Wang
2f9e98ccf3 Merge branch 'master' into staging-next 2024-01-10 23:12:44 +01:00
Pascal Bach
f709ab9d6a
Merge pull request #277154 from aib/ocitools-fix-invalid-cgroup-mount-option
ociTools: Fix invalid cgroup mount option
2024-01-10 23:06:54 +01:00
hacker1024
778cefd464 buildDartApplication: Allow reading pubspec.lock with IFD 2024-01-10 20:29:53 +11:00
github-actions[bot]
122355be99
Merge master into staging-next 2024-01-10 00:02:18 +00:00
Robert Hensing
098ffee102
Merge pull request #279487 from bryango/checkpoint-build-polish
checkpointBuildTools: mkCheckpointedBuild -> mkCheckpointBuild
2024-01-09 22:30:22 +01:00
K900
838aefefc3 Merge remote-tracking branch 'origin/master' into staging-next 2024-01-09 22:42:37 +03:00
Jeff Huffman
a6671578ff
buildFHSEnv: bind dbus session bus into place when privateTmp enabled (#278917) 2024-01-09 18:29:53 +01:00
K900
bff9ee8862 Merge remote-tracking branch 'origin/master' into staging-next 2024-01-09 13:03:34 +03:00
Jörg Thalheim
99d3b3d7bf
Merge pull request #279486 from r-burns/exec-format-cleanup
treewide: simplify exec format conditionals
2024-01-09 09:44:34 +01:00
Bryan Lai
d7253bea6d doc: polish the docs of checkpointBuildTools
... following suggestions from @phip1611 and @infinisil.
2024-01-09 01:34:21 +08:00
Bryan Lai
5f3aad00ff checkpointBuildTools: minor refactor
Add some minor improvements of the package, and use temp files for the
source difference patch, such that it is more reliable. This follows
from the suggestions of @infinisil.

Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2024-01-09 01:14:48 +08:00
Martin Weinelt
ef1898454c
Merge remote-tracking branch 'origin/master' into staging-next
Conflicts:
-	pkgs/development/python-modules/aiohappyeyeballs/default.nix
2024-01-08 16:34:52 +01:00
Bryan Lai
df62c3c87f checkpointBuildTools: mkCheckpointedBuild -> mkCheckpointBuild
All other functions are in the form of `*{c,C}heckpointBuild*`, so we
deprecate the `mkCheckpointedBuild` function in favor of `mkCheckpointBuild`.

Also address some inconsistencies in the docs: some `buildOutput` should
actually be `incrementalBuildArtifacts`.
2024-01-08 19:42:16 +08:00
Valentin Gagarin
25c0077a31 doc: add note on which variables are effective
The build log of the following won't output `foo` as one might expect, but the
`$PATH` set by stdenv.

```nix
with import <nixpkgs> {};
runCommand "foo" { PATH = "foo"; } "echo $PATH; touch $out"
```
2024-01-08 12:16:19 +01:00
Valentin Gagarin
7ae1fdc9a7 doc: reformat 2024-01-08 12:16:03 +01:00
Ryan Burns
c324705cc3 treewide: simplify exec format conditionals 2024-01-07 17:43:33 -08:00
github-actions[bot]
2984c5a0a5
Merge master into staging-next 2024-01-08 00:02:22 +00:00
R. Ryantm
19b4bac3d0 makeInitrdNGTool: 0.1.0 -> 0.1.0 2024-01-07 10:39:28 +00:00
K900
790cc209ea bintools-wrapper: fix static check platform
This was moved in 1a5bd697ad,
the preceding check was updated from hostPlatform to targetPlatform, but these got missed.
2024-01-06 10:32:08 +03:00
Adam Stephens
b4c0220a22
nuke-references: add meta.mainProgram 2024-01-05 15:04:14 -05:00
github-actions[bot]
76201c62e0
Merge master into staging-next 2024-01-05 18:00:58 +00:00
Maciej Krüger
349e0c2870
Merge pull request #263345 from hacker1024/feature/pub2nix
dart: Use Nix instead of Pub
2024-01-05 16:34:07 +01:00
github-actions[bot]
1e290d634f
Merge master into staging-next 2024-01-05 00:02:27 +00:00
Peder Bergebakken Sundt
73148fa5a8
Merge pull request #272520 from nrabulinski/fix-fetchpijul
build-support/fetchpijul: Add cacert dependency, set impureEnvVars, and enable strictDeps
2024-01-05 00:51:05 +01:00
Vladimír Čunát
8a839514de
Merge branch 'master' into staging-next 2024-01-04 15:07:44 +01:00
Peter Kolloch
597f3d31d8 build-rust-crate: Allow missing hostPlatform.extensions.sharedLibrary
If you cross-build, sharedLibrary might not be set. E.g. for this
nixpkgs instance:

```nix
pkgs = import <nixpkgs> {
    config = { };
    crossSystem = {
        config = "riscv32-unknown-none-elf";
        rustc = {
            config = "riscv32i-unknown-none-elf";
        };
    };
}
```
2024-01-04 12:15:32 +01:00
adisbladis
dbc85690de
Merge pull request #277335 from adisbladis/buildenv-hoist-instantiation
build-support/buildenv: Hoist builder instantiation
2024-01-04 12:32:40 +13:00
Raphael Robatsch
928d66083e mkNugetSource: Allow passing arbitrary stdenv.mkDerivation attrs
This allows things such as

    mkNugetSource {
        name = "foo-nuget-source";
        deps = [ ... ];
        meta = {
            hydraPlatforms = [ ];
        };
    }
2024-01-02 20:27:20 +01:00
Raphael Robatsch
5fb3301dad mkNugetSource: Remove meta.licenses attribute
- It's useless. The correct attribute name would be `license` and not
  `licenses`. Meaning setting this never did anything useful.
- It used IFD in its implementation, meaning to know what the licenses
  of a nuget source are, you first had to build that nuget source. This
  defeats the point of having license checks in the first place.
- IFD is not allowed by the nixpkgs CI and build farm anyway.
2024-01-02 11:21:19 +01:00
K900
887e96e875 Merge remote-tracking branch 'origin/master' into staging-next 2024-01-02 10:55:23 +03:00
Will Fancher
1570f54b75
Merge pull request #278128 from r-ryantm/auto-update/makeInitrdNGTool
makeInitrdNGTool: 0.1.0 -> 0.1.0
2024-01-01 18:14:05 -05:00
R. Ryantm
5ff7811393 makeInitrdNGTool: 0.1.0 -> 0.1.0 2024-01-01 20:10:05 +00:00
K900
6cbe5542b8
Merge pull request #276072 from lilyinstarlight/fix/cargo-workspace-root-fixup-pls
rustPlatform.importCargoLock: fix workspace_root detection
2024-01-01 18:42:49 +03:00
Sergei Trofimovich
6104083817 build-support/fetchgithub: fix metadata eval for arguments without locations
Without the change metadata evaluation fails on package like
`zammad.src` where no fields are defined in `.nix `files:

    src = fetchFromGitHub (lib.importJSON ./source.json);

There evaluation fails as:

    $ nix-instantiate --strict --eval --expr 'with import ./. {}; zammad.src.meta'
    error:
           23|     # to indicate where derivation originates, similar to make-derivation.nix's mkDerivation
           24|     position = "${position.file}:${toString position.line}";
             |     ^
           25|   };
       error: value is null while a set was expected

After the change evaluation succeeds as:

    $ nix-instantiate --strict --eval --expr 'with import ./. {}; zammad.src.meta'
    { homepage = "https://github.com/zammad/zammad"; }
2023-12-31 11:44:22 +00:00
github-actions[bot]
a9cb88c7ae
Merge staging-next into staging 2023-12-31 06:01:28 +00:00
Jan Tojnar
80020c7db4 Merge branch 'master' into staging-next
; Conflicts:
;	pkgs/development/lua-modules/generated-packages.nix
;	pkgs/development/lua-modules/overrides.nix
2023-12-31 02:31:32 +01:00
Sergei Trofimovich
a1422a7f8f build-support/go: fix eval of vendorSha256 accesses
Before the change there was no way to poll for presence of
`vendorSha256` attribute:

    $ nix-instantiate --strict --eval --expr 'with import ./. {}; _3mux.vendorSha256 or "no hash"'
       error: attribute 'vendorSha256' missing
          292|     passthru = passthru // { inherit go goModules vendorHash; } // { inherit (args') vendorSha256; };
             |                                                                     ^

After the change the poll happens as expected:

    $ nix-instantiate --strict --eval --expr 'with import ./. {}; _3mux.vendorSha256 or "no hash"'
    "no hash"
2023-12-30 12:03:28 +10:00
adisbladis
21d3b6284c
Merge pull request #277327 from adisbladis/emacs-build-support
build-support/emacs: refactor
2023-12-30 13:46:03 +13:00
Vladimír Čunát
895cd4b126
ReApply PR #276943: "melpa2nix: update to work with Emacs HEAD"
This reverts commit 7b623c3388 (PR #277535),
reversing changes made to 0aa7301173.
2023-12-29 14:00:46 +01:00
Vladimír Čunát
de84adb292
Merge branch 'master' into staging-next 2023-12-29 14:00:30 +01:00
Vladimír Čunát
915c004e36
Revert "melpa2nix: update to work with Emacs HEAD" 2023-12-29 13:58:55 +01:00
adisbladis
dda7578745 build-support/buildenv: Hoist builder instantiation 2023-12-29 03:04:46 +13:00
adisbladis
3618d1d247 build-support/emacs: refactor
- Remove superflous `let` with `defaultMeta`

These can just be assigned to meta directly instead.

- Hoist internal intermediate derivation

- Remove top-level `with lib`

- Inherit `lib`/`builtins` into scopes
2023-12-29 02:38:57 +13:00
Paul Meyer
891a634876 buildGoModule: always set -buildid= as ldflag
Signed-off-by: Paul Meyer <49727155+katexochen@users.noreply.github.com>
2023-12-28 09:59:34 +01:00
github-actions[bot]
1528aeb0b6
Merge staging-next into staging 2023-12-28 06:01:31 +00:00
github-actions[bot]
f4041e23e9
Merge master into staging-next 2023-12-28 06:01:05 +00:00
Orhan "aib" Kavrakoglu
a8c6febd15 ociTools: Fix invalid cgroup mount option 2023-12-27 19:41:07 +01:00
FlafyDev
5a5db92870 buildDartApplication: remove customSourceBuilders from baseDerivation 2023-12-26 21:57:46 +02:00
FlafyDev
65b0c270c2 pub2nix: Add disclaimer why not to use fetchTarball 2023-12-26 21:54:30 +02:00