Commit Graph

1447 Commits

Author SHA1 Message Date
Shea Levy
b24ce2ae63
Handle sourceRoots with leading dashes 2018-02-15 11:50:24 -05:00
Tuomas Tynkkynen
b1916b45a3 Merge remote-tracking branch 'upstream/staging' into gcc-7
Conflicts:
	pkgs/development/libraries/libidn/default.nix
	pkgs/top-level/all-packages.nix
2018-02-15 15:45:37 +02:00
Will Dietz
84a527ea5e x86_64-musl bootstrap: use separate 64bit busybox
Avoid issues like #24954.
2018-02-13 09:45:05 -06:00
Will Dietz
4619f8e06d new musl bootstrap URL's, much smaller. rebuild all the things. 2018-02-13 09:45:04 -06:00
Will Dietz
268bff6185 make-bootstrap-tools: set XZ to maximum level, big wins
x86_64 bootstrap tarball goes from 37M -> 21M (!)
2018-02-13 09:45:04 -06:00
Will Dietz
a4c69744dc aarch64-musl, armv6l-musl: fetch from wdtz.org instead of storePath 2018-02-13 09:45:04 -06:00
Will Dietz
8bedb690a2 add musl bootstrap paths for aarch64, armv6l
Aarch64 tools tested briefly with qemu-aarch64,
but neither have been actually used yet :).

For now only "host" indirectly via binary cache
at cache.allvm.org.
2018-02-13 09:45:04 -06:00
Will Dietz
d00f200f4e bootstrap-files: nicer naming 2018-02-13 09:45:03 -06:00
Will Dietz
119920faa6 restore stdenv.glibc, will remove separately. 2018-02-13 09:45:03 -06:00
Will Dietz
c8d03e6298 make-bootstrap-tools: grab libc from stdenv.cc.libc
This is the same in current cases AFAICT,
other than uses musl instead of glibc when musl-native.
2018-02-13 09:44:57 -06:00
Will Dietz
9bc8127dc3 bootstrap-tools-cross, release-cross: add various musl entries 2018-02-13 09:44:56 -06:00
Will Dietz
4b6b83f159 linux stdenv: find bootstrap files by libc, then arch 2018-02-13 09:44:42 -06:00
Will Dietz
5a8002873e fixup linux stdenv bootstrap 2018-02-13 09:44:40 -06:00
Will Dietz
9dbbd75e54 musl bootstrap: allow libiconv 2018-02-13 09:44:40 -06:00
Will Dietz
fd00d37b4f musl64 bootstrap: grab from gravity, requires netrc magic 2018-02-13 09:44:39 -06:00
Will Dietz
3ee5094934 linux bootstrap for musl: kludgery 2018-02-13 09:44:39 -06:00
Will Dietz
0e16989d39 bootstrap-tools-musl: WIP 2018-02-13 09:44:37 -06:00
Will Dietz
a0af2aadb6 for now, copy bootstrap-tools instead of modify in-place 2018-02-13 09:44:37 -06:00
Will Dietz
0ac504227d make-bootstrap-tools: initial musl support, less glibc-specific 2018-02-13 09:44:37 -06:00
Will Dietz
4831495995 make-bootstrap-tools: glibc -> libcCross 2018-02-13 09:44:37 -06:00
Will Dietz
5dcf3cdf37 stdenv: automatically update config.sub for musl 2018-02-13 09:44:36 -06:00
Will Dietz
5ac5a3ebb5 make-bootstrap-tools-cross.nix: add musl -> musl64 2018-02-13 09:44:35 -06:00
Tuomas Tynkkynen
a6fd03876e check-meta: Use concatStrings 2018-02-11 00:17:47 +02:00
Vladimír Čunát
03eef81727
darwin bootstrap tools: fix after #34339 (http2 in curl) 2018-02-10 19:20:44 +01:00
Franz Pletz
c135ecd7ef
Merge remote-tracking branch 'origin/master' into gcc-7 2018-02-05 13:11:33 +01:00
Tuomas Tynkkynen
6a11ebfae9 Merge remote-tracking branch 'upstream/master' into gcc-7
Conflicts:
	pkgs/development/compilers/gcc/7/default.nix
	pkgs/development/libraries/SDL2/default.nix
	pkgs/top-level/all-packages.nix
