summary refs log tree commit diff
path: root/pkgs/stdenv
Commit message (Collapse)AuthorAge
* Merge pull request #44439 from Ekleog/meta-testsTimo Kaufmann2018-11-07
|\ | | | | [RFC] Use `meta.tests` to link from packages to the tests that test them
| * dovecot, opensmtpd: add link to test in `meta.tests`Léo Gaspard2018-10-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rationale --------- Currently, tests are hard to discover. For instance, someone updating `dovecot` might not notice that the interaction of `dovecot` with `opensmtpd` is handled in the `opensmtpd.nix` test. And even for someone updating `opensmtpd`, it requires manual work to go check in `nixos/tests` whether there is actually a test, especially given not so many packages in `nixpkgs` have tests and this is thus most of the time useless. Finally, for the reviewer, it is much easier to check that the “Tested via one or more NixOS test(s)” has been checked if the file modified already includes the list of relevant tests. Implementation -------------- Currently, this commit only adds the metadata in the package. Each element of the `meta.tests` attribute is a derivation that, when it builds successfully, means the test has passed (ie. following the same convention as NixOS tests). Future Work ----------- In the future, the tools could be made aware of this `meta.tests` attribute, and for instance a `--with-tests` could be added to `nix-build` so that it also builds all the tests. Or a `--without-tests` to build without all the tests. @Profpatsch described in his NixCon talk such systems. Another thing that would help in the future would be the possibility to reasonably easily have cross-derivation nix tests without the whole NixOS VM stack. @7c6f434c already proposed such a system. This RFC currently handles none of these concerns. Only the addition of `meta.tests` as metadata to be used by maintainers to remember to run relevant tests.
* | Revert "Merge pull request #49398 from Synthetica9/implement-rfc0035" to fix ↵Frederik Rietdijk2018-11-04
| | | | | | | | | | | | | | | | | | | | eval This reverts commit 3fc7d5eb83804e10ae55b1ae9b102f88b1ea2b08, reversing changes made to 1fddf2b68996b56804a24b67191e4d883943057d. The idea is good, however, before enforcing, make sure all occurences are fixed.
* | Merge pull request #49398 from Synthetica9/implement-rfc0035Jörg Thalheim2018-11-03
|\ \ | | | | | | Implement rfc0035: default `name` from `pname`
| * | make-derivation: use a more descriptive assert messagePatrick Hilhorst2018-10-30
| | | | | | | | | | | | As suggested by @Profpatsch
| * | make-derivation: use `lib.assertMsg`Patrick Hilhorst2018-10-29
| | | | | | | | | | | | As suggested by @Profpatsch
| * | make-derivation: use `?` instead of `builtins.hasAttr`Patrick Hilhorst2018-10-29
| | | | | | | | | | | | As suggested by @edolstra
| * | make-derivation: add check that the name is consistent with pname and versionPatrick Hilhorst2018-10-29
| | |
| * | make-derivation: get position info from versionPatrick Hilhorst2018-10-29
| | |
| * | make-derivation: use pname-version as default name if both are presentPatrick Hilhorst2018-10-29
| |/
* | Merge remote-tracking branch 'upstream/master' into release-lib-cleanupJohn Ericson2018-11-01
|\|
| * make-derivation: set CMAKE_SYSTEM_* when cross compilingMatthew Bauer2018-10-16
| | | | | | | | | | | | | | | | | | | | | | Uses uname data to find what to set these variables: - CMAKE_SYSTEM_NAME - CMAKE_SYSTEM_PROCESSOR - CMAKE_SYSTEM_VERSION - CMAKE_HOST_SYSTEM_NAME - CMAKE_HOST_SYSTEM_PROCESSOR - CMAKE_HOST_SYSTEM_VERSION
| * 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.
| * | Merge pull request #47230 from bhipple/fix/licensesMatthew Bauer2018-10-05
| |\ \ | | | | | | | | Remove dead code from stdenv check-meta license logic
| | * | Remove dead code from stdenv check-meta license logicBenjamin Hipple2018-09-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `unfree` and `unfreeRedistributable` licenses both have `free = false`, which will trigger the first portion of logic. This removes dead code to simplify the logic. As a follow-up, I plan to add an attribute `redistributable = [true|false]`, which can be used by Hydra to determine whether a given package with a given license can be included in the channel.
| * | | Merge pull request #47245 from dtzWill/fix/coreutils-8.30-bootstrapxeji2018-09-25
| |\ \ \ | | | | | | | | | | coreutils: try 8.30 again, fix bootstrap tools expression motivating revert before
| | * | | make-bootstrap-tools: fix with latest coreutilsWill Dietz2018-09-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since gcc.lib/lib64 is a symlink to 'lib', the use of "lib*/libgcc_s.so*" triggered a warning (error) with the latest coreutils. Essentially we were doing: $ cp a/x b/x y/ And latest coreutils rejects such invocations. Just copy from 'lib', lib64 is a link to it anyway. * Nothing else in this file bothers looking at lib* * AFAICT lib* only ever possibly matched lib64 anyway
| * | | | stdenv: Improve ELF detection for isELFaszlig2018-09-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The isELF function only checks whether ELF is contained within the first 4 bytes of the file, which is a bit fuzzy and will also return successful if it's a text file starting with ELF, for example: ELF headers ----------- Some text here about ELF headers... So instead, we're now doing a precise match on \x7fELF. Signed-off-by: aszlig <aszlig@nix.build> Acked-by: @Ericson2314 Closes: https://github.com/NixOS/nixpkgs/pull/47244
| * | | | Merge pull request #47233 from oxij/tree/mass-rebuild-noop-cleanupsJohn Ericson2018-09-25
| |\ \ \ \ | | |/ / / | |/| | | treewide: mass rebuild noop cleanups
| | * | | bintools-wrapper, cc-wrapper, stdenv: infer propagateDoc automaticallyJan Malakhovski2018-09-23
| | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 02c09e01712ce0b61e5c8f7159047699a434f7fc (NixOS/nixpkgs#44558) was reverted in c981787db951afb11c1328461df82d4277ebec07 but, as it turns out, it fixed an issue I didn't know about at the time: the values of `propagateDoc` options were (and now again are) inconsistent with the underlying things those wrappers wrap (see NixOS/nixpkgs#46119), which was (and now is) likely to produce more instances of NixOS/nixpkgs#43547, if not now, then eventually as stdenv changes. This patch (which is a simplified version of the original reverted patch) is the simplest solution to this whole thing: it forces wrappers to directly inspect the outputs of the things they are wrapping instead of making stdenv guess the correct values.
| | * | Merge pull request #45941 from NixOS/staging-nextFrederik Rietdijk2018-09-23
| | |\ \ | | | | | | | | | | Staging next
| | | * \ Merge master into staging-nextFrederik Rietdijk2018-09-18
| | | |\ \
| | | * \ \ Merge branch 'master' into staging-nextUli Baum2018-09-13
| | | |\ \ \
| * | | | | | Revert "stdenv/darwin: bump bootstrap tools"Dan Peebles2018-09-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This accidentally added some unwanted dependencies on the bootstrap tools, and I don't have time to fix before I go on vacation, so I'm backing it out until I have time to address it properly. This reverts commit dc5c68a7bb03e8807f8ab8ad30e5eb11d1f29302.
| * | | | | | Merge remote-tracking branch 'upstream/master' into stagingJohn Ericson2018-09-18
| |\| | | | |
| | * | | | | Merge pull request #46857 from obsidiansystems/darwin-to-linux-prepJohn Ericson2018-09-18
| | |\ \ \ \ \ | | | |_|_|/ / | | |/| | | | misc pkgs: various cross fixes in preparation for darwin->linux
| | * | | | | stdenv: Validate meta.outputsToInstallGraham Christensen2018-09-18
| | | |_|/ / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If meta.outputsToInstall is set to include absent outputs, various tools break including channel updates and nix-env. grahamc@Morbo> nix-env -i -f . -A elf-header-real installing 'elf-header' error: this derivation has bad 'meta.outputsToInstall' This patch verifies each value in meta.outputsToInstall is a valid output. It validates this condition only if checkMeta is true. grahamc@Morbo> nix-build . -A elf-header-real error: Package ‘elf-header’ in /home/grahamc/projects/nixpkgs/pkgs/development/libraries/elf-header/default.nix:36 has invalid meta.outputsToInstall, refusing to evaluate. The package elf-header has set meta.outputsToInstall to: bin however elf-header only has the outputs: out and is missing the following ouputs: - bin (use '--show-trace' to show detailed location information) Note, now the nix-env experience is decidedly worse for users who have checkMeta set to true: grahamc@Morbo> nix-env -i -f . -A elf-header-real; echo $? 0 though since this is already an issue for unfree, broken, unsupported, and insecure validity problems I'm not sure we should do something different here.
| * | | | | stdenv/darwin: bump bootstrap toolsDan Peebles2018-09-17
| | | | | | | | | | | | | | | | | | | | | | | | You can verify the provenance of these yourself by checking Hydra here: https://hydra.nixos.org/build/81511173
| * | | | | stdenv: fix HOST_PATH changeMatthew Bauer2018-09-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a4630c65caf was incorrect in assuming $SHELL would be a path to the bash derivation. In fact $SHELL will be a path to the bash executable. Unfortunately this did not fix the original issue. So instead, we just have to reuse initialPath can be added like PATH is. Sorry for the inconvenience! I hadn’t thought through the effects of the last commit. /cc @copumpkin @ericson2314
| * | | | | Merge pull request #46730 from copumpkin/add-darwin-ltoDaniel Peebles2018-09-17
| |\ \ \ \ \ | | | | | | | | | | | | | | cctools: support LTO on Darwin
| | * | | | | cctools: support LTO on DarwinDan Peebles2018-09-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | LTO is disabled during bootstrap to keep the bootstrap tools small and avoid unnecessary LLVM rebuilds, but is enabled in the final stdenv stage and should be usable by normal packages.
| * | | | | | stdenv: add shell to HOST_PATH for backwards compatibilityMatthew Bauer2018-09-16
| |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To avoid breaking things, we need to make sure SHELL goes into HOST_PATH. This reflects my changes to patch-shebangs to make it cross compilation ready. When a script is patched from the Nix store it now looks to HOST_PATH to get the targeted machine’s executables. Unfortunately, this only works in native builds.
| * | | | | stdenv/darwin: integrate a new CoreFoundationDan Peebles2018-09-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This also updates the bootstrap tool builder to LLVM 5, but not the ones we actually use for bootstrap. I'll make that change in a subsequent commit so as to provide traceable provenance of the bootstrap tools.
| * | | | | Merge branch 'master' into stagingJan Malakhovski2018-09-08
| |\| | | |
| | * | | | Merge pull request #46148 from obsidiansystems/plain-system-hostJohn Ericson2018-09-06
| | |\ \ \ \ | | | | | | | | | | | | | | top-level, stdenv: Make `system` and `stdenv.system` describe the hostPlatform
| | * \ \ \ \ Merge pull request #46076 from oxij/tree/cleanupsJohn Ericson2018-09-05
| | |\ \ \ \ \ | | | | | | | | | | | | | | | | trivial: treewide: random noop cleanups
| | | * | | | | stdenv: linux: cleanup a bitJan Malakhovski2018-09-04
| | | | | | | |
| * | | | | | | stdenv: implement enableParallelChecking optionJan Malakhovski2018-09-05
| | |_|_|_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Works similarly to `enableParallelBuilding`, but is set by default when `enableParallelBuilding` is set. In my experience most packages that build fine in parallel also check fine in parallel.
| * | | | | | Merge branch 'master' into staging-nextVladimír Čunát2018-09-04
| |\ \ \ \ \ \ | | | |/ / / / | | |/| | | | | | | | | | | Hydra: ?compare=1477053
| * | | | | | Merge branch 'master' into stagingVladimír Čunát2018-09-01
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | A few trivial conflicts due to *Platforms mass replace.
| * \ \ \ \ \ \ Merge #44910: cmake: 3.11.2 -> 3.12.1Vladimír Čunát2018-08-30
| |\ \ \ \ \ \ \
| | * | | | | | | darwin stdenv stage1: use default cmakeAndrew Childs2018-08-13
| | | | | | | | |
* | | | | | | | | linux bootstrap tools: Use right system for some raw derivationsJohn Ericson2018-11-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows cross builds to work. Evidentallyy this has been done wrong since I combined the bootstrap tool creation files in ab651d2c9bab620ebe5e515476fbd70d2c5b0c61. Oops!
* | | | | | | | | linux bootstrap-tools: use `stdenv.*Platform` to avoid deprecation warningJohn Ericson2018-11-01
| | | | | | | | |
* | | | | | | | | Revert "stdenv: partial revert of f2bb59e"John Ericson2018-09-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 607063f61be3b19a2da054776b360d9c5b03038a.
* | | | | | | | | stdenv: partial revert of f2bb59eMatthew Bauer2018-09-26
| |_|_|_|_|_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | /cc @Ericson2314 PR was https://github.com/NixOS/nixpkgs/pull/46857 This line broke MacOS cross compilation. paxctl cannot be built on macOS. Maybe it can be fixed, but no reason to break things unnecessarily. Regardless, you definitely need to be more careful about backporting. I think it’s fine to move fast and break things on master but with release-18.09 we should be more careful. Something like more automated testing for cross compilation would also be helpful (hopefully even making it block). (cherry picked from commit f9c4075873cb56464126f993d22a1a72f7cfac45)
* | | | | | | | stdenv linux, stdenv cross: Harmonize extraNativeBuildInputsJohn Ericson2018-09-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Want to make sure these are the same per host platform, without duplication.
* | | | | | | | mkDerivation: Make `separateDebugInfo` assertion lazier to match other ↵John Ericson2018-09-18
| |_|_|_|_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | assertions This is needed to access attributes of derivations on platforms where they cannot be built.
* | | | | | | top-level, stdenv: Make `system` and `stdenv.system` describe the hostPlatform.John Ericson2018-09-06
| |_|_|_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Intuitively, one cares mainly about the host platform: Platforms differ in meaningful ways but compilation is morally a pure process and probably doesn't care, or those difference are already abstracted away. @Dezgeg also empirically confirmed that > 95% of checks are indeed of the host platform. Yet these attributes in the old cross infrastructure were defined to be the build platform, for expediency. And this was never before changed. (For native builds build and host coincide, so it isn't clear what the intention was.) Fixing this doesn't affect native builds, since again they coincide. It also doesn't affect cross builds of anything in Nixpkgs, as these are no longer used. It could affect external cross builds, but I deem that unlikely as anyone thinking about cross would use more explicit attributes for clarity, all the more so because the rarity of inspecting the build platform.