Commit graph

747 commits

Author SHA1 Message Date
Vladimír Čunát 4dccb224c5 WIP2 2014-08-26 01:10:56 +02:00
Vladimír Čunát 3ec413cece WIP 2014-08-25 15:30:46 +02:00
Vladimír Čunát 77da5efc78 merge the rest of multiple-outputs
Conflicts:
	pkgs/development/libraries/glibc/2.19/builder.sh (previous merge taken)
	pkgs/development/tools/misc/patchelf/default.nix (easy)
	pkgs/stdenv/generic/setup.sh (previous merge taken)
2014-08-25 10:41:49 +02:00
Vladimír Čunát def75f0282 stdenv: add first iteration of the multiout hook
Now it should contain *all* information from stdenv/setup.sh of
the original mutiple-output branch.
However, the configurability of the output paths is much greater.
2014-08-24 19:07:47 +02:00
Vladimír Čunát 4e72b61de9 stdenv/setup.sh: add $propagateIntoInput
This is needed for multiple-output derivations,
where it is desirable to propagate deps and setup-hooks into $dev instead of $out.

Also drop an unused simple function which will not even make sense.
2014-08-24 18:37:23 +02:00
Vladimír Čunát a835b282fe another fixup: stripFlags 2014-08-23 18:42:33 +02:00
Vladimír Čunát 96cec2a7bd Merge 'staging' into multiple-outputs
Conflicts:
	pkgs/applications/audio/flac/default.nix
	pkgs/build-support/gcc-wrapper/builder.sh
	pkgs/development/libraries/apr-util/default.nix
	pkgs/development/libraries/apr/default.nix
	pkgs/development/libraries/atk/default.nix
	pkgs/development/libraries/freetype/default.nix
	pkgs/development/libraries/gdk-pixbuf/default.nix
	pkgs/development/libraries/glib/default.nix
	pkgs/development/libraries/glibc/2.17/builder.sh
	pkgs/development/libraries/glibc/2.17/locales.nix
	pkgs/development/libraries/libjpeg/default.nix
	pkgs/development/libraries/libogg/default.nix
	pkgs/development/libraries/libsamplerate/default.nix
	pkgs/development/libraries/libtiff/default.nix
	pkgs/development/libraries/libvorbis/default.nix
	pkgs/development/libraries/mesa/default.nix
	pkgs/development/libraries/pango/default.nix
	pkgs/development/web/nodejs/default.nix
	pkgs/os-specific/linux/pam/default.nix
	pkgs/os-specific/linux/systemd/default.nix
	pkgs/stdenv/generic/setup.sh
	pkgs/stdenv/linux/default.nix
	pkgs/top-level/all-packages.nix
	pkgs/top-level/release-small.nix
2014-08-23 16:04:53 +02:00
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 262c21ed46 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 c556a6ea46.
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