Commit Graph

7929 Commits

Author SHA1 Message Date
Pol Dellaiera
b5855e4e66
build-support/php: move environment variables under env attribute 2024-05-05 18:51:03 +02:00
Pol Dellaiera
6ca2dfeaec
build-support/php: remove obsolete parameters 2024-05-05 18:45:27 +02:00
Jan Tojnar
100509c030 Merge branch 'staging-next' into staging
Conflicts in luaPackages.luarocks-nix:

- 8b563cd9f9 switched to the new version format (prefixed by 0 since there was no relevant last tag in the branch).
  bc4f6fa543 bumped version and switched to the new version format. But the tag used is not part of the branch the commit comes from (master).

  Used the new version but replaced the tag prefix with 0.

- b73ec84b9e removed meta (it is already set in the overridden luarocks). But that would cause the update script to try to update the overridden luarocks (as did the previously used old.meta).
  bf311d950e modified meta to fix the update script properly.

  Kept the meta from the latter since it allows update script to work.
2024-05-05 14:50:32 +02:00
David McFarland
26c3d6878a dotnet: fix dotnet executables in darwin sandbox
This fixes:

    Could not load ICU data. UErrorCode: 2

We're using a hook instead of a wrapper because various things like to
reference the unwrapped dotnet executable.
2024-05-04 19:14:39 -03:00
Pol Dellaiera
75ae762133
workflows/check-nix-format: enforce for build-support/php 2024-05-04 23:06:24 +02:00
github-actions[bot]
63659f437f
Merge staging-next into staging 2024-05-04 00:02:40 +00:00
nicoo
a817fdac5f
Merge #307770: add optional version check in testers.hasPkgConfigModules 2024-05-03 20:18:56 +00:00
Weijia Wang
b4617eb071 Merge branch 'staging-next' into staging 2024-05-03 19:03:51 +02:00
Wael Nasreddine
7c4cc6476b
Merge pull request #298847 from ShamrockLee/build-go-module-buildflag
buildGoModule: warn about buildFlags only when using buildPhase provided by buildGoModule
2024-05-03 10:57:22 -06:00
github-actions[bot]
4e3bc63c95
Merge staging-next into staging 2024-05-02 12:02:05 +00:00
github-actions[bot]
c4dfa193ac
Merge master into staging-next 2024-05-02 12:01:36 +00:00
Weijia Wang
a6742256e2
Merge pull request #279391 from katexochen/buildGoModule/deprecate-buildflags
buildGoModule: announce removal of `buildFlags` and `buildFlagsArray`
2024-05-02 12:58:35 +02:00
Pol Dellaiera
e7ad484731
build-support/php: replace --no-ansi with --no-progress 2024-05-01 11:15:39 +02:00
Pol Dellaiera
382220e679
build-support/php: remove makeBinaryWrapper 2024-05-01 11:15:16 +02:00
nicoo
c150eb5e44 tests.testers.hasPkgConfigModules: Fix typo in comment 2024-04-30 22:24:47 +00:00
nicoo
039bd24f54 tests.testers.hasPkgConfigModules: add testcases for versionCheck 2024-04-30 22:24:05 +00:00
nicoo
1e9d263dd7 testers.hasPkgConfigModules: Optionally check each module's version 2024-04-30 20:34:07 +00:00
nicoo
5fce6cb334 testers.hasPkgConfigModules: Report all errors rather than fail early 2024-04-30 20:34:07 +00:00
Jan Tojnar
eb04659fc2 treewide: wrapGAppsHook → wrapGAppsHook3
This was achieved using the following command:

    sd 'wrapGAppsHook\b' wrapGAppsHook3 (rg -l 'wrapGAppsHook\b')

And then manually reverted the following changes:

