about summary refs log tree commit diff
path: root/pkgs/stdenv
AgeCommit message (Collapse)AuthorFilesLines
2023-02-22treewide: move NIX_CFLAGS_COMPILE to the env attrsetArtturin1-4/+4
with structuredAttrs lists will be bash arrays which cannot be exported which will be a issue with some patches and some wrappers like cc-wrapper this makes it clearer that NIX_CFLAGS_COMPILE must be a string as lists in env cause a eval failure
2023-02-14treewide: use lib.optionalsFelix Buehler2-4/+4
2023-02-13treewide: use optionalStringFelix Buehler2-3/+3
2023-02-13Merge master into staging-nextgithub-actions[bot]1-0/+6
2023-02-07make-derivation.nix: Support inputDerivation on disallowedReferencesRobert Hensing1-0/+6
2023-02-07Merge master into staging-nextgithub-actions[bot]1-1/+0
2023-02-06Merge pull request #206773 from SuperSandro2000/cleanup-unused-bindingsfigsoda1-1/+0
treewide: cleanup some unused bindings
2023-02-07treewide: cleanup some unused bindingsSandro Jäckel1-1/+0
2023-02-06Merge master into staging-nextgithub-actions[bot]1-0/+1
2023-02-06Merge pull request #214304 from obsidiansystems/pkg-config-metaJohn Ericson1-0/+1
meta.pkgConfigModules: Init convention
2023-02-05Merge master into staging-nextgithub-actions[bot]1-3/+1
2023-02-04Merge pull request #213633 from alyssais/mkDerivation-meson-exoticsuperherointj1-3/+1
stdenv.mkDerivation: fix meson for some archs
2023-02-03meta.pkgConfigModules: Init conventionJohn Ericson1-0/+1
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-01-31Merge pull request #211783 from R-VdP/fix_disallowed_referencesArtturi1-0/+41
stdenv: don't include drvs in disallowedRefs as build-time deps.
2023-01-31Merge staging-next into staginggithub-actions[bot]1-1/+1
2023-01-31Merge master into staging-nextgithub-actions[bot]1-1/+1
2023-01-30stdenv.mkDerivation: fix meson for some archsAlyssa Ross1-3/+1
platform.uname.processor seems to be what we want in many more cases than what we were using before — it does the right thing for aarch64, x86_64, riscv32, riscv64, mips, mips64, powerpc, and powerpc64 (the latter three of which were broken before). This fixes cross-compilation of systemd for PowerPC/POWER platforms.
2023-01-30stdenv: don't include drvs in disallowedRefs as build-time deps.R-VdP1-0/+41
Derivations listed as disallowedReferences or disallowedRequisites, currently end up as build-time dependencies. This is problematic since the disallowed derivations will be built by nix as build-time dependencies, while those derivations might take a very long time to build, or might not even build successfully on the platform used. However, in order to scan for disallowed references in the final output, knowing the out path is sufficient, and the out path can be calculated from the derivation without needing to build it, saving time and resources. While the problem is less severe for allowedReferences and allowedRequisites, since we want the derivation to be built eventually, we would still like to get the error early and without having to wait while nix builds a derivation that might not be used (e.g. if we listed the wrong one).
2023-01-29Merge pull request #211910 from tejing1/srcs-name-collisionSergei Trofimovich1-1/+10
stdenv: Improve error from `stdenv` when `srcs` is used with colliding directories
2023-01-29Merge pull request #211126 from trofi/binutils-updateSergei Trofimovich1-0/+1
binutils: 2.39 -> 2.40
2023-01-29improve error when srcs is used with directories with the same post-hash nameJeff Huffman1-1/+10
2023-01-27binutils: 2.39 -> 2.40Sergei Trofimovich1-0/+1
A few potentially disruptive changes: - binutils does not embed ${binutils-unwrapped}/lib as a default library search path anymore. This will cause link failures for -lbfd -lopcodes users that did not declare their dependency on those libraries. They will need to add `libbfd` and `libopcodes` attributes to build inputs. - `libbfd` and `libopcodes` attributes now just reference `binutils-unwrapped.{dev,lib}` pair of attributes without patching `binutils` build system. We don't patch build system anymore and use multiple outputs out of existing `binutils` build. That makes the result more maintainable: no need to handle ever growing list of dependencied of `libbfd`. This time new addition was `libsframe`. To accomodate `out` / `lib` output split I had to remove `lib` -> `bin` backreference by removing legacy lookup path for plugins. I also did not enable `zstd` just yet as `nixpkgs` version of `zstd` package pulls in `cmake` into bootstrap sequence. Changes: https://lists.gnu.org/archive/html/info-gnu/2023-01/msg00003.html
2023-01-27Revert "lib/meta.nix: platformMatch: allow predicate functions"Adam Joseph1-1/+1
This reverts commit b7d097438b9b0f782a707f3295d320d824810864.
2023-01-25Merge master into staging-nextgithub-actions[bot]1-0/+4
2023-01-24llvmPackages: use libcxxrt on FreeBSDAlyssa Ross1-0/+4
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-22Merge master into staging-nextgithub-actions[bot]1-1/+1
2023-01-22lib/meta.nix: platformMatch: allow predicate functionsAdam Joseph1-1/+1
2023-01-21Merge remote-tracking branch 'origin/staging' into staging-nativeCheckInputsGuillaume Girol2-2/+2
2023-01-21make-bootstrap-tools.nix: fix for wrapped gzipArtturin2-2/+2
2023-01-21mkDerivation: introduce native checkInputs and nativeCheckInputsGuillaume Girol1-24/+31
When strictDeps is set, only nativeCheckInputs are added to PATH and only checkInputs can be linked against. See https://github.com/NixOS/nixpkgs/issues/161570
2023-01-21Merge branch 'nativeCheckInputs' into staging-nativeCheckInputsGuillaume Girol2-25/+32
2023-01-20Merge remote-tracking branch 'origin/staging-next' into stagingSergei Trofimovich1-1/+1
Conflicts: pkgs/development/libraries/qt-6/modules/qtbase.nix pkgs/stdenv/linux/make-bootstrap-tools.nix
2023-01-19treewide: add names to all setup hooksAlyssa Ross1-0/+1
2023-01-18stdenv: don't clobber useArray and type in {prepend,append}ToVarAndrew Childs1-2/+2
Some other packages, for example ruby gems via buildRubyGem, use a variable called "type" internally, which is overwritten here and causes failures like: failure: $gempkg path unspecified Fix for changes in 11c3127e38dafdf95ca71a85b1591a29b67e0c09.
2023-01-16stdenv: disable shellcheck rule SC2068 & SC1091Artturin1-1/+1
this is intentional to support both structuredAttrs and non In pkgs/stdenv/generic/setup.sh line 614: for pkg in ${depsBuildBuild[@]} ${depsBuildBuildPropagated[@]}; do ^------------------^ SC2068 (error): Double quote array expansions to avoid re-splitting elements. In pkgs/stdenv/generic/setup.sh line 521: local varRef="$varVar[$((targetOffset - hostOffset))]" ^-- SC1087 (error): Use braces when expanding arrays, e.g. ${array[idx]} (or ${var}[.. to quiet).
2023-01-16stdenv: fix SC2242Artturin1-2/+2
exit -1 == exit 255 but we don't have a reason to use 255 In pkgs/stdenv/generic/setup.sh line 518: (( hostOffset <= targetOffset )) || exit -1 ^-- SC2242 (error): Can only exit with status 0-255. Other data should be wri tten to stdout/stderr.
2023-01-16make-bootstrap-tools.nix: don't pull in pkgs.glibc in test (#210038)sternenseemann1-1/+1
`builtins.baseNameOf` retains any string context, causing the test derivation to incorrectly depend on `pkgs.glibc`. All we really want is to know what the dynamicLinker is called, but we don't need it to be present in store. Thanks to Adam Joseph for spotting this.
2023-01-16stdenv: disable shellcheck rule SC2048Artturin1-1/+1
we use [*] to support structuredAttrs and non In pkgs/stdenv/generic/setup.sh line 1542: for curPhase in ${phases[*]}; do ^----------^ SC2048 (warning): Use "${array[@]}" (with quotes) to prevent whitespace problems.
2023-01-16stdenv: disable shellcheck rulesArtturin1-2/+1
In pkgs/stdenv/generic/setup.sh line 101: source "$hookName" ^---------^ SC1090 (warning): ShellCheck can't follow non-constant source. Use a directive to specify location. In pkgs/stdenv/generic/setup.sh line 166: mkdir -p "$out/nix-support" ^--^ SC2154 (warning): out is referenced but not assigned. In pkgs/stdenv/generic/setup.sh line 407: PATH= ^--^ SC2123 (warning): PATH is the shell search path. Use another name. In pkgs/stdenv/generic/setup.sh line 452: declare -a pkgBuildAccumVars=(pkgsBuildBuild pkgsBuildHost pkgsBuildTarget) ^---------------^ SC2034 (warning): pkgBuildAccumVars appears unused. Verify use (or export if used e xternally). because pkgBuildAccumVars is used In pkgs/stdenv/generic/setup.sh line 235: nameref="$* ${nameref-}" ^-----^ SC2178 (warning): Variable was used as an array but is now assigned a string. because we theres a useArray conditional
2023-01-16stdenv: fix SC2004 & SC2086Artturin1-6/+6
SC2004 (style): $/${} is unnecessary on arithmetic variables. SC2086 (info): Double quote to prevent globbing and word splitting.
2023-01-16stdenv: fix SC2223Artturin1-10/+10
In pkgs/stdenv/generic/setup.sh line 36: : ${outputs:=out} ^-------------^ SC2223 (info): This default assignment may cause DoS due to globbing. Quote it.
2023-01-15stdenv: drop remove unnecessary env varArtturin1-20/+11
and the associated obsolete functions support for log nesting was removed in 2017 https://github.com/nixos/nixpkgs/commit/6669a3b47711dc967df0ea8ff93fa9857aad015d
2023-01-15Merge pull request #210752 from trofi/make-bootstrap-tools-libstdcxx-rpathSergei Trofimovich1-8/+9
make-bootstrap-tools: fix test to include libstdc++ -rpath
2023-01-15Merge pull request #209371 from Artturin/gzipreproArtturi1-0/+4
gzip: make reproducible when GZIP_NO_TIMESTAMPS is set
2023-01-14Merge pull request #210109 from ↵Artturi1-2/+2
amjoseph-nixpkgs/pr/stdenv/build-gettext-only-once
2023-01-14make-bootstrap-tools: fix test to include libstdc++ -rpathSergei Trofimovich1-8/+9
After https://github.com/NixOS/nixpkgs/pull/209054 we started moving libstdc++.so out of default glibc's paths. This exposed bootstrap tools build failure as: $ nix build --no-link -f ./pkgs/stdenv/linux/make-bootstrap-tools.nix ... > .../bin/bar: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory Note that bootstrap itself did not break. The change only expands handcrafted `-rpath` entries.
2023-01-14stdenv: mark binutils-patchelfed (#209600)Adam Joseph1-1/+2
The stdenv bootstrap creates several wrappers around binutils, and gives them the exact same drvName as the binutils package itself. These wrappers cost almost nothing to create (they are just file copies and patchelf runs, not builds), so we should distinguish them from expensive binutils builds with a unique pname. This commit does that.
2023-01-12Merge pull request #209054 from trofi/stdcxx-out-of-bootstrap-libSergei Trofimovich1-2/+11
linux/bootstrap-tools: move libstdc++ out of default library search path
2023-01-12gzip: make reproducible when GZIP_NO_TIMESTAMPS is setArtturin1-0/+4
the logic can be tested with ``` $ GZIP_NO_TIMESTAMPS=1 && echo "${GZIP_NO_TIMESTAMPS:+-n }" -n $ unset GZIP_NO_TIMESTAMPS && echo "${GZIP_NO_TIMESTAMPS:+-n }" ```
2023-01-11Merge staging-next into staginggithub-actions[bot]1-4/+3