Commit Graph

725 Commits

Author SHA1 Message Date
Eelco Dolstra
2c62a36b77 Merge remote-tracking branch 'origin/staging' into modular-stdenv
Conflicts:
	pkgs/stdenv/generic/default.nix
2014-08-22 00:07:05 +02:00
Luca Bruno
b83aceaecb Merge branch 'master' into staging 2014-08-14 23:09:59 +02:00
Vladimír Čunát
d1ed0f44cd Merge #2823: better cygwin support, also add x86_64
Conflicts (easy):
	pkgs/development/interpreters/perl/5.16/default.nix
2014-08-14 20:38:09 +02:00
Vladimír Čunát
e80f41f35e Merge pull request #2455 from bjornfor/helpful-messages-when-refusing-eval
More helpful message when refusing to evaluate "broken" package
2014-08-12 20:18:10 +02:00
Eelco Dolstra
9e31c66d1b stdenv: Put moving docs to $out/share in a separate setup hook 2014-08-09 12:47:05 +02:00
Eelco Dolstra
2db867eec9 fixupPhase: Fix making the outputs writable 2014-08-09 12:47:05 +02:00
Eelco Dolstra
11dc9036d0 Allow passing arguments to hooks
This allows envHooks and crossEnvHooks to be handled using the regular
hook mechanism.
2014-08-09 12:47:05 +02:00
Eelco Dolstra
2def8e7499 Remove addHook
Just use bash arrays directly. I.e.

  addHook preConfigure myPreConfigure

is now

  preConfigureHooks+=(myPreConfigure)
2014-08-09 12:45:53 +02:00
Eelco Dolstra
e3875297fa stdenv: Don't use sed to build the setup script 2014-08-09 12:45:52 +02:00
Eelco Dolstra
be3fc3ae2f Prevent an unnecessary evaluation of lib 2014-08-09 12:45:18 +02:00
Eelco Dolstra
cd948c093f stdenv: Reindent 2014-08-09 12:44:50 +02:00
Eelco Dolstra
15103e5e5f stdenv: Remove the special handling of gcc
Now gcc is just another build input, making it possible in the future
to have a stdenv that doesn't depend on a C compiler. This is very
useful on NixOS, since it would allow trivial builders like
writeTextFile to work without pulling in the C compiler.
2014-08-09 12:44:50 +02:00
Eelco Dolstra
9f822e5477 stdenv: Move paxmark function to paxctl's setup hook 2014-08-09 12:44:50 +02:00
Eelco Dolstra
d7b356f73b stdenv: Move unzip support to unzip's setup hook 2014-08-09 12:44:50 +02:00
Eelco Dolstra
3e33c975fb stdenv: Make unpackFile extensible via the hook mechanism
unpackCmd is now a regular hook, so there can be multiple functions
hooking into it.
2014-08-09 12:44:49 +02:00
Eelco Dolstra
1a44dbbbb9 unpackFile: Always copy directories
If $src refers to a directory, then always copy it. Previously, we
checked the extension first, so if the directory had an extension like
.tar, unpackPhase would fail.
2014-08-09 12:44:49 +02:00
Eelco Dolstra
daa66b8b1c Factor out fixup phase stuff into separate setup hooks 2014-08-09 12:44:49 +02:00
Eelco Dolstra
83a41771ab Move RPATH shrinking from stdenv to a setup hook provided by patchelf 2014-08-09 12:44:49 +02:00
Eelco Dolstra
b23dbb1a5d Allow buildInputs to be regular files
If a build input is a regular file, use it as a setup hook. This makes
setup hooks more efficient to create: you don't need a derivation that
copies them to $out/nix-support/setup-hook, instead you can use the
file as is.
2014-08-09 12:44:49 +02:00
Eelco Dolstra
0a8605ded1 Formatting 2014-08-09 12:44:48 +02:00
Eelco Dolstra
37889e2b5e Provide a hook for per-output fixup 2014-08-09 12:44:48 +02:00
Eelco Dolstra
b0f2d3419c Allow multiple hooks with the same name
You can now register multiple values per named hook, e.g.

  addHook preConfigure "echo foo"
  addHook preConfigure "echo bar"

will cause ‘runHook preConfigure’ to run both ‘echo foo’ and ‘echo
bar’ (in that order). It will also call the shell function
preConfigure() or eval the shell variable $preConfigure, if
defined. Thus, if you don't call addHook, it works like the old hook
mechanism.