2018-01-26 16:46:43 +02:00
Shea Levy
f83b6e1130
unpackPhase: Handle sources starting with a hyphen 2018-01-24 21:58:57 -08:00
John Ericson
5a754e75b4 Merge branch 'ericson2314-cross-master' into staging 2018-01-16 13:05:39 -05:00
Vladimír Čunát
67e8392383
Merge #33057: stdenv meta checks: make them lazy
Closes #22277 - it's superseded;  I have some WIP on evaluation
performance, but best do that in a separate PR/thread.
2018-01-14 21:41:31 +01:00
Tuomas Tynkkynen
6ed0fe7e45 Merge remote-tracking branch 'upstream/master' into staging
Conflicts:
	pkgs/build-support/fetchbower/default.nix
	pkgs/build-support/fetchdarcs/default.nix
	pkgs/build-support/fetchgx/default.nix
	pkgs/development/python-modules/botocore/default.nix
	pkgs/os-specific/linux/firmware/firmware-linux-nonfree/default.nix
	pkgs/tools/admin/awscli/default.nix
2018-01-14 21:18:27 +02:00
Jan Malakhovski
fac3d49e48 stdenv: provide meta.name 2018-01-14 13:24:30 +00:00
Jan Malakhovski
50148f0630 stdenv: hide name under check-meta assert
This is a temporary workaround to make `nix-env -qa` and `nix search` ignore
broken packages as they they did before this patchset.

This patch should be reverted after `nix` gets a proper fix for this.
See NixOS/nix#1771.
2018-01-14 13:24:30 +00:00
Jan Malakhovski
eaee2a1199 stdenv: implement config.checkMetaRecursively
This option makes `meta.evaluate` into a close approximation of the result of
evaluating `.outPath` by checking all the dependencies recursively at a cost of
2x slowdown. Note that actually evaluating `.outPath` costs some
5x-7x more because `.outPath` also computes all the hashes.
2018-01-14 13:24:30 +00:00
Jan Malakhovski
ecd3990cd4 stdenv: provide meta.evaluates
This gives a way to see the result of `check-meta` without triggering any assertions.
2018-01-14 13:24:29 +00:00
Jan Malakhovski
9956687151 stdenv: change some indent 2018-01-14 13:24:22 +00:00
John Ericson
e017a027d5
Merge pull request #33681 from obsidiansystems/fixed-output-deps
Fixed output deps
2018-01-10 14:28:10 -05:00
John Ericson
940c4fa3f5 treewide: Fetchers should use stdenvNoCC. 2018-01-10 11:18:44 -05:00
John Ericson
c836910e0e
Merge pull request #33670 from obsidiansystems/cross-check
stdenv: Fix doCheck and doInstallCheck logic
2018-01-09 16:37:11 -05:00
John Ericson
567feb3a54 stdenv: Fix doCheck and doInstallCheck logic
It's host != build, not host != target
2018-01-09 16:22:58 -05:00
John Ericson
06a8d66528
Merge pull request #33603 from obsidiansystems/cross-check
stdenv: Force `doCheck` to be false when we are cross compiling
2018-01-09 15:09:54 -05:00
John Ericson
4e907dbca1 stdenv: Force doCheck and doInstallCheck to be false when we are cross compiling
I hope this will be a temporary measure. If there is consensus around
issue #33599, then we can follow an explicit `dontCheck`, but default to
not checking during cross builds when none is given.
2018-01-09 12:37:12 -05:00
Will Dietz
9721ed22e8 schedulingPriority should be an int, fix check-meta type and in-tree use 2018-01-09 07:25:24 -06:00
adisbladis
c2316114bc
stdenv: Kill off ensureDir 2018-01-09 11:14:48 +08:00
Daiderd Jordan
e66a5f8862
Merge pull request #33342 from LnL7/clang-outputs
clang: add lib output
2018-01-07 09:43:38 +01:00
Jan Malakhovski
d1d5ecb3bf stdenv: perform checks only when evaluating .drv and .out
This pushes check-meta evaluation to derivation evaluation step, leaving all other
attributes accessible.

