Commit graph

331 commits

Author SHA1 Message Date
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
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 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 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 b3b9c51b34 Add a deprecation warning to ensureDir 2014-06-30 14:57:12 +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
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
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 1d6ac39d21 Fix indentation 2014-04-18 21:50:00 +02:00
Domen Kožar 753639e548 typo 2014-04-14 10:27:36 +02:00
Domen Kožar 722143a5d3 fix typo 2014-04-14 09:29:41 +02:00
Alexander Kjeldaas ebe8fab999 Make the user aware of the allowUnfree option. 2014-04-14 09:24:01 +02:00
Eelco Dolstra 331fa06c79 Add a flag ‘config.allowBroken’ 2014-04-09 00:13:52 +02:00
Eelco Dolstra 627923d5b7 Replace $HYDRA_DISALLOW_UNFREE with $NIXPKGS_ALLOW_UNFREE
We've never used this environment variable in Hydra (except for a few
days). This is also more consistent with $NIXPKGS_ALLOW_BROKEN.
2014-04-09 00:12:48 +02:00
Eelco Dolstra e09250d41c Disable allowUnfree by default
Fixes #2134.
2014-04-09 00:09:31 +02:00
Vladimír Čunát c4371afd06 stdenv/setup.sh: make substitute* not drop EOF newline
This should solve #1982.
2014-04-02 19:07:59 +02:00
Vladimír Čunát 1f6a15d7de Merge #1901: add preFixupPhases to stdenv; for gsettings
Without this stdenv change it seems difficult to fix some glib's gsettings issues,
as the folders in question may (not) be created in installPhase.
2014-04-02 19:06:41 +02:00
Eelco Dolstra 14af15dbff Explicitly require Nix 1.6
People using Nix < 1.6 previously got an unhelpful "infinite
recursion" error.
2014-03-17 11:33:36 +01:00
Eelco Dolstra 80647127a3 Turn the coverage analysis stdenv adapters into setup hooks
Stdenv adapters are kinda weird and un-idiomatic (especially when they
don't actually change stdenv).  It's more idiomatic to say

  buildInputs = [ makeCoverageAnalysisReport ];
2014-02-05 19:18:33 +01:00
Eelco Dolstra 58a863268a stdenv: Simplify 2014-02-05 19:18:33 +01:00
Eelco Dolstra c3d84d15ce Apply makeOverridable to stdenv
This removes the need for hacks like stdenv.regenerate.  It also
ensures that overrideGCC is now stackable (so ‘stdenv = useGoldLinker
clangStdenv’ works).
2014-02-05 19:18:33 +01:00
Vladimír Čunát 204ec0cd43 stdenv/setup.sh: add .gz extension to links to .gz man pages
The links weren't broken since 0a44a09, but man showed garbage.
Tested on several packages (sudo, dosfstools, xz).
2014-01-20 22:11:14 +01:00
Eelco Dolstra 48f87d5d2a fixupPhase: Handle the case where $prefix doesn't exist
http://hydra.nixos.org/build/8149154
2014-01-17 12:41:08 +01:00
Eelco Dolstra 5ad0728dfc stdenv: In the fixupPhase, make the output writable first
Cherry-picked from 1d11c1dc48 in the
multiple-outputs branch.
2014-01-14 14:21:27 +01:00