Commit graph

491 commits

Author SHA1 Message Date
Eelco Dolstra 9ae86dc3fc Ensure that errexit is honoured in hooks
Partial fix for #7524.
2015-05-13 18:17:25 +02:00
Vladimír Čunát 375bc8def7 Merge staging into closure-size 2015-05-05 11:49:03 +02:00
Vladimír Čunát 30f31c9afc Merge 'master' into staging
(relatively simple conflicts)
2015-04-26 22:52:08 +02:00
William A. Kennington III 232b71c6e8 Fix some platforms 2015-04-25 21:27:53 -07:00
Vladimír Čunát d484c392aa stdenv multiple-outputs: change propagation rules
Now development stuff is propagated from the first output,
and userEnvPkgs from the one with binaries.

Also don't move *.la files (yet). It causes problems, and they're small.
2015-04-18 19:30:28 +02:00
Vladimír Čunát bf414c9d4f Merge 'staging' into closure-size
- there were many easy merge conflicts
- cc-wrapper needed nontrivial changes

Many other problems might've been created by interaction of the branches,
but stdenv and a few other packages build fine now.
2015-04-18 11:22:20 +02:00
William A. Kennington III 7ccccc15ba Merge branch 'master' into staging 2015-03-27 16:03:03 -07:00
Eelco Dolstra 5c0eb64d43 Set more precise meta.position for Haskell packages 2015-03-27 16:17:48 +01:00
Eelco Dolstra 8b2f209838 mkDerivation: Use function arguments 2015-03-27 16:17:48 +01:00
William A. Kennington III afa998eb32 stdenv: Substitute correctly chmods instead of .tmp which never exists 2015-03-26 15:44:54 -07:00
Eelco Dolstra bda440a7b3 substitute: Fix "No such file or directory" message on Darwin
On Darwin, "chmod -f" does not suppress an error message if the file
doesn't exist. So just check if the file exists.
2015-03-24 14:12:24 +01:00
codyopel e29b0da9c7 remove stdenv.isBSD 2015-02-24 22:15:51 -05:00
Vladimír Čunát dbae4f109f Merge branch 'master' into staging
Conflicts (relatively simple):
	pkgs/applications/audio/spotify/default.nix
	pkgs/build-support/cc-wrapper/default.nix
	pkgs/development/compilers/cryptol/1.8.x.nix
2015-01-31 19:34:57 +01:00
Wout Mertens ef2e0ffdea stdenv: fix eval - the return 2015-01-29 10:54:07 +01:00
Wout Mertens 006769be70 stdenv: fix eval
silly 💩
2015-01-29 10:46:35 +01:00
Wout Mertens 0feb19b6b4 stdenv: take license parameter checks out of mkDerivation path 2015-01-29 10:38:33 +01:00
Matthias Beyer aca361fa49 Add (optional) license white/blacklisting 2015-01-24 17:28:50 +01:00
Wout Mertens 4b82bd683e Merge pull request #5714 from vcunat/p/stdenv-subst
stdenv substitute: avoid using a temporary file
2015-01-23 23:15:16 +01:00
Vladimír Čunát 1575bc652e Merge branch 'master' into staging
Conflicts (simple):
	pkgs/os-specific/linux/util-linux/default.nix

It seems this merge creates a new stdenv hash,
because we had changes on both branches :-/
2015-01-13 18:07:11 +01:00
Vladimír Čunát 2533a11241 stdenv substitute: avoid using a temporary file
- IMO using a temporary is not needed here (anymore),
- temporary at that location can cause a problem (in a specific case):
for example, when using the substituteAll function from nixpkgs
on a single file directly under /nix/store/ (or ./foo-file),
the stdenv's substitute tries to create a temporary directly under
/nix/store, which causes problems on chrooted darwin
(according to @copumpkin earlier today on IRC)
2015-01-13 10:53:57 +01:00
Eelco Dolstra 71c3c19638 stdenv: Remove redundant "building ..." message
Nix already shows what paths are being built.
2015-01-12 13:04:26 +01:00
Vladimír Čunát e98a443e71 stdenv: improve message on evaluation check (no hash changes) 2015-01-11 21:38:19 +01:00
Vladimír Čunát 123a8bf9a5 stdenv: refactor code for evaluation errors (no hash changes) 2015-01-11 21:37:50 +01:00
John Wiegley 28b6fb61e6 Change occurrences of gcc to the more general cc
This is done for the sake of Yosemite, which does not have gcc, and yet
this change is also compatible with Linux.
2014-12-26 11:06:21 -06:00
Eelco Dolstra 5a0b79f955 Merge remote-tracking branch 'origin/bash-4.3' into staging 2014-11-16 22:18:08 +01:00
Vladimír Čunát b4af993c3f Merge branch 'master' into staging
Conflicts (simple):
	pkgs/development/lisp-modules/clwrapper/setup-hook.sh