Before this commit:

> $ HOME=/homeless-shelter NIX_PATH=nixpkgs=$(pwd) nix-instantiate --eval --strict ./default.nix -A xen --argstr system aarch64-linux
> Package ‘xen-4.5.5’ in pkgs/applications/virtualization/xen/generic.nix:226 is not supported on ‘aarch64-linux’, refusing to evaluate.

as expected

> $ HOME=/homeless-shelter NIX_PATH=nixpkgs=$(pwd) nix-instantiate --eval --strict ./default.nix -A xen.name --argstr system aarch64-linux
> Package ‘xen-4.5.5’ in pkgs/applications/virtualization/xen/generic.nix:226 is not supported on ‘aarch64-linux’, refusing to evaluate.

> $ HOME=/homeless-shelter NIX_PATH=nixpkgs=$(pwd) nix-instantiate --eval --strict ./default.nix -A xen.meta.description --argstr system aarch64-linux
> Package ‘xen-4.5.5’ in pkgs/applications/virtualization/xen/generic.nix:226 is not supported on ‘aarch64-linux’, refusing to evaluate.

which is unfortunate since its impossible to use packages in autogenerated
documentation on all platforms.

After this commit:

> $ HOME=/homeless-shelter NIX_PATH=nixpkgs=$(pwd) nix-instantiate --eval --strict ./default.nix -A xen --argstr system aarch64-linux

still fails

> $ HOME=/homeless-shelter NIX_PATH=nixpkgs=$(pwd) nix-instantiate --eval --strict ./default.nix -A xen.name --argstr system aarch64-linux
> "xen-4.5.5"

> $ HOME=/homeless-shelter NIX_PATH=nixpkgs=$(pwd) nix-instantiate --eval --strict ./default.nix -A xen.meta.description --argstr system aarch64-linux
> "Xen hypervisor and related components (vanilla)"
2018-01-03 12:20:25 +00:00
Daiderd Jordan
b0c043d26c
stdenv: allow lib output of clang on darwin 2018-01-02 20:00:31 +01:00
John Ericson
ab651d2c9b linux bootstrap tools: Use same derivation whether cross compiling or not 2018-01-02 13:52:41 -05:00
John Ericson
4d2b763817
Merge pull request #26805 from obsidiansystems/cross-elegant
Make cross compilation elegant
2017-12-30 22:58:02 -05:00
John Ericson
469fd89832 stdenv-setup: Ease the transition with native builds
- All deps go on the PATH

 - CC and Bintools wrappers with their host != depender's host still get their
   setup hooks run.

 - Environment hooks get applied to all packages

This isn't so elegent, but eases the transition on a very significant
PR.
2017-12-30 22:04:23 -05:00
John Ericson
f083248290 linux bootstrap tools cross: Nuke more refs
libgcc.a and similar
2017-12-30 22:04:23 -05:00
John Ericson
a036473a0a {bintools,cc}-wrapper: Fix setup hook to respect the role of the cc-compiler
We now have the information to properly determine the role the
cc-wrapper dependency has, by taking advantage of `offset`. No longer
use the soon-to-be-deprecated crossConfig environment variable, the
temp hack used before this change.
2017-12-30 22:04:21 -05:00
John Ericson
7f3ca3e21a stdenv: Fix handling of dependencies and hooks
4 far-reaching changes: Smaller PATH, New vars, different propagation
logic, and different hook logic

Smaller PATH
------------

`buildInputs` no longer go on the PATH at build time, as they cannot be
run when cross compiling and we don't want to special case. Simply make
a `nativeBuildInput` too if one needs them on the PATH. Fixes #21191.

Many new depedendency variables
-------------------------------

See the stdenv chapter of the nixpkgs manual. I pulled out the existing
documentation of dependency specification into a new section, and added
language for these two (and their propagated equivalents) along side
the others'.

More complex propagation logic
------------------------------

