about summary refs log tree commit diff
path: root/pkgs/stdenv
AgeCommit message (Collapse)AuthorFilesLines
2024-04-15stdenv: make inputDerivation never fixed-outputJade Lovelace1-1/+7
This fixes using inputDerivation on derivations that are fixed-output. Previously: ``` nix-repl> drv = runCommand "huh" { outputHash = "sha256-47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU="; outputHashAlgo = "sha256"; outputHashType = "flat"; } "touch $out" nix-repl> drv.inputDerivation «derivation /nix/store/d8mjs6cmmvsr1fv7psm6imis5pmh9bcs-huh.drv» nix-repl> :b drv.inputDerivation error: fixed output derivation 'huh' is not allowed to refer to other store paths. You may need to use the 'unsafeDiscardReferences' derivation attribute, see the manual for more details. ``` Fixes: https://github.com/NixOS/nixpkgs/issues/304209
2024-04-10stdenv/check-meta: Fix error message for disallowed unfree packagesDan Callahan1-1/+1
Nixpkgs tries to print a helpful message when it blocks unfree packages, but the suggestion is subtly broken. The predicate only matches on the package's name, but the suggestion includes the full name-version pair. Fixed by formatting the message with the same function as the predicate. This issue arises because check-meta defines its own local getName with semantics divergent from lib.getName. The former includes the version, the latter does not. Example Before: Alternatively you can configure a predicate to allow specific packages: { nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ "obsidian-1.5.12" ]; } Example After: Alternatively you can configure a predicate to allow specific packages: { nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ "obsidian" ]; } Fixes #303116
2024-04-07Merge pull request #297353 from adisbladis/check-meta-validity-onlyadisbladis1-16/+21
stdenv/check-meta: Make `checkValidity` only check validity
2024-04-04pkgs/top-level/release.nix: drop unused `dist` targetsSergei Trofimovich2-22/+0
The PR https://github.com/NixOS/nixpkgs/pull/284090 exposed `build` target directly on hydra. We are using it now in https://github.com/NixOS/nixpkgs/tree/master/maintainers/scripts/bootstrap-files to generate bootstrap tarballs on `linux` and `darwin`. `dist` was not very useful as it was a bit hard to link back to hydra jobs that build it. Let's just drop it.
2024-04-03stdenv/check-meta: Make `checkValidity` only check validityadisbladis1-16/+21
checkValidity has the responsibility to check if a derivation's attributes are valid. Previously it also had the overloaded task of creating a subset of meta attributes: - unfree - broken - unsupported - insecure Not only is this overloading strange, these attributes were only ever consumed by `commonMeta`. This change makes checkValidity _only_ check for validity, and removes the creation of any meta attributes from `checkValidity` and moves them to `commonMeta`. This is technically a breaking change but I don't expect any external nixpkgs consumers to rely on these implementation details.
2024-04-01freshBootstrapTools.{build,test}: group tools togetherannalee1-39/+32
2024-04-01freshBootstrapTools.{build,test}: allow exes with libs unpackannalee1-33/+17
2024-04-01freshBootstrapTools.{build,test}: fix as script. test all executablesannalee1-12/+22
as is a wrapper around clang and the path to bash and clang need to be updated when unpacked run all executables in bin get run in the test
2024-03-30Merge master into staging-nextgithub-actions[bot]1-26/+1
2024-03-30Revert "stdenv: add meta.repository field"K9001-27/+1
This reverts commit 7e1443abbba99e9dac29ce2ad01c1c4e4fb66070.
2024-03-30Revert "stdenv/check-meta: Don't create new environments when computing ↵K9001-15/+16
meta.repository" This reverts commit f8b091d53fdb339a9489551e21ceb4bad84c79e9.
2024-03-30Merge master into staging-nextgithub-actions[bot]1-26/+37
2024-03-30stdenv/check-meta: don't infrec on unsupported platformsK9001-3/+3
2024-03-30Merge pull request #300177 from adisbladis/meta-repository-perf-fixupsadisbladis1-20/+27
stdenv/check-meta: Fix performance regressions introduced in #294347
2024-03-30stdenv/check-meta: Inherit remaining lib access into scopeadisbladis1-4/+12
Hopefully this will result in people not adding new `lib.xxx` to check-meta.nix.
2024-03-30stdenv/check-meta: Don't create new environments when computing meta.repositoryadisbladis1-16/+15
2024-03-30Merge pull request #297350 from adisbladis/commonmeta-output-listadisbladis1-4/+8
stdenv/check-meta: Remove outputsToInstall list concat from common meta
2024-03-30Merge master into staging-nextgithub-actions[bot]1-1/+27
2024-03-29Merge pull request #294347 from lolbinarycat/meta.repositorya-n-n-a-l-e-e1-1/+27
stdenv: add meta.repository field
2024-03-29stdenv: add meta.repository fieldbinarycat1-1/+27
2024-03-21Merge pull request #296750 from reckenrode/darwin-nocurlRandy Eckenrode1-33/+33
darwin.stdenv: drop curl from the bootstrap
2024-03-21Merge pull request #297711 from hercules-ci/rename-adapters-finalAttrsRobert Hensing1-3/+3
pkgs/stdenv/adapters.nix: Rename internal name
2024-03-21pkgs/stdenv/adapters.nix: Rename internal nameRobert Hensing1-3/+3
`finalAttrs` is never the first argument. This should have been called `prevAttrs` all along. It confused me for a bit, because the callback _must not_ be strict in `finalAttrs` (the first of _two_ parameters), or it will recurse infinitely while trying to figure out what the attrNames are.
2024-03-20Merge master into staging-nextgithub-actions[bot]1-5/+9
2024-03-20stdenvAdapters.useLibsFrom: use targetStdenv.cc.overrideConnor Baker1-5/+9
As @SomeoneSerge pointed out in https://github.com/NixOS/nixpkgs/pull/281371#discussion_r1531174155, by avoiding `wrapCCWith` and using `targetStdenv.cc.override`, we avoid roundtrip wrapping and are able to use `coreutils` from `targetStdenv`.
2024-03-20stdenv/check-meta: Remove outputsToInstall list concat from common metaadisbladis1-4/+8
Normally either of "bin" or "out" will hit first so we can avoid dynamic looping altogether.
2024-03-19stdenv.darwin.make-boostrap-tools: include unpack script in the archiveannalee2-39/+51
2024-03-19stdenv.darwin.make-boostrap-tools: update tools and unpin LLVM11annalee2-108/+148
- unpin LLVM11. fix discrepancy with freshBootstrapTools and the tools built on hydra. pinning the stdenv for the hydra build doesn't pin the tools as the included packages are able to change. - remove unused LLVM tools & libs which reduces the uncompressed and compressed file sizes by more than 1/2. compressed tarball is now 40M and uncompressed is around 200M - add @loader_path/. to dylibs that reference other libs in the archive. this is needed for libraries with re-exports. - validate shared objects with @rpath references contain the reference in lib - add a test to verify that the @loader_path/ works for libc++ as it re-exports libc++abi
2024-03-19stdenv.darwin.make-boostrap-tools: refactor to use getBin, getDev and getLibannalee1-58/+65
2024-03-19freshBootstrapTools: LLVM11 unpinannalee1-17/+1
2024-03-18Merge master into staging-nextgithub-actions[bot]1-2/+2
2024-03-17darwin.stdenv: drop curl from the bootstrapRandy Eckenrode1-33/+33
The Darwin bootstrap currently requires curl, but it is not strictly required. The bootstrap requires it for two things: * Fetchers; and * As a transitive dependency of llvm-manpages (via Sphinx). For the fetchers, the bootstrap curl can be used. For hatch-vcs, the dependency, its tests can be disabled. Doing this allows curl to be dropped from the Darwin stdenv bootstrap.
2024-03-17make-derivation.nix: Fix checkMetaRecursivelyRobert Hensing1-2/+2
Oddly, I can't reproduce the error, but this change will make it more robust. See https://github.com/NixOS/nixpkgs/pull/295378#issuecomment-2002094487
2024-03-14Merge master into staging-nextgithub-actions[bot]3-147/+171
2024-03-12make-derivation.nix: Float out unsafeDerivationToUntrackedOutpathRobert Hensing1-7/+7
2024-03-12make-derivation.nix: Update inline docsRobert Hensing1-2/+10
2024-03-12make-derivation.nix: Float out new constant removedOrReplacedAttrNamesRobert Hensing1-7/+10
2024-03-12make-derivation.nix: Float out knownHardeningFlagsRobert Hensing1-13/+14
2024-03-12make-derivation.nix: Float inward darwin-specific derivation attributesRobert Hensing1-22/+23
2024-03-12make-derivation.nix: Evaluate flipRobert Hensing1-5/+7
2024-03-12make-derivation.nix: Apply map composition lawRobert Hensing1-15/+15
... after inlining chooseDevOutputs.
2024-03-12make-derivation.nix: Drop duplicate functionality from previous commitRobert Hensing1-85/+2
These two commits make for a cleaner commit history and git blame than https://github.com/NixOS/nixpkgs/pull/295105, where this refactor was developed. See its commit messages for details and design choices, esp. up to and including 37f76fd4c3b23b324ab7ea06ef3b747338d2080f.
2024-03-12make-derivation.nix: Split makeDerivationArgument, mkDerivation with ↵Robert Hensing1-1/+88
duplicate functionality
2024-03-11Merge staging-next into staginggithub-actions[bot]2-0/+22
2024-03-11make-derivation.nix: Return mkDerivation as an attributeRobert Hensing3-3/+5
2024-03-11make-derivation.nix: Move into let bindingRobert Hensing1-4/+7
2024-03-11llvmPackages_{12,13,14,15,16,17,git}.{libcxx,libcxxabi}: merge libcxxabi ↵a-n-n-a-l-e-e4-63/+29
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-10pkgs/stdenv/linux: init powerpc64-unknown-linux-gnuabielfv2 bootstrap-filesOPNA26082-0/+22
sha256sum of files to be uploaded: $ sha256sum /nix/store/8frm8kk8gzpv31r289ai5jgkwfikmpm4-stdenv-bootstrap-tools-powerpc64-unknown-linux-gnuabielfv2/on-server/* 0af311476b54b399f3024b92e9c518363acd2b15f713e83d0bb4fb3f8f26d98b /nix/store/8frm8kk8gzpv31r289ai5jgkwfikmpm4-stdenv-bootstrap-tools-powerpc64-unknown-linux-gnuabielfv2/on-server/bootstrap-tools.tar.xz 529a053a8022e89357aaa608e57aaddaa7c3ded93d633916ddca92bb81e22125 /nix/store/8frm8kk8gzpv31r289ai5jgkwfikmpm4-stdenv-bootstrap-tools-powerpc64-unknown-linux-gnuabielfv2/on-server/busybox Suggested commands to upload files to 'tarballs.nixos.org': $ nix-store --realize /nix/store/8frm8kk8gzpv31r289ai5jgkwfikmpm4-stdenv-bootstrap-tools-powerpc64-unknown-linux-gnuabielfv2 $ aws s3 cp --recursive --acl public-read /nix/store/8frm8kk8gzpv31r289ai5jgkwfikmpm4-stdenv-bootstrap-tools-powerpc64-unknown-linux-gnuabielfv2/on-server/ s3://nixpkgs-tarballs/stdenv/powerpc64-unknown-linux-gnuabielfv2/57cf2e0b24fb52344cc718913eaed78f389b1319 $ aws s3 cp --recursive s3://nixpkgs-tarballs/stdenv/powerpc64-unknown-linux-gnuabielfv2/57cf2e0b24fb52344cc718913eaed78f389b1319 ./ $ sha256sum bootstrap-tools.tar.xz busybox $ sha256sum /nix/store/8frm8kk8gzpv31r289ai5jgkwfikmpm4-stdenv-bootstrap-tools-powerpc64-unknown-linux-gnuabielfv2/on-server/*
2024-03-09Revert "stdenv: log build hooks as they run"a-n-n-a-l-e-e1-43/+0
2024-03-09Merge staging-next into staginggithub-actions[bot]1-0/+1