- alias in top-level.nix
- function name in wrap-gapps-hook.sh
- comment in postFixup of at-spi2-core
- comment in gtk4
- comment in preFixup of 1password-gui/linux.nix
- comment in postFixup of qgis/unwrapped-ltr.nix and qgis/unwrapped.nix
- comment in postFixup of telegram-desktop
- comment in postFixup of fwupd
- buildCommand of mongodb-compass
- postFixup of xflux-gui
- comment in a patch in kdePackages.kde-gtk-config and plasma5Packages.kde-gtk-config
- description of programs.sway.wrapperFeatures.gtk NixOS option (manual rebuild)
2024-04-27 02:23:22 +02:00
Jan Tojnar
70cf3ecaae wrapGAppsHook: Flip inheritance relationship with wrapGAppsNoGuiHook 2024-04-27 00:05:46 +02:00
Yueh-Shun Li
d09aedb1a0 singularity-tools.buildImage: increase default memSize
Increase the default RAM size for image-building QEMU VM.

Make singularity.tests.image-hello-cowsay build on aarch64-linux.
2024-04-26 14:56:52 +08:00
github-actions[bot]
05273cc291
Merge master into staging-next 2024-04-25 00:02:07 +00:00
Atemu
2432c6b829
Merge pull request #271071 from pbsds/wrapAppImage-pname-redux
appimageTools.wrapAppImage: remove version from `pname`
2024-04-24 21:48:19 +02:00
Peder Bergebakken Sundt
340d601e84 appimage: avoid setting name 2024-04-24 15:26:52 +02:00
Peder Bergebakken Sundt
90622c10bd appimageTools.wrapAppImage: passthru pname and version 2024-04-24 15:26:52 +02:00
Peder Bergebakken Sundt
eb02e003b0 buildFHSEnvBubblewrap/buildFHSEnv: permit pname+version instead of name 2024-04-24 15:26:52 +02:00
Peder Bergebakken Sundt
bbb1f25bfb buildFHSEnvBubblewrap: do not infer pname from name 2024-04-24 15:26:52 +02:00
github-actions[bot]
3e8920f50b
Merge master into staging-next 2024-04-23 00:02:30 +00:00
Peder Bergebakken Sundt
088cdb337b
Merge pull request #300538 from ShamrockLee/write-shell-application-extra
writeShellApplication: add argument extraShellCheckFlags
2024-04-22 22:45:44 +02:00
github-actions[bot]
5cc1b6ed0f
Merge staging-next into staging 2024-04-22 18:01:30 +00:00
Lily Foster
ddb94deafa prefetch-npm-deps: switch to data-encoding 2024-04-22 23:14:15 +10:00
Lily Foster
c588edaf25 prefetch-npm-deps: remove runtime dependency on nix 2024-04-22 23:14:15 +10:00
Scott Worley
697bba9892 fetchgit: Support fetching signed tags over dumb http transport 2024-04-22 02:16:02 +02:00
github-actions[bot]
98becd63e7
Merge staging-next into staging 2024-04-21 12:01:48 +00:00
binarycat
eaf5ec98fe fetchurl: add codemirror.dlang.org to the list of dub mirrors
code.dlang.org actually went down recently, hopefully this should
make that a bit less likely to happen in the future.
2024-04-21 18:51:45 +10:00
Maximilian Bosch
b6ef9ffdfd
nixos/udev: compress firmware with zstd if possible
Closes #267442

    $ nix path-info -Sh /nix/store/qj1dm7wfw5m3mxf1gn3fdm0az9y1h5ny-linux-firmware-20240312-xz
    /nix/store/qj1dm7wfw5m3mxf1gn3fdm0az9y1h5ny-linux-firmware-20240312-xz	440.3M
    $ nix path-info -Sh /nix/store/c3szcjxb3g990dbiz7llwmkaf0bi98j2-linux-firmware-20240312-zstd
    /nix/store/c3szcjxb3g990dbiz7llwmkaf0bi98j2-linux-firmware-20240312-zstd	460.6M

This is an increase of 4.4%, but OTOH zstd has a significantly higher
decompression speed[1].