Before a propagated*XXX*Input always acted as if it was specified
directly as a *XXX*Input downstream. That's simple enough, but violates
the intended roles of each sort of dep, which has functional and not
just stylistic consequences.

The new algorithm is detailed in the manual, and ensures everything
ends up in the right place. I tried to give both an informal and formal
description, but I suspect in practice it will not make much sense
until one tries cross compiling, after which it will immediately make
sense as the only sane option.

Simplified hook logic
---------------------

Rather than `envHook` and `crossEnvHook`, whose behavior differs
depending on whether we are cross compiling or not, there is now one
hook per sort (or rather non-propagated and propagated pair of sorts)
of dependency. These new hooks have the same meaning regardless of
cross compilation. See the setup hook section of stdenv chapter of the
Nixpkgs manual for more details.
2017-12-30 22:04:21 -05:00
John Ericson
eb27be0731
Merge pull request #33186 from obsidiansystems/cross-binutils
binutils: Fix cross, again
2017-12-29 17:42:38 -05:00
John Ericson
1cde06acf6 stdenv cross adapter: Get rid of extra propagatation of buildInputs
Binutils is patched so we don't rely on `--rpath-link`.
2017-12-29 17:32:28 -05:00
Tuomas Tynkkynen
47c782f7f5 Merge remote-tracking branch 'upstream/master' into staging 2017-12-26 21:10:12 +02:00
John Ericson
4651407654 darwin stdenv: Make stdenv.cc, not stdenv, bring in libcxx
stdenvNoCC should not inject any C++ standard library, just as it
doesn't inject any C standard library. stdenv still does, but only
indirectly through stdenv.cc. Wrapped clangs can be simplified now that
they don't need to worry about clobbering CoreFoundation when replacing
the C++ standard library implementation.

This generally-good cleanup should assist with debugging some C++
failures in #26805.
2017-12-25 19:32:07 -05:00
Vladimír Čunát
ced4e5a683
darwin stdenv boostrap tools: use curl without kerberos
/cc #29785.  Otherwise we would have to put the lib in, etc.
2017-12-24 11:10:10 +01:00
Vladimír Čunát
24d81d6332
Merge branch 'master' into staging 2017-12-15 21:40:23 +01:00
Graham Christensen
ae9a7c4969
stdenv: make knownVulnerabilities a known meta-type 2017-12-14 07:36:31 -05:00
John Ericson
a0b1ebeee9 Merge remote-tracking branch 'upstream/staging' into binutils-wrapper 2017-12-13 16:14:47 -05:00
John Ericson
2bba929062 bintools-wrapper: Import separately from cc-wrapper 2017-12-13 16:08:18 -05:00
Graham Christensen
f33a513d2b
stdenv: allow specifying a eval issuee handler 2017-12-12 18:08:11 -05:00
Vladimír Čunát
76bf375a16
stdenv checkMeta: throw -> trace
- tracing seems annoying enough
- we get errors for all packages instead of aborting on the first one
- easier to differentiate from unwanted packages (broken, unfree, etc.)
2017-12-12 18:07:07 -05:00
Will Dietz
db7bee240e stdenv: fix use of config-specified allowInsecurePredicate
for some reason we were checking allowUnfreePredicate instead
2017-12-09 20:43:30 +00:00
Jan Malakhovski
1858e8909e tree-wide: fix either check-meta or meta attrs of all the packages I evaluate 2017-12-05 13:46:52 +01:00
Jan Malakhovski
8ae51ff9c1 stdenv/generic/check-meta: fix error message evaluation 2017-12-05 13:46:52 +01:00
John Ericson
405412dfd9
Merge pull request #31775 from obsidiansystems/stdenv-both-propagated-files
stdenv setup: Always use both propagated files
2017-11-22 15:23:37 -05:00
John Ericson
da19c34d0f stdenv setup: Always use both propagated files
This continues #23374, which always kept around both attributes, by
always including both propagated files: `propgated-native-build-inputs`
and `propagated-build-inputs`. `nativePkgs` and `crossPkgs` are still
defined as before, however, so this change should only barely
observable.