2014-11-14 14:28:23 +01:00
Ricardo M. Correia e9affb4274 nixos: Add system-wide option to set the hostid
The old boot.spl.hostid option was not working correctly due to an
upstream bug.

Instead, now we will create the /etc/hostid file so that all applications
(including the ZFS kernel modules, ZFS user-space applications and other
unrelated programs) pick-up the same system-wide host id. Note that glibc
(and by extension, the `hostid` program) also respect the host id configured in
/etc/hostid, if it exists.

The hostid option is now mandatory when using ZFS because otherwise, ZFS will
require you to force-import your ZFS pools if you want to use them, which is
undesirable because it disables some of the checks that ZFS does to make sure it
is safe to import a ZFS pool.

The /etc/hostid file must also exist when booting the initrd, before the SPL
kernel module is loaded, so that ZFS picks up the hostid correctly.

The complexity in creating the /etc/hostid file is due to having to
write the host ID as a 32-bit binary value, taking into account the
endianness of the machine, while using only shell commands and/or simple
utilities (to avoid exploding the size of the initrd).
2014-11-12 22:31:49 +01:00
Eelco Dolstra 1455ecee73 Ensure a correct value for $BASH
Previously it was set to /run/current-system/sw/sbin/nologin or
similar.
2014-11-10 14:09:53 +01:00
Eelco Dolstra 78b01de68d substituteAll: Enumerate environment variables more reliably
Getting the names of all environment variables is tricky. The previous
implementation easily got confused by multi-line variables. The new
one is more reliable but not still not perfect.

This works around a segfault in Bash 4.3, where the expression
"${!var}" (where var="-9") crashes under certain conditions.

http://hydra.nixos.org/build/16693445
2014-11-10 13:35:09 +01:00
Eelco Dolstra e3ef797901 Fix stdenv allowedRequisites check
It has to include the default build inputs now (like
"compress-man-pages.sh").
2014-11-06 15:33:36 +01:00
Eelco Dolstra 328f7a621e stdenv: Remove propagatedUserEnvPkgs
Stdenv is not really intended as an installable package. Nowadays it's
much better to use "nix-shell -p" to get a build environment.
2014-11-06 12:15:08 +01:00
Eelco Dolstra 1014620bce stdenv: Statically include the default build inputs
Otherwise, stdenv won't have a reference to e.g. patchelf on Linux
(because it was passed in by mkDerivation). This causes the installer
tests to fail, because having "stdenv" in the installation CD closure
is not enough to pull in all stdenv packages.

http://hydra.nixos.org/build/16546643
2014-11-06 12:10:28 +01:00
Eelco Dolstra 8e9e4b05f7 Fix running preHook
Accidentally (?) lost in e3875297fa.
2014-11-06 11:26:09 +01:00
Eelco Dolstra 0518ccf5af Merge remote-tracking branch 'origin/master' into staging
Conflicts:
	pkgs/stdenv/generic/default.nix
2014-11-06 10:16:39 +01:00
Eelco Dolstra af0557cf82 Allow marking licenses as unfree
This allows licenses like the Amazon Software License to be identified
properly while still preventing packages with those licenses from
being distributed in the Nixpkgs/NixOS channels.
2014-11-05 15:15:00 +01:00
Eelco Dolstra 7495c61d49 Merge remote-tracking branch 'origin/darwin-clang-stdenv' into staging
Conflicts:
	pkgs/applications/editors/vim/macvim.nix