[1] https://gregoryszorc.com/blog/2017/03/07/better-compression-with-zstandard/
2024-04-19 16:46:25 +02:00
Maximilian Bosch
378177d269
linux kernel: prefer zstd where possible
Closes #302291
Closes #301536

The following things have changed:

* For 5.7+: ZSWAP compressor uses zstd now.
* For 5.11+: ZRAM compressor uses zstd now.
* For 5.13+: kernel modules are compressed with zstd instead of xz.
* For 5.19+: support zstd-compressed firmware.

The modules-closure functionality needed explicit support for copying
over `.zst` files. Also, the VM image builder used busybox's `insmod`
before which doesn't support zstd. Switched to `kmod` and added xz/zstd
as dependencies for it, similar to how it's done for the actual stage1
in d33e52b253. The use of `kmod` here
doesn't seem to be such a big deal since it's only a build-time
dependency.
2024-04-19 16:45:35 +02:00
github-actions[bot]
183a214e9e
Merge staging-next into staging 2024-04-19 12:01:41 +00:00
sternenseemann
5e8f10fe93 expand-response-params: add description
Since the tool is exposed more prominently now, we should clear up what
it is and note that it is to be considered unstable, i.e. we may change
it if the necessity arises. (In practice it is probably going to be
fairly stable though, as compiler interfaces tend to be quite stable.)

Should we add a version?
2024-04-18 20:49:13 +02:00
sternenseemann
7be562d046 wrapCC, wrapBintools: move expand-response-params bootstrapping out
The cc and bintools wrapper contained ad hoc bootstrapping logic for
expand-response-params (which was callPackage-ed in a let binding). This
lead to the strange situation that the bootstrapping logic related to
expand-response-params is split between the wrapper derivations (where
it is duplicated) and the actual stdenv bootstrapping.

To clean this up, the wrappers simply should take expand-response-params
as an ordinary input: They need an adjacent expand-response-params (i.e.
one that runs on their host platform), but don't care about the how.
Providing this is only problematic during stdenv bootstrapping where we
have to pull it from the previous stage at times.
2024-04-18 20:49:13 +02:00
sternenseemann
b2a568906a wrapCC, wrapBintools: use runtimeShell instead of stdenv shell
We don't need to artificially make sure that we can execute the wrapper
scripts on the build platform by using stdenv's shell (which comes from
buildPackages) since our cross infrastructure will get us the wrapper
from buildPackages. The upside of this change is that cross-compiled
wrappers (e.g. pkgsCross.aarch64-multiplatform.gcc) will actually work
when executed!

For bootstrapping this is also not a problem, since we have a long
build->build platform chain so runtimeShell is just as good as
stdenvNoCC.shell. We do fall back to old ways, though, by explicitly
using the bootstrap-tools shell in stage2, so the adjacent bash is only
used from stage4 onwards. This is unnecessary in principle (I'll try
removing this hack in the future), but ensures this change causes zero
rebuilds.
2024-04-18 20:49:13 +02:00
Yueh-Shun Li
8d861e6118 buildGoModule: place GOFLAGS-related warnings around GOFLAGS specification
Avoid "global" warnings that complicates fixed-point arguments support.
2024-04-18 15:14:43 +00:00
Yueh-Shun Li
6500de413a buildGoModule: warn about flags only when using provided buildPhase
Warn about buildFlags and ldflags only when using buildPhase provided by
buildGoModule.

This allows developers to use buildFlags in custom buildPhase.
2024-04-18 15:05:37 +00:00
John Ericson
0820a71359
Merge pull request #304033 from sternenseemann/wrapper-cleanups
wrapCC, wrapBintools, stdenv: make Nix code a bit more consistent
2024-04-18 10:57:18 -04:00
Sandro Jäckel
6181939cdf
fixup-yarn-lock: split out from prefetch-yarn-deps, cleanup installing
To reduce dependencies (mainly nix-prefetch-git and through that git,
git-lfs) when we just need to fixup a lock file, eg when building electron.
This also tries to avoid needless rebuilds when eg. golang is updated.