This is an incremental step to fully keeping the dependencies separate
in all cases.
2017-11-21 10:44:44 -05:00
Orivej Desh
d99a2fc093 Merge branch 'master' into staging
* master: (293 commits)
  go_1_9: skip flaky TestServerCancelsReadTimeoutWhenIdle
  qsyncthingtray: fix build
  qt56.qtwebengine: fix build
  stdman: d860212 -> 2017.04.02
  jackett: use mono50
  hg-git: disable with python3
  hg-git: 0.8.5 -> 0.8.10
  xfce4-settings: enable parallel building
  gcc-snapshot: mark as broken
  heaptrack: 2017-02-14 -> 2017-10-30
  nixos-container: Modify existing test to cover show-ip command
  nixos-container: Make show-ip work together with ipv4 + netmask
  linux-copperhead: 4.13.12.a -> 4.13.13.a
  matterbridge: 1.1.0 -> 1.4.1
  nixos/nghttpx: add module for the nghttpx proxy server (#31680)
  mattermost: 4.3.0 -> 4.4.0
  breakpad: delete
  simp_le: 0.2.0 -> 0.6.1
  certbot: 0.11.1 -> 0.19.0
  afl: 2.51b -> 2.52b
  ...
2017-11-17 05:35:09 +00:00
John Ericson
b26038fa54
Merge pull request #31723 from obsidiansystems/stdenv-accum-them-setup
stdenv setup: Run setup hooks and other processing after accumulating deps
2017-11-16 10:42:39 -05:00
John Ericson
6a5cda5131 stdenv setup: Run setup hooks and other processing after accumulating deps
I find the separation of concerns, accumulating, then processing, easier
to follow. Also, with my yet-to-be-merged cross work, the accumulation
part will become more complex.
2017-11-15 18:51:06 -05:00
Vladimír Čunát
72b98b8b60
darwin.stdenv: fix a typo in comment ;-) 2017-11-14 21:13:53 +01:00
John Ericson
728446f755
Merge pull request #30484 from obsidiansystems/libbfd
bfd, opcodes: Init separate derivations for binutils libraries
2017-11-14 12:10:44 -05:00
Dan Peebles
49a5791bc4 darwin.stdenv: fix up to allow sandboxing 2017-11-14 10:36:04 -05:00
Dan Peebles
f82063ed20 darwin.stdenv: use new, purer, bootstrap tools
This is the first step to getting a sandboxable nixpkgs
2017-11-13 21:03:45 -05:00
Dan Peebles
d5bdfcbfe6 darwin.make-bootstrap-tools: fix ICU reference to improve purity 2017-11-13 20:27:11 -05:00
Michael Raskin
bd8cd3eaed Revert switching hello to fetchipfs, re: #18296 2017-11-13 17:45:16 +01:00
John Ericson
ff023c9bc6 treewide: Remove references to removed binutils outputs 2017-11-13 08:46:15 -05:00
Vladimír Čunát
f6655ba128
bootstrap tools test: fixup after d71833ee36 2017-11-11 21:41:42 +01:00
Vladimír Čunát
1862b77b5d
Merge branch 'staging' into gcc-7 2017-11-11 20:33:50 +01:00
John Ericson
4d4f94cde4 treewide: Depend on targetPackages.stdenv.cc.bintools instead of binutils directly
One should do this when needed executables at run time. It is more
honest and cross-friendly than refering to binutils directly, if one
neeeds the default binary tools for the target platform, rather than
binutils in particular.
2017-11-05 17:10:53 -05:00
John Ericson
5ae8f18f4d Rename __targetPackages to targetPackages 2017-11-05 17:10:53 -05:00
Dan Peebles
b426c85ce2 Get rid of most @rpath nonsense on Darwin
This requires some small changes in the stdenv, then working around the
weird choice LLVM made to hardcode @rpath in its install name, and then
lets us remove a ton of annoying workaround hacks in many of our Go
packages. With any luck this will mean less hackery going forward.
2017-10-08 16:13:46 -04:00
John Ericson
f037625f87 Merge remote-tracking branch 'upstream/staging' into deps-reorg 2017-09-28 12:32:57 -04:00
John Ericson
d349f9a340 cc-wrapper: Use stdenvNoCC to build
cc-wrapper may wrap a cc-compiler, but it doesn't need one to build
itself. (c.f. expand-response-params is a separate derivation.) This
helps avoid cycles on the cross stuff, in addition to removing a
useless dependency edge.