2014-11-04 14:30:43 +01:00
Wout Mertens c04e492898 stdenv: Prevent issues like #4266
Don't preserve hardlinks, and instead use reflinks if they're available.
2014-10-31 11:13:03 +01:00
Eelco Dolstra 3a0db27b90 Fix indent 2014-10-26 01:59:05 +02:00
Nikolay Amiantov 66d89ef2a4 stdenv: Use "pipefail" in setup.sh 2014-10-10 14:02:15 +04:00
Nikolay Amiantov ca3ecb56ae stdenv: change 'echo -n' to 'printf "%s"'
[Bjørn: rationale is portability, "echo -n" isn't in POSIX]
2014-10-09 22:15:07 +02:00
Nikolay Amiantov 2ec4704961 stdenv: Fix handling spaces in 'substitute' 2014-10-09 22:15:07 +02:00
Nikolay Amiantov d59327b938 stdenv: added escaping for patches 2014-10-09 22:15:05 +02:00
Nikolay Amiantov d15e52f25f stdenv: fail if the patch does not exist 2014-10-09 22:14:38 +02:00
Eelco Dolstra 811de3bfaa Merge remote-tracking branch 'origin/staging' into darwin-clang-stdenv
Conflicts:
	pkgs/tools/security/gnupg/default.nix
2014-10-09 10:57:57 +02:00
Eelco Dolstra 51f1b4ec48 Automatically move stuff in lib64 to lib 2014-10-07 15:04:13 +02:00
Eelco Dolstra ab04b7d0bb Automatically move programs in sbin to bin
This should fix the OpenJDK build, which was failing because paxctl is
in sbin and therefore not automatically added to $PATH.

http://hydra.nixos.org/build/15658346
2014-10-07 14:43:56 +02:00
Eelco Dolstra a85dcf4a00 Merge remote-tracking branch 'origin/master' into staging
Conflicts:
	pkgs/development/libraries/libav/default.nix
	pkgs/shells/bash/bash-4.2-patches.nix
	pkgs/stdenv/generic/default.nix
2014-10-07 00:09:37 +02:00
Eelco Dolstra ce61353a9f Eliminate some optionals/optionalAttrs calls on the hot path 2014-10-05 01:59:24 +02:00
Eelco Dolstra cd71f7a2e6 Merge branch 'darwin-stdenv' of github.com:joelteon/nixpkgs into staging
Conflicts:
	pkgs/development/interpreters/ruby/ruby-19.nix
	pkgs/development/libraries/libc++/default.nix
	pkgs/development/libraries/libc++abi/default.nix
	pkgs/tools/text/sgml/opensp/default.nix
2014-09-23 11:27:53 +02:00
Gergely Risko efcb00d002 Do allowed requisites check in stdenv/linux
Use the new allowedRequisites feature in stdenvLinux.

This way we properly check that the end-result stdenv of the quite
complicated multi-stage stdenvLinux building procedure is sane, and only
depends on the stuff that we know about.

Alternative would be to just disallowRequisites bootstrapTools, which is
the most common offender, but we have had other offenders in the past.

For these checks to actually fire, you currently have to use nixUnstable,
as the necessary feature will be released in Nix 1.8.
2014-09-14 21:14:41 +02:00
Joel Taylor 3e8344d334 suitable clang stdenv 2014-09-09 13:54:24 -07:00
Vladimír Čunát 1e389c976c merge 'staging' into modular-stdenv
In 2c62a36b77 the messages in pkgs/stdenv/generic/default.nix
were not merged correctly.

Conflicts:
	pkgs/stdenv/generic/default.nix
2014-09-08 18:16:54 +02:00
Vladimír Čunát 2990145170 remerge to retrieve refactoring lost 10 days ago
In 2c62a36b77 the messages in pkgs/stdenv/generic/default.nix
were not merged correctly.

Conflicts:
	pkgs/stdenv/generic/default.nix
2014-08-31 13:09:15 +02:00
Vladimír Čunát 2c09066dfd TMP
Conflicts:
	pkgs/stdenv/generic/default.nix
2014-08-31 13:00:19 +02:00
Eelco Dolstra 3360fa1afb Revert "stdenv/setup.sh: unbreak *.lz sources on darwin"
This reverts commit fcafdd2761. We're
trying to modularise stdenv, not add more ad-hoc compression support.
2014-08-30 22:41:56 +02:00
Vladimír Čunát fcafdd2761 stdenv/setup.sh: unbreak *.lz sources on darwin 2014-08-30 13:28:44 +02:00
Vladimír Čunát a70180ba73 mutiout: make it builtin 2014-08-30 08:27:43 +02:00
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 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
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
Thomas Tuegel e15fc83fc9 Don't split paths with spaces
setup.sh uses the anti-pattern `for f in $(find ...); do` in several
places. `find` returns one path per line, but `for` splits its arguments
by words, so paths which contain spaces are incorrectly split! The
correct way is `find ... | while read f; do`
2014-01-11 07:54:35 -06:00
Eelco Dolstra 10ab227126 stdenv: Prepend SHELL=... to makeFlags
If it's appended, the user cannot override SHELL.
2014-01-07 17:45:55 +01:00
Eelco Dolstra 320209a618 Merge deterministicStdenv into the default stdenv
This means that (on Linux) strip uses
"--enable-deterministic-archives" and ld uses the
BFD_DETERMINISTIC_OUTPUT flag.
2014-01-07 13:57:42 +01:00
Eelco Dolstra 2a0047bbef stdenv: Fix indentation 2014-01-07 09:49:45 +01:00
Eelco Dolstra 890461d8af stdenv: Update comment 2014-01-07 09:48:23 +01:00
Eelco Dolstra 369185288a stdenv: Revert special-casing of fixupPhase
Treating fixupPhase specially is really ugly.  Also, it collides with
the work in the multiple-outputs branch (which already has support for
fixing up all outputs).

Partial revert of 0a44a09121.
2014-01-07 09:48:01 +01:00
Bjørn Forsman f4f0d2ecb9 stdenv/setup.sh: fix breakage when shebang contains '\'
Some programs, e.g. guile-config, has a shebang that ends in '\':

  #!/usr/bin/guile-1.8 \
  -e main -s
  !#
  ;;;; guile-config --- utility for linking programs with Guile
  ;;;; Jim Blandy <jim@red-bean.com> --- September 1997

This currently breaks patchShebangs:

  $ read oldPath arg0 args <<< 'shebang \'; echo $?
  1
  $ echo $oldPath
  shebang
  $ echo $arg0

  $ echo $args

(And setup.sh/patchShebangs is run with 'set -e' so any command that
return non-zero aborts the build.)

Fix by telling 'read' to not interpret backslashes (with the -r flag):

  $ read -r oldPath arg0 args <<< 'shebang \'; echo $?
  0
  $ echo $oldPath
  shebang
  $ echo $arg0
  \
  $ echo $args

Also needed: escape the escape characters so that sed doesn't interpret
them.
2014-01-03 14:47:39 +01:00
Vladimír Čunát d978c35ff9 stdenv/setup.sh: fix previous change...
for the case that there is no makefile. CC #1354
2013-12-28 10:43:34 +01:00
Vladimír Čunát 3f4b14d793 stdenv/setup.sh: add SHELL to makeFlags (close #1354) 2013-12-27 21:03:16 +01:00
Bjørn Forsman 4e385fcda7 stdenv/patchShebangs: fix shebang check
patchShebangs has a bug that shows itself on files that have the
executable bit set but have no shebang (i.e. a blank/empty first line).
The shell would then evaluate this:

if [ != '#!' ]; then
  # not evaluated
fi

With proper quoting we get the correct behaviour:

if [ "" != '#!' ]; then
  # this will be evaluated
fi
2013-12-07 21:13:06 +01:00
Peter Simons c32bf83301 Merge remote-tracking branch 'origin/master' into stdenv-updates.
Conflicts:
	pkgs/development/interpreters/perl/5.16/default.nix
	pkgs/tools/networking/curl/default.nix
	pkgs/top-level/all-packages.nix
	pkgs/top-level/release-python.nix
	pkgs/top-level/release-small.nix
	pkgs/top-level/release.nix
2013-12-04 18:33:52 +01:00
Bjørn Forsman 88c7b4c7fe Fix bug introduced in previous commit
When building e.g. perl for the first time there is no perl in PATH yet,
so command -v perl will fail.

This brings back the previous behaviour of silently not patching
shebangs for which there is no available command in PATH.
2013-12-03 16:58:49 +01:00
Bjørn Forsman 7bf209db50 patchShebangs: rewrite ".../bin/env python" to /nix/store/.../python
Currently "/usr/bin/env python" is rewritten to "/nix/store/.../env
python". That doesn't really improve anything because the interpreter
still have to be located in $PATH at runtime. The result is that many
nix package expressions do .../bin/env fixup themselves.

Instead of everyone having to do this patching locally, add the
functionality to the standard environment patchShebangs function so that
everyone can benefit.
2013-12-02 13:02:42 +01:00
Eelco Dolstra 544475cb45 mkDerivation: Set meta.position to the source file of the derivation
This requires Nix 1.7.
2013-11-19 14:58:47 +01:00
Eelco Dolstra a2cbc77e4f Only show/build a package on the platforms listed in meta.platforms
The function ‘mkDerivation’ now checks whether the current platform
type is included in a package's meta.platform field.  If not, it
throws an exception:

  $ nix-build -A linux --argstr system x86_64-darwin
  error: user-thrown exception: the package ‘linux-3.10.15’ is not supported on ‘x86_64-darwin’

These packages also no longer show up in ‘nix-env -qa’ output.  This
means, for instance, that the number of packages shown on
x86_64-freebsd has dropped from 9268 to 4764.

Since meta.platforms was also used to prevent Hydra from building some
packages, there now is a new attribute meta.hydraPlatforms listing the
platforms on which Hydra should build the package (which defaults to
meta.platforms).
2013-11-05 00:06:10 +01:00
Eelco Dolstra 754704ea18 Allow packages to be marked as "broken" by setting meta.broken
The effect is that they won't show up in "nix-env -qa" anymore.
2013-11-04 21:11:00 +01:00
Peter Simons 91f2c362de Merge remote-tracking branch 'origin/master' into stdenv-updates.
Conflicts:
	pkgs/top-level/all-packages.nix
2013-10-26 18:28:05 +02:00
Bjørn Forsman fc687b393f Small fix in handling of "unfree" meta.license attributes
meta.license is can be a string or a list of strings. But there is one
unhandled case where "unfree" (or "unfree-redistributable") is a part of
a list. It will currently not be detected as an "unfree" package and
Hydra will attempt to build it. This should fix it.

Example: http://hydra.nixos.org/build/6553461
2013-10-21 22:55:01 +02:00
Peter Simons 6be8ad3392 Merge branch 'origin/master' into stdenv-updates.
There was a minor conflict in 'stumpwm'. The package needs texinfo
version 4.x. At least is used to, I'm not sure whether it still does.
2013-10-18 18:57:24 +02:00
Eelco Dolstra 3293421dd3 Fix references to pkgs/lib 2013-10-10 13:28:22 +02:00
Eelco Dolstra 70edf15997 patchPhase: Handle xz compression 2013-08-07 15:46:25 +02:00
Vladimír Čunát 8ba92b8895 Merge master into stdenv-updates
Conflicts (simple):
	pkgs/development/tools/misc/binutils/default.nix
	pkgs/tools/package-management/disnix/default.nix
	pkgs/top-level/all-packages.nix
2013-07-08 10:48:05 +02:00
Vladimír Čunát 0a44a09121 stdenv: default builder fixes (merge #554)
With a minor fix.
I did some huge rebuilds with this on x86_64-linux, found no problems.
2013-06-30 09:00:12 +02:00
Vladimír Čunát 173c9cbb63 builder: fail if patch is missing or fails to unpack 2013-06-27 16:34:31 +02:00
Vladimír Čunát 7f1e09c35d Re-Revert "Merge pull request #567 from MarcWeber/submit/cmake-improvement"
This reverts commit b08e12b37a.
2013-06-27 15:14:32 +02:00
Evgeny Egorochkin f22880408e Kindly ask strip to not mess up timestamps in static libraries 2013-06-25 11:15:45 +03:00
Evgeny Egorochkin a0ba1a20e9 Add a stdenv version which tries harder to make builds repeatable. 2013-06-21 18:22:07 +03:00
Peter Simons b08e12b37a Revert "Merge pull request #567 from MarcWeber/submit/cmake-improvement"
This reverts commit abc7591aaf, reversing changes
made to 6b1ebeccf2, because they broke half the
packages in stdenv-updates: http://hydra.nixos.org/eval/927013 has further
details.
2013-06-17 10:19:15 +02:00
Michael Raskin abc7591aaf Merge pull request #567 from MarcWeber/submit/cmake-improvement
experimental/cmake-improvement
2013-06-13 05:47:20 -07:00
Marc Weber f7ef08e5cd experimental/cmake-improvement
set CMAKE_LIBRARY_PATH, CMAKE_INCLUDE_PATH based on NIX_CFLAGS_COMPILE and
NIX_LDFLAGS so that cmake's find_library like functions find all the libraries
gcc knows about thanks to the gcc wrapper

This is particular useful with myEnvFun which then also sets those CMAKE_* env
variables.`

Because setup.sh has to change this causes many rebuilds - thus it should be
included in a stdenv-update like branch

Also cmake builds in parallel perfectly fine

update cmake to latest minor number, I didn't change the patches,
just reapplied them manually recordin a new patch
2013-05-28 16:22:45 +02:00
Shea Levy fde3526e7d Merge branch 'master' into stdenv-updates
Conflict in kerberos, which was updated both in master and in
stdenv-updates. Kept the stdenv-updates version, except pulled in the
enableParallelBuilding change from master.

Signed-off-by: Shea Levy <shea@shealevy.com>

Conflicts:
	pkgs/development/libraries/kerberos/krb5.nix
2013-05-04 18:28:48 -04:00
Shea Levy 84fba68006 mkDerivation: Allow direct access to passthru
Before this, the passthru attributes were only merged in with the
derivation attribute set, and there was no way to distinguish after the
fact which attributes were part of the derivation and which came from
passthru. Now passthru can be looked at separately as well.

Signed-off-by: Shea Levy <shea@shealevy.com>
2013-05-03 09:07:42 -04:00
Peter Simons 4914e63a89 Merge changes from branch 'master' into stdenv-updates.
Conflicts:
	pkgs/development/libraries/icu/default.nix
	pkgs/tools/misc/coreutils/default.nix
2013-04-19 11:48:11 +02:00
Eelco Dolstra 4adad458e7 Remove the "proprietary" license
We already had "unfree".
2013-04-12 14:37:50 +02:00
Peter Simons 0823aea0a6 Merge branch 'master' into stdenv-updates.
Conflicts:
	pkgs/development/libraries/libxslt/default.nix

Commit 1764ea2b0a introduced changes to libxslt
in an awkward way to avoid re-builds on Linux. This patch has been simplified
during this merge.
2013-03-25 13:43:45 +01:00
Shea Levy 98860f429d Add the addPassthru library function
With multiple outputs, adding attributes to a derivation without
changing the {drv,out}Path is no longer as trivial as simply using the
`//' operator, as we usually want to add the attribute to _each_ output,
and even if we only care about one that one output can be reached via
multiple paths.

For stdenv.mkDerivation, we already had code in place to add passthru
and meta attributes to derivations. This commit simply factors part of
that code out into a lib function addPassthru, which takes a derivation
and an attribute set and appends the attribute set to each output of the
derivation.

Signed-off-by: Shea Levy <shea@shealevy.com>
2013-03-24 08:29:10 -04:00
Danny Wilson d007a78ccb Merge remote-tracking branch 'origin/stdenv-updates' into illumos
Conflicts:
	pkgs/development/libraries/gmp/5.1.1.nix
	pkgs/development/libraries/mpc/default.nix
	pkgs/development/libraries/mpfr/default.nix
	pkgs/development/libraries/ppl/default.nix
	pkgs/tools/misc/coreutils/default.nix
2013-03-17 13:22:24 +01:00
Eelco Dolstra 262c21ed46 Enable __ignoreNulls globally 2013-03-07 19:42:01 +01:00
Eelco Dolstra 674c51af3c Merge remote-tracking branch 'origin/master' into stdenv-updates 2013-03-07 19:33:52 +01:00
Shea Levy 0a7d8a5175 stdenv.mkDerivation: Add meta and passthru to all outputs.
Before, only the first output (and not even that when accessed through 'all' or its corresponding attribtue) had meta information and the relevant passthru attributes.

This doesn't change stdenv's hash and the tarball still builds, I'm pretty sure this is safe for master.
2013-03-02 08:34:53 -05:00