Commit Graph

7587 Commits

Author SHA1 Message Date
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
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
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
github-actions[bot]
6a4e9dff73
Merge master into staging-next 2024-01-24 00:02:25 +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]
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
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
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