I could have been super careful with overrides in the stdenv to avoid
the mass rebuild, but I don't think it's worth it.
2017-09-26 14:08:21 -04:00
John Ericson
f6fcb9bc0d stdenv: Turn on set -x if NIX_DEBUG >= 6
Why 6? It seems a decently high number, giving us room for more degrees
of debugging before the `set -x` sledgehammer without incurring a
mass-rebuild.
2017-09-26 11:24:19 -04:00
John Ericson
127a5f3357 treewide: Use (( "${NIX_DEBUG:-0}" >= 1) )) consistently 2017-09-26 11:24:19 -04:00
Vladimír Čunát
e8bd4102c6
Merge branch 'master' into gcc-7 2017-09-25 12:37:31 +02:00
John Ericson
7a733ceda4 cross stdenv: No more native-fishing hack.
The comment says it was put there for pkgconfig, but now pkgconfig has
been dealt with.
2017-09-21 15:49:54 -04:00
John Ericson
b9bf90ca6c all-packages: Remove gccCrossStageFinal; any gcc will not work 2017-09-21 15:49:18 -04:00
John Ericson
3af3d6efc2 stdenv cross adapater: Remove old extraBuildInputs
They, unlike their native counterparts, run on the wrong platform and
are therefore invalid.
2017-09-21 14:52:42 -04:00
John Ericson
05ef1034c7 stdenv cross adaptor: Add optional overrides parameter
By default, all previous overrides are discarded as before, as they
would only apply to the old host platform. But sometimes it is useful to
add some new ones, and this optional parameter allows that.
2017-09-21 14:52:07 -04:00
John Ericson
738bb4777c stdenv: Update autotools scripts on all Aarch64, not just Linux
This is needed when cross-compiling for iOS (Aarch64 + Darwin). I also
changed the syntax of the Linux stdenv for visual consistency, though
that has no effect on semantics as the os is already guaranteed to be
Linux.
2017-09-21 14:40:40 -04:00
John Ericson
51179c6e88 stdenv: Add back leading '-' in cross derivation name suffix
I messed this up when I moved the logic from `makeStdenvCross` in
e826a6a247.
2017-09-18 18:59:48 -04:00
John Ericson
77bd6313bb darwin stdenv: cctools override needs to go away when targetPlatform changes 2017-09-18 14:39:38 -04:00
John Ericson
bf7b521500 treewide: Fix some references to binutils
- Compiler's shouldn't use `binutils.dev` as that doesn't yet exist
   with a cross binutils.

 - Last two `binutils.binutils` which weren't reverted
2017-09-14 18:12:54 -04:00
Vladimír Čunát
c86eb1da5f
stdenv bootstrap: fix evaluation
This is probably a fallout from #28557 merge and revert.
I can't see why exactly this happened, but it seems a safe fix.
2017-09-10 11:16:47 +02:00
Eelco Dolstra
0061fae2e6 genericBuild: Communicate the current build phase to Nix
This allows the progress bar to show e.g.

  [1/9/59 built] building bison-3.0.4 (configurePhase): checking for strdup... yes
2017-09-07 22:24:27 +02:00
Eelco Dolstra
6b3cef2246 Remove tracePhases
This has not been used in a long time.
2017-09-07 22:15:37 +02:00
Eelco Dolstra
ec8d41f08c
Revert "Merge pull request #28557 from obsidiansystems/binutils-wrapper"
This reverts commit 0a944b345e, reversing
changes made to 61733ed6cc.

I dislike these massive stdenv changes with unclear motivation,
especially when they involve gratuitous mass renames like NIX_CC ->
NIX_BINUTILS. The previous such rename (NIX_GCC -> NIX_CC) caused
months of pain, so let's not do that again.
2017-09-07 12:51:21 +02:00