Allowing multiple hooks makes stdenv more modular and extensible. For
instance, multiple setup hooks can define a preFixup hook, and all of
these will be executed.
2014-08-09 12:44:48 +02:00
Michael Raskin
0769fc5b77 Set CONFIG_SHELL to stdenv.shell in the default builder, just like SHELL 2014-07-30 16:44:28 +02:00
Eelco Dolstra
3e4a382d67 Doh 2014-07-28 09:37:23 +02:00
Eelco Dolstra
fb4e2e112f Export SDKROOT 2014-07-28 09:14:13 +02:00
Eelco Dolstra
ac8775dd96 $xcodePath -> $SDKROOT
SDKROOT is standard. In particular, this fixes the cmake build on
Mac OS X 10.9.
2014-07-24 21:53:46 +02:00
Eelco Dolstra
bf0d518c67 stdenv-darwin: Shut up some warnings from SDK headers
The Carbon headers spew out zillions of multichar / deprecations warnings,
which isn't very helpful. So turn them off.
2014-07-23 11:47:46 +02:00
Eelco Dolstra
fd1a5d8531 Set MACOSX_DEPLOYMENT_TARGET
This variable sets the minimal Mac OS X version required for
running binaries produced by the Darwin toolchain. Since it
defaults to the version of the user's SDK, setting it explicitly
should make our builds more deterministic. It's now set to 10.6
because that's what hydra.nixos.org runs.
2014-07-02 19:52:25 +02:00
Eelco Dolstra
0da7fadce3 stdenv: Fix __ignoreNulls
Commit 262c21ed464a2593b54ec274a3b84083c0795f2d purported to enable
ignoreNulls, but it was bogus because it set the flag on the wrong
derivation (i.e. stdenv rather than the result of mkDerivation).
2014-07-01 16:56:36 +02:00
Eelco Dolstra
0d8014f6fc Darwin: Search for libraries in $sdk/usr/lib
This required adding a new environment variable NIX_LDFLAGS_AFTER
that ensures that the -L.../usr/lib flag happens last.
2014-07-01 15:56:09 +02:00
Eelco Dolstra
89f8af55f1 Darwin: Use xcrun to get the path to the SDK
Recent versions of Xcode don't install headers in /usr/include but
in a directory like

  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include

So use that instead, falling back to /usr/include in case of an older
version of Xcode.
2014-07-01 11:01:36 +02:00
Eelco Dolstra
b3b9c51b34 Add a deprecation warning to ensureDir 2014-06-30 14:57:12 +02:00
Eelco Dolstra
40f7b0f9df Another attempt to eradicate ensureDir
See c556a6ea46e71e1907d78b71fab36df30297b3ad.
2014-06-30 14:56:10 +02:00
Eelco Dolstra
47075812ce Remove the unmaintained (and AFAIK unused) stdenv for mingw 2014-06-30 13:31:08 +02:00
Bjørn Forsman
ff999c31aa Factor out allowUnfree,allowBroken help message
DRY.
2014-06-21 15:05:48 +02:00
Bjørn Forsman
abfaf42333 More helpful message when refusing to evaluate "broken" package
A "broken" package is one where either "meta.broken = true" or build
platform != meta.platforms.
2014-06-21 15:04:39 +02:00
Eelco Dolstra
e5d63646a0 Don't suggest using --arg config '{ allowUnfree = true; }'
This doesn't work when using the Nixpkgs/NixOS channel.

Issue #2998.
2014-06-17 15:00:24 -05:00
Vladimír Čunát
9757785295 Merge recent master 2014-06-15 17:55:35 +02:00
Michael Raskin
a076a60735 Allow specifying allowUnfreePredicate instead of allowUnfree. The predicate will have access to the arguments of mkDerivation call. Should be an improvement for #2188 2014-06-14 13:01:12 +04:00
Vladimír Čunát
5a98b9f514 Merge recent master into p/stdenv
Merged just before the pypi update, as it seems to cause problems on Hydra.
2014-06-09 19:07:31 +02:00
Sander van der Burg
9ec52d6323 Fixes to make basic builds on Cygwin work again + additions to support x86_64-cygwin 2014-05-29 14:47:07 +02:00
John Wiegley
27ecc1c9e9 Change stdenv on darwin to not set NIX_ENFORCE_PURITY 2014-05-29 02:43:10 -05:00
Vladimír Čunát
3d3aea09b9 fix paxmark on non-linux (a bug in grsecurity PR #1187) 2014-05-15 13:25:49 +02:00
Ricardo M. Correia
8d5ce245a2 grsecurity: Add paxctl, paxmark and stdenv.needsPax to stdenv 2014-05-15 13:25:46 +02:00
Domen Kožar
73e82b9e07 s/config.allowUnfree = true/allowUnfree = true/ 2014-05-03 15:13:01 +02:00
Eelco Dolstra
5ba24cc8ea Typo/comment 2014-04-22 18:42:44 +02:00
Eelco Dolstra
4e8c2f0ff9 Merge branch 'systemd-update' 2014-04-20 19:31:01 +02:00
Eelco Dolstra
b614ea22d4 Move files 2014-04-20 01:27:15 +02:00
Eelco Dolstra
d4f44d6db3 Move stdenv bootstrap binaries out of the tree
Commit 986f36194650e2a41451cbfb9f29ce1c66a62df3 started to use
<nix/fetchurl.nix> to "download" the bootstrap binaries from the
Nixpkgs tree, using the file:/// scheme. This has really bad
consequences:

* It makes any derivation depend on the path of the Nixpkgs tree. So
  evaluating a package will produce a different .drv file when run
  from different locations. No wonder Hydra evaluation has been so
  slow lately: for every Nixpkgs evaluation, it had to create tens of
  thousands of .drv files, even if nothing had changed.

* It requires the builder to have file system access to the Nixpkgs
  tree. So if your tree is in your home directory, the stdenv
  bootstrap would probably fail.

So now the binaries are downloaded from tarballs.nixos.org.

Also dropped PowerPC "support".
2014-04-20 01:16:12 +02:00
Eelco Dolstra
c49404547b Use <nix/fetchurl.nix> to download the bootstrap tools 2014-04-20 00:54:09 +02:00