about summary refs log tree commit diff
path: root/pkgs/stdenv/adapters.nix
Commit message (Collapse)AuthorAge
* Merge staging-next into staginggithub-actions[bot]2023-10-13
|\
| * stdenvAdapters.useMoldLinker: automatically add `allowedRequisites`Artturin2023-10-13
| | | | | | | | Co-Authored-By: Pavel Sobolev <paveloom@riseup.net>
* | Merge staging-next into staginggithub-actions[bot]2023-10-13
|\|
| * mold: add tests for `mold-wrapped` and `useMoldLinker` adapterArtturin2023-10-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make both ready for cross with prefixes Currently `pkgsCross.aarch64-multiplatform.mold.passthru.tests.{wrapped,adapter}` fail with ``` Testing running the 'hello' binary which should be linked with 'mold' Hello, world! Checking for mold in the '.comment' section No mention of 'mold' detected in the '.comment' section The command was: aarch64-unknown-linux-gnu-readelf -p .comment ...bin/hello The output was: String dump of section '.comment': [ 0] GCC: (GNU) 12.3.0 ```
* | makeStaticBinaries: Set -DCMAKE_SKIP_INSTALL_RPATHPeter Waller2023-09-03
|/ | | | | | | | | | | | | | | | | | | | | | Without this, you get error messages during the install phase along the lines of: "file RPATH_CHANGE could not write new RPATH:". This is unsurprising because the static binaries do not have any dynamic linker and thus, no runpath to rewrite either. Tell cmake it doesn't need to do RPATH manipulation by passing cmakeFlags. While we're here, I also renamed `finalAttrs` to `args` and fixed the indentation; this improves consistency with the surrounding code and eliminates a point of confusion: because it was named `finalAttrs` I presumed I should be able to influence it with an overrideAttrs setting dontAddStaticConfigureFlags, but this turns out not to be possible; adding prevAttrs as well doesn't work because of a limitation of overrideAttrs whereby it gives an infinite recursion if the set of attribute keys being returned depends on finalAttrs. Signed-off-by: Peter Waller <p@pwaller.net>
* stdenvAdapters: Remove 6 year old commentArtturin2023-07-21
| | | | Comment was added in 3c36dcc and hasn't been needed because makeStaticBinaries already adds glibc.static
* stdenvAdapters: Fix conditionArtturin2023-07-21
| | | | Fixes issue 244232
* darwin.stdenv: fix portable libsystem hook with sandboxingRandy Eckenrode2023-07-08
| | | | | | When sandboxing is enabled, the hook tries to run `install_name_tool` and fails because the system one is inaccessible. Having it use `targetPrefix` allows it to find and use the cross-install_name_tool.
* stdenvAdapters: don't use lib.optional with a listfigsoda2023-07-03
|
* stdenv: fix makeStaticDarwin not composing with stdenvNoCCUri Baghin2023-06-22
|
* stdenvAdapters: fix preservation of env.NIX_CFLAGS_COMPILEArtturin2023-04-12
| | | | | | | we have managed to migrate to NIX_CFLAGS_COMPILE to the env attrset well enough that we don't need to support having it toplevel. mkDerivation will throw if there's a attr in both env and toplevel so no need to worry about that
* stdenvAdapters: fix preservation of envArtturin2023-04-11
|
* Merge staging-next into staginggithub-actions[bot]2023-02-23
|\
| * treewide: move NIX_CFLAGS_COMPILE to the env attrsetArtturin2023-02-22
| | | | | | | | | | | | | | | | 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
* | stdenvAdapters: add useMoldLinkerArtturin2023-02-17
|/
* treewide: add names to all setup hooksAlyssa Ross2023-01-19
|
* stdenv: remove deprecated adapterspennae2022-08-26
|
* stdenv/adapters.nix: Fix for overlay style argumentsRobert Hensing2022-06-05
|
* treewide: stdenv.glibc -> glibcArtturin2022-05-25
|
* stdenv: deprecate unused adaptersArtturin2022-05-07
| | | | | | | | | | | | | | | | | | | | stdenv: deprecate addCoverageInstrumentation adapter this used to be used in nixos/tests but it hasn't been used in nixpkgs for years stdenv: deprecate replaceMaintainersField adapter it was added in 2009 in 01e98e49b155d989d8c80066db6de910396cdcaa by nbp there are no uses of it in nixpkgs now stdenv: deprecate validateLicenses adapter it was added in 2009 in b29073af25cb0ff2d8d9a0aa1f958316904d3dc9 unfreePredicate is now handled in ./pkgs/stdenv/generic/check-meta.nix so this is unnecessary
* stdenv: introduce withCFlagsmatthewcroughan2022-01-29
| | | | | | | | | Adds an easy method of appending compiler flags to your stdenv via a list. Co-authored-by: tomberek <tomberek@users.noreply.github.com> Co-authored-by: Gytis Ivaskevicius <gytis02.21@gmail.com> Co-authored-by: sternenseemann <sternenseemann@systemli.org>
* pkgsStatic: Finally obviate overlay!John Ericson2021-08-20
|
* pkgsStatic: Inline more of static overlayJohn Ericson2021-08-19
|
* stdenv: Fix overriding + `overrideAttrs`John Ericson2021-08-18
| | | | | | | | | | | | | | | | | | | | The old stdenv adapters were subtly wrong in two ways: - `overrideAttrs` leaked the original, unoverridden `mkDerivation`. - `stdenv.override` would throw away any manually-set `mkDerivation` from a stdenv reverting to the original. Now, `mkDerivation` is controlled (nearly directly) via an argument, and always correctly closes over the final ("self") stdenv. This means the adapters can work entirely via `.override` without any manual `stdenv // ...`, and both those issues are fixed. Note hashes are changed, because stdenvs no previously overridden like `stdenvNoCC` and `crossLibcStdenv` now are. I had to add some `dontDisableStatic = true` accordingly. The flip side however is that since the overrides compose, we no longer need to override anything but the default `stdenv` from which all the others are created.
* stdenv: introduce dontAddStaticConfigureFlagsAlyssa Ross2021-06-11
| | | | | | | | | | | | | | | | | | | | | With removeUnknownConfigureFlags, it's impossible to express a package that needs --enable-static, but will not accept --disable-shared, without overriding the result of removeUnknownConfigureFlags _again_ in pkgs/top-level/static.nix. It would be much better (and more in line with the rest of Nixpkgs) if we encoded changes needed for static builds in package definitions themselves, rather than in an ever-expanding list in static.nix. This is especially true when doing it in static.nix is going to require multiple overrides to express what could be expressed with stdenv options. So as a step in that direction, and to fix the problem described above, here I replace removeUnknownConfigureFlags with a new stdenv option, dontAddStaticConfigureFlags. With this mechanism, a package that needs one but not both of the flags just needs to set dontAddStaticConfigureFlags and then set up configureFlags manually based on stdenv.hostPlatform.isStatic.
* treewide: stdenv.lib -> libBen Siraphob2021-01-27
|
* pkgsStatic: fix eval on DarwinJude Taylor2020-04-28
|
* pkgsStatic: set BUILD_SHARED_LIBS=OFF for cmakeDmitry Kalinkin2020-01-03
|
* stdenv/adapters.nix: remove static from makeStaticLibrariesMatthew Bauer2019-09-19
| | | | | | | | This logic should be in the pkgs/top-level/static.nix. We don’t want to pollute Nixpkgs with =if stdenv.static=. Also, "static" is not descriptive. We have two types of static stdenvs, ‘makeStaticLibaries’ and ‘makeStaticBinaries’. We shouldn’t rely on a static boolean like this.
* pkgsStatic: propagate all buildInputsTobias Mayer2019-07-24
|
* Signal static build option in makeStaticLibrariesTobias Mayer2019-07-21
| | | | | This flag can replace the extra static parameter to packages that don't work automatically with this adapter.
* Merge branch 'staging-next' into stagingVladimír Čunát2019-05-26
|\
| * treewide: Remove usage of isNullDaniel Schaefer2019-04-29
| | | | | | | | isNull "is deprecated; just write e == null instead" says the Nix manual
* | static: set default_library flag for meson in makeStaticLibraryMatthew Bauer2019-05-08
|/ | | | Adds support for building static libraries with meson.
* makeStaticBinaries: add a static glibc when performing a mkDerivationJames Kay2018-12-14
|
* stdenv/adapters.nix: fixup makeStaticBinariesMatthew Bauer2018-12-04
| | | | | | - makeStaticBinaries don’t work on Darwin (no stable ABI!) - Need to make sure NIX_CFLAGS_LINK appends - isStatic is not used anymore
* Merge pull request #37600 from abbradar/impureusenativeYegor Timoshenko2018-10-13
|\ | | | | impureUseNativeOptimizations: add stdenv adapter
| * impureUseNativeOptimizations: add stdenv adapterNikolay Amiantov2018-04-17
| | | | | | | | | | | | | | | | | | This allows one to force a compiler to use native machine optimizations. This goes contrary to all the usual guarantees of Nix and so should be used only by end-user and only in specific cases when they know what are they doing. In my case this is needed to get a noticeable FPS boost in RPCS3 which is very CPU-hungry PlayStation 3 emulator.
* | stdenv adapter: Keep configureFlags a listJohn Ericson2018-08-03
| |
* | makeStdenvCross: RemoveJohn Ericson2018-07-24
| | | | | | | | | | It is inlined into the cross stdenv, which is its last use-case after the previous commit.
* | stdenv cross adapter: Use `extraNativeBuildInputs`John Ericson2018-07-24
| | | | | | | | This means we don't need to hackily avoid overwriting `mkDerivation`.
* | stdenv: Remove crossAttrs, now that it is no longer usedJohn Ericson2018-07-24
| | | | | | | | Fix #33302
* | stdenv cross adapter: Don't define crossConfigJohn Ericson2018-05-14
|/ | | | All its uses have been removed.
* Merge pull request #36401 from obsidiansystems/no-stdenv-cross-adapterJohn Ericson2018-03-06
|\ | | | | stdenv cross adapter: Get rid if `selfNativeBuildInput`
| * stdenv cross adapter: Get rid if `selfNativeBuildInput`John Ericson2018-03-06
| | | | | | | | | | | | It is finally no longer used anywhere Fixes #30587
* | lib, treewide: Add missing MIPS arches, and fix existing usageDaniel Barlow2018-02-23
|/ | | | | | | | | Existing "mips64el" should be "mipsel". This is just the barest minimum so that nixpkgs can recognize them as systems - although required for building individual derivations onto MIPS boards, it is not sufficient if you want to actually build nixos on those targets
* stdenv: automatically update config.sub for muslWill Dietz2018-02-13
|
* stdenv cross adapter: Get rid of extra propagatation of buildInputsJohn Ericson2017-12-29
| | | | Binutils is patched so we don't rely on `--rpath-link`.
* cross stdenv: No more native-fishing hack.John Ericson2017-09-21
| | | | | The comment says it was put there for pkgconfig, but now pkgconfig has been dealt with.
* stdenv cross adapater: Remove old `extraBuildInputs`John Ericson2017-09-21
| | | | | They, unlike their native counterparts, run on the wrong platform and are therefore invalid.