Also this cleans up and combined the build/installPhase of both tools to
be a lot simpler.
2024-04-17 11:35:22 -04:00
github-actions[bot]
b1f0a79f07
Merge staging-next into staging 2024-04-18 18:01:29 +00:00
github-actions[bot]
a181110966
Merge staging-next into staging 2024-04-18 00:02:44 +00:00
lassulus
55205ec1a1
Merge pull request #302926 from helsinki-systems/fix/buildrustpackage-structuredattrs
cargoBuildHook: Fix features with __structuredAttrs
2024-04-16 23:10:26 +02:00
sternenseemann
63d21d1325 wrapCC, wrapBintools: remove unnecessary indexing into platform sets
`targetPlatform` and `hostPlatform` are already in scope, so it is
unnecessary to index into `stdenvNoCC`.
2024-04-15 12:54:29 +02:00
sternenseemann
4aa9e4ecc6 wrapCC, wrapBintools: don't alias stdenvNoCC to stdenv
In delicate code like this, it seems unwise to pass something of as
something it isn't for convenience's (?) sake. It causes a slight
possibility for confusion with `buildPackages.stdenv`. However, it
should be possible to eliminate the need for this in a separate change.
2024-04-15 12:54:25 +02:00
sternenseemann
fde3861f21 wrapCC: check darwin-ness for -mcpu/-march based on targetPlatform
`stdenv.is*` defaults to `hostPlatform` which is technically incorrect
here, since what we are gating concerns the target platform only.

This would be a problem in practice if cross compiling from
x86_64-darwin to aarch64-darwin whilst using gcc which is probably
rare enough.
2024-04-15 12:49:29 +02:00
Sandro
ec2cb66cbe
Merge pull request #301928 from nevivurn/feat/gomod-workvendor
buildGoModule: vendorHash fixes for proxyVendor and Go 1.22
2024-04-14 21:57:17 +02:00
Naïm Favier
25f42f0350
Merge pull request #302351 from phijor/agda-separate-bin-output
haskellPackages.Agda: Split outputs to reduce closure size
2024-04-14 09:56:56 +02:00
Yongun Seong
3e28bdc678
buildGoModule: inherit env from main package to goModule derivation 2024-04-14 14:27:44 +09:00
Jacek Galowicz
8d3a38e8b1 NixOS Integration tests: Re-enable for macOS 2024-04-12 13:41:27 +02:00
Paul Meyer
dd540970e2 buildGoModule: announce removal of buildFlags
and `buildFlagsArray`
2024-04-12 10:40:35 +02:00
Olivia Crain
1348195416
tests.importCargoLock: fix self-inclusive src listings in .nix files
Replace `src = ./.` instances with more explicit source listings.
Otherwise, derivations will be rebuilt on any change to the files
defining them (e.g. formatting via nixfmt-rfc-style).
2024-04-10 10:27:12 -05:00
Linus Heckemann
9d50a5b0d8
Merge pull request #264147 from lheckemann/foreign-distros
vmTools: misc debian tool improvements
2024-04-10 13:31:39 +02:00
Janne Heß
6486868c28
cargoBuildHook: Fix features with __structuredAttrs 2024-04-10 09:24:17 +02:00
Atemu
44ec127d3b
Merge pull request #302172 from tpwrules/bubblewrap-no-32
build-fhsenv-bubblewrap: reference 32-bit binaries only if multiArch
2024-04-09 15:18:15 +02:00
Tristan Ross
b1ef46706f
llvmPackages_9: remove due to age 2024-04-08 22:39:53 -07:00
Robert Hensing
c740c98fc1
Merge pull request #292760 from PigeonF/dockertools-build-layered-compressor
dockerTools: Fix changing compression method for `buildLayeredImage`
2024-04-08 09:24:18 +02:00
Thomas Watson
9bcd91ba09 build-fhsenv-bubblewrap: reference 32-bit binaries only if multiArch
Fixes issues using bubblewrap'd fhsenvs in scenarios where i686 is not
supported (such as Rosetta 2 emulation in a Linux VM on Apple Silicon).
2024-04-07 10:44:53 -05:00
Philipp Joram
294245f750 haskellPackages.Agda: Split outputs to reduce closure size
After enabling a separate binary output for the `Agda` Haskell package,
the new `bin` output measures ~100MiB, compared to the ~4.5GiB before.
Using it in `agdaWithPackages` reduces the closure size of an Agda
installation from ~5GiB to ~3GiB.  The remaining space is taken up
mostly by the GHC backend.

