Commit graph

6141 commits

Author SHA1 Message Date
Robert Hensing 1991c40759
Merge pull request #194345 from codedownio/binary-cache
Introduce mkBinaryCache function
2023-02-09 15:25:16 +01:00
Justin Bedő f2ab8c706d
Merge pull request #158486 from ShamrockLee/singularity-apptainer
singularity: fix defaultPath and reflect upstream changes
2023-02-08 23:47:32 +00:00
Thiago Kenji Okada 9630f025c6
Merge pull request #215093 from thiagokokada/graalvm-native-compile-fix-libs
graalvm*-ce: wrap native-image to pass -H:CLibraryPath, misc improvements
2023-02-08 16:56:39 +00:00
Yueh-Shun Li 50788d2fb0 apptainer, singularity: fix defaultPath and reflect upstream changes
Upstream changes:
singularity 3.8.7 (the legacy) -> apptainer 1.1.3 (the renamed) / singularity 3.10.4 (Sylabs's fork)

Build process:
*   Share between different sources
*   Fix the sed regexp to make defaultPath patch work
*   allowGoReference is now true
*   Provied input parameter removeCompat (default to false)
    that removes the compatible "*singularity*" symbolic links
    and related autocompletion files when projectName != "singularity"
*   Change localstatedir to /var/lib
*   Format with nixpkgs-fmt
*   Fix the defaultPath patching
    and use it instead of the `<executable> path` config directive
    deprecated in Apptainer
*   Provide dependencies for new functionalities such as
    squashfuse (unprivileged squashfs mount)
*   Provide an attribute `defaultPathInputs` to override
    prefix of container runtime default PATH

NixOS module programs.singularity:
*   Allow users to specify packages
*   Place related directories to /var/lib
*   Format with nixpkgs-fmt

singularity-tools:
*   Allow users to specify packages
*   Place related directories to /var/lib when building images in VM
2023-02-08 18:03:11 +08:00
Yueh-Shun Li b33d6407cc singularity-tool: format expression 2023-02-08 17:42:03 +08:00
Tom McLaughlin d1a2a16a3a Introduce mkBinaryCache function 2023-02-07 16:16:07 -08:00
Thiago Kenji Okada afb99ad5d4 graalvm*-ce: wrap native-image to pass -H:CLibraryPath, misc improvements
Fixes issue #214922 by not adding C libraries to the default library
path of GraalVM. This should reduce the closure size of native compiled
binaries in nixpkgs again, e.g.:

Before:
```
$ ldd ./result/bin/bb
	linux-vdso.so.1 (0x00007fff2669b000)
	libstdc++.so.6 => /nix/store/qbgfsaviwqi2p6jr7an1g2754sv3xqhn-gcc-11.3.0-lib/lib/libstdc++.so.6 (0x00007f77fc0cf000)
	libm.so.6 => /nix/store/l7vp7c9z03dspbmss3gq5wdwx5c6ifcq-graalvm11-ce-22.3.0/lib/svm/clibraries/linux-amd64/libm.so.6 (0x00007f77fbfef000)
	libpthread.so.0 => /nix/store/l7vp7c9z03dspbmss3gq5wdwx5c6ifcq-graalvm11-ce-22.3.0/lib/svm/clibraries/linux-amd64/libpthread.so.0 (0x00007f77fbfea000)
	libdl.so.2 => /nix/store/l7vp7c9z03dspbmss3gq5wdwx5c6ifcq-graalvm11-ce-22.3.0/lib/svm/clibraries/linux-amd64/libdl.so.2 (0x00007f77fbfe5000)
	librt.so.1 => /nix/store/l7vp7c9z03dspbmss3gq5wdwx5c6ifcq-graalvm11-ce-22.3.0/lib/svm/clibraries/linux-amd64/librt.so.1 (0x00007f77fbfde000)
	libc.so.6 => /nix/store/l7vp7c9z03dspbmss3gq5wdwx5c6ifcq-graalvm11-ce-22.3.0/lib/svm/clibraries/linux-amd64/libc.so.6 (0x00007f77fbdd5000)
	/nix/store/c35hf8g5b9vksadym9dbjrd6p2y11m8h-glibc-2.35-224/lib/ld-linux-x86-64.so.2 => /nix/store/9xfad3b5z4y00mzmk2wnn4900q0qmxns-glibc-2.35-224/lib64/ld-linux-x86-64.so.2 (0x00007f77fc2e7000)
	libgcc_s.so.1 => /nix/store/qbgfsaviwqi2p6jr7an1g2754sv3xqhn-gcc-11.3.0-lib/lib/libgcc_s.so.1 (0x00007f77fbdbb000)
```

After:
```
$ ldd ./result/bin/bb
	linux-vdso.so.1 (0x00007fffdfd4e000)
	libstdc++.so.6 => /nix/store/qbgfsaviwqi2p6jr7an1g2754sv3xqhn-gcc-11.3.0-lib/lib/libstdc++.so.6 (0x00007fc3a5658000)
	libm.so.6 => /nix/store/c35hf8g5b9vksadym9dbjrd6p2y11m8h-glibc-2.35-224/lib/libm.so.6 (0x00007fc3a5578000)
	libpthread.so.0 => /nix/store/c35hf8g5b9vksadym9dbjrd6p2y11m8h-glibc-2.35-224/lib/libpthread.so.0 (0x00007fc3a5573000)
	libdl.so.2 => /nix/store/c35hf8g5b9vksadym9dbjrd6p2y11m8h-glibc-2.35-224/lib/libdl.so.2 (0x00007fc3a556e000)
	librt.so.1 => /nix/store/c35hf8g5b9vksadym9dbjrd6p2y11m8h-glibc-2.35-224/lib/librt.so.1 (0x00007fc3a5569000)
	libc.so.6 => /nix/store/c35hf8g5b9vksadym9dbjrd6p2y11m8h-glibc-2.35-224/lib/libc.so.6 (0x00007fc3a535e000)
	/nix/store/c35hf8g5b9vksadym9dbjrd6p2y11m8h-glibc-2.35-224/lib/ld-linux-x86-64.so.2 => /nix/store/9xfad3b5z4y00mzmk2wnn4900q0qmxns-glibc-2.35-224/lib64/ld-linux-x86-64.so.2 (0x00007fc3a5870000)
	libgcc_s.so.1 => /nix/store/qbgfsaviwqi2p6jr7an1g2754sv3xqhn-gcc-11.3.0-lib/lib/libgcc_s.so.1 (0x00007fc3a5344000)
```

Also improves the installCheckPhase to include more tests and improve
the old onest .
2023-02-07 17:00:13 +00:00
Winter e2b092fc52 Revert "rustPlatform.bindgenHook: use the same clang/libclang as rustc"
This reverts commit 46ee37ca1d, as it breaks
anything that uses libcxx on Darwin, as well as cross-compilation to at
least armv6l.

As there's no clear solution at this time, reverting it is the best
option, as this only reduces build time closure size (something we can
arguably live with).

https://github.com/NixOS/nixpkgs/pull/207352#issuecomment-1418363441
https://github.com/NixOS/nixpkgs/pull/207352#issuecomment-1420124250
2023-02-07 00:04:19 -05:00
figsoda 42d1d60a92
Merge pull request #206773 from SuperSandro2000/cleanup-unused-bindings
treewide: cleanup some unused bindings
2023-02-06 20:07:50 -05:00
Sandro Jäckel 50e0012f9d
treewide: cleanup some unused bindings 2023-02-07 01:36:15 +01:00
zowoq 3feeedb5e2 buildGoModule: make the vendor fetcher error if it is empty 2023-02-07 06:23:39 +10:00
John Ericson 6d0b3086f7
Merge pull request #214304 from obsidiansystems/pkg-config-meta
meta.pkgConfigModules: Init convention
2023-02-06 11:44:29 -05:00
milahu d1bb936cf7
symlinkJoin: print warning when keeping existing file 2023-02-05 09:58:20 +01:00
Robert Schütz f402501c2c
Merge pull request #213485 from dotlambda/opentsdb-2.4.1
opentsdb: 2.4.0 -> 2.4.1
2023-02-04 19:09:01 -08:00
John Ericson 6e4a1b18d9 meta.pkgConfigModules: Init convention
See docs.

Follow-up work:

- Existing packages should be converted

- `defaultPkgConfigPackages` should assert on `meta.pkgConfigModules`
  and let `tests.pkg-config` alone test the build results.

CC @sternenseemann

Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2023-02-03 09:37:31 -05:00
Ulrik Strid f12b9ea461 buildDunePackage: default to strictDeps = true 2023-02-03 08:59:34 +01:00
Ulrik Strid c53a63adf1 ocamlPackages treewide: strictDeps all packages 2023-02-03 08:59:34 +01:00
Robert Schütz 0bc28dafcd fetchMavenArtifact: add classifier to filename 2023-02-02 19:23:58 -08:00
Johannes Kirschbauer a2780dc543
Docs/fix: make doc-strings nixdoc compliant (#213570)
* re-format all doc-strings to make them nixdoc compliant

* reformat comments to make them markdown-renderable
2023-02-02 11:20:02 +01:00
superherointj bc1b9307e7
Merge pull request #212303 from amjoseph-nixpkgs/pr/build-rust-crate/ilp32
build-rust-crate: handle ILP32 platforms correctly
2023-01-31 23:48:22 -03:00
Artturi 7b0e7c6988
Merge pull request #213768 from Artturin/unamemisingspace 2023-01-31 16:02:27 +02:00
Artturin c4597fef1d deterministic-uname: add missing whitespace 2023-01-31 14:55:11 +02:00
github-actions[bot] 1a06f52c21
Merge master into staging-next 2023-01-30 12:01:22 +00:00
Robert Hensing b6bec17eb9 testers.hasPkgConfigModule: Extract and add tests, docs 2023-01-30 00:35:34 +01:00
Sergei Trofimovich 4763533cca build-support/cc-wrapper: add libstdc++fs into default library path for clang
After https://github.com/NixOS/nixpkgs/pull/210004 `usbmuxd2` started
failing to build as:

    usbmuxd2-unstable> .../ld: cannot find -lstdc++fs: No such file or directory
    usbmuxd2-unstable> clang-11: error: linker command failed with exit code 1 (use -v to see invocation)

This started happening because #210004 exposed a long-standing bug in
`gcc` derivation: `cc.lib` is missing `libstdc++fs` library:

    $ find $(nix-build --no-link -A stdenv.cc.cc.lib) | fgrep libstdc | unnix

    /<<NIX>>/gcc-11.3.0-lib/lib/libstdc++fs.la

    /<<NIX>>/gcc-11.3.0-lib/lib/libstdc++.la
    /<<NIX>>/gcc-11.3.0-lib/lib/libstdc++.so.6.0.29
    /<<NIX>>/gcc-11.3.0-lib/lib/libstdc++.so
    /<<NIX>>/gcc-11.3.0-lib/lib/libstdc++.so.6

It was not moved from `cc.out` output:

    $ find $(nix-build --no-link -A stdenv.cc.cc) | fgrep libstdc | unnix
    /<<NIX>>/gcc-11.3.0/lib/libstdc++.a
    /<<NIX>>/gcc-11.3.0/lib/libstdc++fs.a

This change adds `cc` library lookup path back to `staging-next` until
`gcc` is fixed.`
2023-01-28 07:30:33 +00:00
github-actions[bot] 92b7725154
Merge master into staging-next 2023-01-27 12:01:22 +00:00
Sandro Jäckel 5ce647b8bf
buildGoModule: forward prePatch, postPatch and postBuild to vendoring
to be more prediactable
2023-01-26 17:08:55 +01:00
github-actions[bot] 20df8d00cc
Merge master into staging-next 2023-01-25 12:01:34 +00:00
Nick Cao 0ea2d480e4
postgresqlTestHook: run postgresqlTestSetupPost hook after setting up 2023-01-25 18:46:27 +08:00
github-actions[bot] c47e4b69a3
Merge master into staging-next 2023-01-25 00:02:20 +00:00
Alyssa Ross 2ae30c9f45 llvmPackages: use libcxxrt on FreeBSD
FreeBSD doesn't use LLVM's cxxabi implementation, for backwards
compatibility reasons.  Software expects the libcxxrt API when
building on FreeBSD.  This fixes the build of
pkgsCross.x86_64-freebsd.boost.
2023-01-24 21:18:39 +00:00
Vladimír Čunát 411405c9f6
Merge branch 'master' into staging-next
Trivial conflict in release notes, except that the xml/docbook parts
are horrible for (semi-)automatic conflict resolution.
Fortunately that's generated anyway.
2023-01-24 12:22:38 +01:00
Uri Baghin 619ba04b87 buildBazelPackage: make bazel explicit 2023-01-24 19:30:20 +11:00
Adam Joseph eb98fefe24 build-rust-crate: handle ILP32 platforms correctly
This commit corrects the value of `CARGO_CFG_TARGET_POINTER_WIDTH`
for ILP32 machines like the Apple Watch and mips64n32.
2023-01-23 12:10:58 -08:00
Guillaume Girol 4ce9749f74 Merge remote-tracking branch 'origin/staging' into staging-nativeCheckInputs 2023-01-21 17:18:51 +01:00
github-actions[bot] f04194698a
Merge staging-next into staging 2023-01-21 12:02:00 +00:00
Guillaume Girol 33afbf39f6 treewide: switch to nativeCheckInputs
checkInputs used to be added to nativeBuildInputs. Now we have
nativeCheckInputs to do that instead. Doing this treewide change allows
to keep hashes identical to before the introduction of
nativeCheckInputs.
2023-01-21 12:00:00 +00:00
Guillaume Girol 25193e2732 postgresqlTestHook: adapt comment to nativeCheckInputs 2023-01-21 16:42:10 +01:00
Guillaume Girol 90c78aee6c Merge branch 'nativeCheckInputs' into staging-nativeCheckInputs 2023-01-21 12:00:00 +00:00
figsoda 3290828905 fetchPypi: move to top level
fetchPypi doesn't use python under the hood and doesn't need to be tied
to a specific version of python. Moving it to top level makes it more
consistent with other fetchers and makes code generation easier.
2023-01-21 08:21:33 +01:00
Sergei Trofimovich b9b1d958d0 Merge remote-tracking branch 'origin/staging-next' into staging
Conflicts:
	pkgs/development/libraries/qt-6/modules/qtbase.nix
	pkgs/stdenv/linux/make-bootstrap-tools.nix
2023-01-20 21:56:57 +00:00
Alyssa Ross f5e63a0e9e bintools: add isGNU and isLLVM attributes 2023-01-20 18:35:25 +01:00
Yureka 7a05f9de7d
gccgo: wrap go binary (#207670) 2023-01-20 14:31:54 +01:00
Robert Hensing a1cd06f900
Merge pull request #211082 from hercules-ci/fix-issue-16182
Fix issue 16182  `Error: _assignFirst found no valid variant!`
2023-01-19 19:22:04 +01:00
Alyssa Ross 1fc2a79ee1 makeSetupHook: make "name" argument mandatory
It's very frustrating to try to read through a derivation graph full
of derivations that are all just called "hook", so let's try to avoid
that.
2023-01-19 15:00:36 +00:00
Alyssa Ross 0ae87d514f treewide: add names to all setup hooks 2023-01-19 15:00:36 +00:00
Artturi 3653f4ece2
Merge pull request #211260 from Artturin/testtweaks1 2023-01-19 13:12:18 +02:00
Yureka 8647006492
rustPlatform.importCargoLock: pass allRefs to builtins.fetchGit (#211298) 2023-01-18 01:57:36 +01:00
Robert Hensing c696a19bfa multiple-outputs.sh: Apply suggestions from code review
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2023-01-17 21:18:59 +01:00
Artturin 3f3ca2d90d tests.testers.testBuildFailure.helloDoesNotFail: fix confusing output
the output made me think that the test failed but did not fail

testBuildFailure-helloDoesNotFail> Checking /nix/store/x6403x1llpk00i59cmr96iy92mx1f7hb-hello-2.12.1/testBuildFailure.log
testBuildFailure-helloDoesNotFail> testBuildFailure: The builder did not fail, but a failure was expected!
2023-01-17 20:49:24 +02:00