about summary refs log tree commit diff
path: root/pkgs/stdenv
AgeCommit message (Collapse)AuthorFilesLines
2019-12-30Merge pull request #74090 from obsidiansystems/ghcjs-cross-without-ccJohn Ericson3-7/+30
stdenv, haskell: bonafied GHCJS cross compilation without stdenv.cc
2019-12-30Merge remote-tracking branch 'obsidian/ghcjs-cross-without-cc-common' into ↵John Ericson1-1/+5
ghcjs-cross-without-cc
2019-12-30pkgs/stdenv/booter.nix: Add comment explaining hasCC trickeryJohn Ericson1-1/+5
2019-12-15allowInsecureDefaultPredicate: fix to use getNameRobert Scott1-1/+1
this allows correct operation with packages only having pname and version specified, resolving issue #73737
2019-11-26Merge remote-tracking branch 'obsidian/ghcjs-cross-without-cc-19.09' into ↵John Ericson1-1/+1
ghcjs-cross-without-cc
2019-11-26Fix lib testsJohn Ericson1-1/+1
js-ghcjs didn't fit in an existing categor.
2019-11-25Merge remote-tracking branch 'upstream/master' into ghcjs-cross-without-ccJohn Ericson6-99/+74
2019-11-25Add support for cross compiling to `js-ghcjs`John Ericson2-4/+13
This platform doesn't have a C compiler, and so relies and the changes in the previous commit to work.
2019-11-25stdenv: Introduce hasCC attributeJohn Ericson1-3/+13
Before, we'd always use `cc = null`, and check for that. The problem is this breaks for cross compilation to platforms that don't support a C compiler. It's a very subtle issue. One might think there is no problem because we have `stdenvNoCC`, and presumably one would only build derivations that use that. The problem is that one still wants to use tools at build-time that are themselves built with a C compiler, and those are gotten via "splicing". The runtime version of those deps will explode, but the build time / `buildPackages` versions of those deps will be fine, and splicing attempts to work this by using `builtins.tryEval` to filter out any broken "higher priority" packages (runtime is the default and highest priority) so that both `foo` and `foo.nativeDrv` works. However, `tryEval` only catches certain evaluation failures (e.g. exceptions), and not arbitrary failures (such as `cc.attr` when `cc` is null). This means `tryEval` fails to let us use our build time deps, and everything comes apart. The right solution is, as usually, to get rid of splicing. Or, baring that, to make it so `foo` never works and one has to explicitly do `foo.*`. But that is a much larger change, and certaily one unsuitable to be backported to stable. Given that, we instead make an exception-throwing `cc` attribute, and create a `hasCC` attribute for those derivations which wish to condtionally use a C compiler: instead of doing `stdenv.cc or null == null` or something similar, one does `stdenv.hasCC`. This allows quering without "tripping" the exception, while also allowing `tryEval` to work. No platform without a C compiler is yet wired up by default. That will be done in a following commit.
2019-11-12setup.sh: rewrite stripHashLily Ballard1-4/+7
Rewrite the `stripHash` helper function with 2 differences: * Paths starting with `--` will no longer produce an error. * Use Bash string manipulation instead of shelling out to `grep` and `cut`. This should be faster.
2019-11-05stdenv: Don't unset propagated*DepFiles before main phasesJohn Ericson1-1/+1
A bunch of stdenv-internal variables were deleted in 1601a7fcce389ae3f1b1b36676fd5545035566af, but these are needed in the fixup phase, whereas the rest are just needed for the initial work (findInputs, etc) before the user phases. CC @matthewbauer
2019-11-05Merge pull request #69603 from matthewbauer/unset-unused-setup-varMatthew Bauer1-13/+22
Unset unused variables in setup.sh
2019-11-05Merge staging-next into stagingFrederik Rietdijk2-13/+22
2019-11-03Revert "stdenv/check-meta: getEnv if the attribute is unset (#72376)" (#72752)Dmitry Kalinkin1-4/+7
This reverts commit 71184f8e157672789602d3f28bdd3c8079800687.
2019-11-03stdenv/check-meta: getEnv if the attribute is unset (#72376)zimbatm1-7/+4
There were two issues: * builtins.getEnv was called deep into the nixpkgs tree making it hard to discover. This is solved by moving the call into pkgs/top-level/impure.nix * when the config was explicitly set by the user to false, it would still try and load the environment variable. This meant that it was not possible to guarantee the same outcome on two different systems.
2019-11-03Merge pull request #72070 from graham33/fix/license_listMatthew Bauer1-3/+3
Fix handling of lists in whitelistedLicenses and blacklistedLicenses
2019-11-03make-bootstrap-tools: use 'extreme' option to reduce size but not costWill Dietz1-1/+1
Apparently this option trades compression time for size, and explicitly does so without increasing resources needed in decomp. Doesn't make tarball creation unbearable, so add it to options!
2019-11-03binutils: offer "for bootstrap" variant that's less.. feature-completeWill Dietz1-1/+8
2019-11-03gcc7: make building w/LTO support optional, don't use in bootstrap toolsWill Dietz1-8/+10
2019-11-01stdenv: Don't stop `set -u`-ingJohn Ericson1-42/+3
Before, we very carefully unapplied and reapplied `set -u` so the rest of Nixpkgs could continue to not fail on undefined variables. Let's rip off the band-aid.
2019-11-01treewide: Make still dont* Variables are optional in most casesJohn Ericson2-2/+2
Go beyond the obvious setup hooks now, with a bit of sed, with a skipped case: - cc-wrapper's `dontlink`, because it already is handled. Also, in nix files escaping was manually added. EMP
2019-10-27Fix handling of lists in whitelistedLicenses and blacklistedLicensesGraham Bennett1-3/+3
A package's meta.license can either be a single license or a list. The code to check config.whitelistedLicenses and config.blackListedLicenses wasn't handling this, nor was the showLicense function.
2019-09-26generic/setup.sh: Unset locally defined variablesMatthew Bauer1-13/+22
setup.sh adds a bunch of variables that only it needs. To avoid polluting environments, we should unset these as soon as we are done with them.
2019-09-20Merge pull request #69028 from matthewbauer/remove-iselfexec-iselfdynMatthew Bauer1-12/+0
Revert "setup.sh introduce isELFExec, isELFDyn"
2019-09-20Merge remote-tracking branch 'origin/master' into stagingMatthew Bauer1-1/+0
2019-09-20setup.sh: avoid subshells: iterating a fileAlbert Safin1-1/+2
2019-09-20setup.sh: avoid subshells: type -t in _callImplicitHookAlbert Safin1-15/+12
2019-09-20setup.sh: avoid subshells: mapOffsetAlbert Safin1-5/+6
2019-09-20setup.sh: avoid subshells: type -tAlbert Safin1-1/+1
2019-09-19stdenv/adapters.nix: remove static from makeStaticLibrariesMatthew Bauer1-1/+0
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.
2019-09-19setup.sh: avoid subshells: shopt -po nounsetAlbert Safin1-14/+21
2019-09-18Revert "setup.sh introduce isELFExec, isELFDyn"Matthew Bauer1-12/+0
This reverts commit e1b80a5a99a3013c6556ec2e2e73ef6ca8e8b80b. This is broken in PIE (#68513). Best to not keep it in until something else starts using it.
2019-09-02Merge branch 'master' into stagingVladimír Čunát1-0/+2
2019-09-02Merge remote-tracking branch 'upstream/master' into feature/js-unknown-ghcjsJohn Ericson12-104/+149
2019-09-02Add support for `js-unknown-ghcjs`Moritz Angermann1-0/+2
This adds enough logic to nixpkgs to support the `js-unknown-ghcjs` triple.
2019-08-28treewide: remove redundant recvolth2-3/+3
2019-08-28Merge staging-next into stagingFrederik Rietdijk1-8/+9
2019-08-26treewide: remove redundant quotesvolth4-38/+38
2019-08-18Merge pull request #66657 from danbst/pgpackages-fixesDanylo Hlynskyi1-8/+9
Postgresql plugins fixes
2019-08-18Merge pull request #66725 from flokli/wrapqtappshook-execFlorian Klink1-0/+12
stdenv: add isELFExec, isELFDyn, fix wrappers
2019-08-17setup.sh introduce isELFExec, isELFDynFlorian Klink1-0/+12
These can be used to determine whether a ELF file with ELF header is an executable or shared library. We can't implement it in pure bash, as bash has problems with null bytes.
2019-08-15stdenv/check-meta: construct name from pname and version if name unavailabledanbst1-8/+9
2019-08-14Merge pull request #65484 from arcnmx/pr-stdenv-cmake-crossMatthew Bauer1-1/+1
stdenv: correct cross CMAKE_SYSTEM_NAME
2019-08-01Merge master into staging-nextFrederik Rietdijk1-0/+13
2019-07-27stdenv: correct cross CMAKE_SYSTEM_NAMEarcnmx1-1/+1
As described in cmake cross instructions, CMAKE_SYSTEM_NAME should be set to "Generic" if there is no applicable OS: https://gitlab.kitware.com/cmake/community/wikis/doc/cmake/CrossCompiling#setting-up-the-system-and-toolchain
2019-07-24pkgsStatic: propagate all buildInputsTobias Mayer1-0/+12
2019-07-21Signal static build option in makeStaticLibrariesTobias Mayer1-0/+1
This flag can replace the extra static parameter to packages that don't work automatically with this adapter.
2019-07-08stdenv: MACOSX_DEPLOYMENT_TARGET 10.10 -> 10.12Daiderd Jordan1-1/+1
2019-07-01setup.sh: add dontUnpackworldofpeace1-0/+1
2019-07-01setup.sh: add dontConfigureworldofpeace1-0/+1
There's already 21 occurences of this and I've expected this to exist without knowing it had no affect for a while.