With this change, derivations depending on `haskellPackages.Agda`
directly need to pick the right (binary) output.  This concerns in
particular `emacsPackages.agda2-mode`.
2024-04-07 16:36:57 +03:00
Weijia Wang
7b1000581c
Merge pull request #295812 from UlyssesZh/fix-nuget-to-nix-trailing-slash
nuget-to-nix: fix the bug of wrong url in the generated nix file when base url does not have trailing slash
2024-04-05 06:31:00 +02:00
Nick Cao
2f46085c19
pkg-config: set prefixed mainProgram for cross compilation
`lib.getExe pkgsCross.riscv64.buildPackages.pkg-config` should return
`<prefix>/bin/riscv64-unknown-linux-gnu-pkg-config` not `<prefix>/bin/pkg-config`
2024-04-04 14:55:10 -04:00
Aleksana
5e8c5d33c4
Merge pull request #291569 from Luflosi/fix-substituteAll-typo
substituteAll: fix typo in comment
2024-04-04 18:07:15 +08:00
Atemu
b136700c7d
Merge pull request #299618 from TomaSajt/dub-support
Add buildDubPackage and dub-to-nix for building dub based packages
2024-04-04 11:52:57 +02:00
TomaSajt
92c8f64c5e
buildDubPackage, dub-to-nix: init 2024-04-03 12:32:08 +02:00
Sam
f86158cd9a
Revert "swift: don't pass -march to swiftc"
This reverts commit 8a7841ceef.
2024-04-02 21:42:01 -07:00
a-n-n-a-l-e-e
3d06f31552
Merge pull request #301011 from philiptaron/remove-auditBlasHook
auditBlasHook: remove
2024-04-02 14:32:28 -07:00
Philip Taron
83440df1f6
auditBlasHook: remove
This was added in d83e9c9573,
but included substitution variables `@blas@` and `@lapack@` that were
never substituted. It's not used anywhere in `nixpkgs`.
2024-04-02 10:50:15 -07:00
éclairevoyant
858f4db304
buildDotnetModule: fix handling executables with an empty list 2024-04-02 13:08:31 -04:00
github-actions[bot]
ef44d46775
Merge master into staging-next 2024-04-01 18:00:59 +00:00
Connor Baker
11273b60c8
Merge pull request #295594 from ShamrockLee/checkpoint-build-dontfixup
checkpointBuildTools.prepareCheckpointBuild: stop at `installPhase`
2024-04-01 10:45:30 -04:00
Yueh-Shun Li
751e9b6c7f writeShellApplication: add argument extraShellCheckFlags 2024-04-01 03:50:14 +08:00
github-actions[bot]
b4bf622e46
Merge master into staging-next 2024-03-31 12:01:07 +00:00
Naïm Favier
92514e4863
Merge branch 'master' into haskell-updates 2024-03-31 10:23:44 +02:00
github-actions[bot]
48d06167c6
Merge master into staging-next 2024-03-30 12:01:06 +00:00
adisbladis
e2dbb7f85f
Merge pull request #297351 from adisbladis/build-support/lib-static
build-support/lib: Statically compute cmake/meson flags
2024-03-30 19:07:43 +13:00
github-actions[bot]
d48c2529ec
Merge master into haskell-updates 2024-03-29 00:12:42 +00:00
github-actions[bot]
69de1e1beb
Merge master into staging-next 2024-03-28 12:01:21 +00:00
Weijia Wang
cb00e17a14
Merge pull request #299169 from ShamrockLee/go-module-vendorsha256
buildGoModule: Deprecate vendorSha256 with throw
2024-03-28 10:58:18 +01:00
Paul Meyer
63a052eb57 buildGoModule: warn if -trimpath or -mod= is used
in GOFLAGS
2024-03-28 07:57:19 +01:00
github-actions[bot]
8de0afeb83
Merge master into haskell-updates 2024-03-28 00:12:55 +00:00
github-actions[bot]
410019beb5
Merge master into staging-next 2024-03-27 18:01:02 +00:00
Ryan Lahfa
a199cd1dbd
Merge pull request #297496 from abryko/docker-tag-discard-closure
dockerTools: discard closure reference in imageTag
2024-03-27 09:29:53 -07:00
github-actions[bot]
26128332c3
Merge master into staging-next 2024-03-27 06:01:26 +00:00
Will Fancher
6504cbb171
Merge pull request #288212 from r-ryantm/auto-update/makeInitrdNGTool
makeInitrdNGTool: 0.1.0 -> 0.1.0
2024-03-27 00:43:03 -04:00
Yueh-Shun Li
c9da94beff buildGoModule: Deprecate vendorSha256 with throw
Ignore vendorSha256 when vendorHash is specified.

Throw when vendorHash isn't specified:
- "buildGoModule: Expect vendorHash instead of vendorSha256" when
  vendorSha256 is specified.
- "buildGoModule: vendorHash is missing" otherwise.

`goModules.outputHashAlgo` is specified as null when vendorHash is not
empty, "sha256" otherwise.

Co-authored-by: zowoq <59103226+zowoq@users.noreply.github.com>
2024-03-27 11:19:40 +08:00
github-actions[bot]
39a71cf239
Merge master into haskell-updates 2024-03-26 00:12:22 +00:00
annalee
7541ec60b6
Merge remote-tracking branch 'upstream/master' into staging-next 2024-03-25 18:04:41 +00:00
a-n-n-a-l-e-e
3115d3209d
Merge pull request #286360 from hellwolf/fix-fhsenv-bubblewrap-etc-paths
build-fhsenv-bubblewrap: fix fhsenv etc entries
2024-03-25 10:38:07 -07:00
github-actions[bot]
31a14cb69e
Merge master into haskell-updates 2024-03-24 00:14:19 +00:00
github-actions[bot]
f0ed26755a
Merge staging-next into staging 2024-03-24 00:02:41 +00:00
Pol Dellaiera
6522a75f90
Merge pull request #298239 from cdepillabout/layered-img-passthru
dockerTools: add streamed image as passthru to buildLayeredImage
2024-03-23 22:13:18 +01:00
Dennis Gosnell
2e91dc65e4 dockerTools: add streamed image as passthru to buildLayeredImage
This is convenient for debugging the underlying streamed image used by
`dockerTools.buildLayeredImage`.

Here's an example of how you might use this:

```console
$ nix repl ./.
nix-repl> dockerTools.examples.nginx.passthru.stream
«derivation /nix/store/9zczmlp2kraszx4ssmh6fawnlnsa5a4n-stream-nginx-container.drv»
```
2024-03-23 10:33:22 +09:00
github-actions[bot]
39632d3d4c
Merge master into haskell-updates 2024-03-23 00:12:18 +00:00
github-actions[bot]
64852c04d3
Merge staging-next into staging 2024-03-22 18:01:31 +00:00
Maximilian Bosch
b5e22438aa
Merge pull request #297758 from diogotcorreia/fetchnextcloudapp-hash
fetchNextcloudApp: support passing hash to fetchzip
2024-03-22 17:28:37 +00:00