Commit Graph

926 Commits

Author SHA1 Message Date
Eelco Dolstra
3a0db27b90 Fix indent 2014-10-26 01:59:05 +02:00
Eelco Dolstra
9a979af1d3 stdenv-darwin: Revert to clang 3.3
In 3.3, a C++ class defined in a header will get a typeinfo symbol
like this (e.g. in Nix's src/libutil/util.o):

  (__DATA,__datacoal_nt) weak external typeinfo for nix::BaseError

But in 3.4, this has changed to:

  (__DATA,__datacoal_nt) weak external automatically hidden typeinfo for nix::BaseError

This causes the linker to change the symbol to:

  (__DATA,__data) non-external (was signed char private external) typeinfo for nix::BaseError

i.e. losing its weak linkage. But without weak linkage, dynamic_cast
and other RTTI-based mechanisms (such as catching an exception of a
certain type) don't work across shared libraries / executables.

The clang compiler in the SDK doesn't have this behaviour, but it's
not clear exactly which version it is (it just says "based on LLVM
3.4svn").
2014-10-15 01:15:31 +02:00
Eelco Dolstra
7aacca25df stdenv-darwin: Pass through libcxx/libcxxabi 2014-10-14 16:36:44 +02:00
Eelco Dolstra
79d0d7b437 Unify gcc-wrapper and clang-wrapper 2014-10-11 22:26:39 +02:00
Eelco Dolstra
ffbdcbfe29 gcc-wrapper: Wrap ld.gold
This ensures that gcc's ‘-fuse-ld=gold’ flag works.
2014-10-10 14:55:17 +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
14d6454b9a stdenv-linux: Turn allowedRequisites back on 2014-10-06 22:11:05 +02:00
Eelco Dolstra
2bb69fcedd pcre: Update to 8.36 2014-10-06 20:49:10 +02:00
Eelco Dolstra
c34932ef86 Merge remote-tracking branch 'origin/staging' into darwin-clang-stdenv 2014-10-06 20:14:26 +02:00
Eelco Dolstra
b891f05a6a stdenv-linux: Disable use of allowedRequisites
Sadly, it breaks stdenv adapters like overrideGCC and useGoldLinker.
2014-10-06 20:13:29 +02:00
Eelco Dolstra
ce61353a9f Eliminate some optionals/optionalAttrs calls on the hot path 2014-10-05 01:59:24 +02:00
Eelco Dolstra
8c3ddec416 Merge remote-tracking branch 'origin/staging' into darwin-clang-stdenv 2014-10-03 15:49:20 +02:00
Eelco Dolstra
a1bb914f71 Fix gcc.override (required by stdenv adapters like useGoldLinker) 2014-10-03 15:21:00 +02:00
Eelco Dolstra
250c7682e1 Remove broken libunwindNative package
Copying /usr/lib/system/libunwind.dylib at evaluation time doesn't
work (e.g. on Hydra). And copying binary system libraries is a bad
idea anyway for license reasons.
2014-09-29 19:58:09 +02:00
Eelco Dolstra
1e6dfdf29c clang-wrapper: Remove explicit dependency on libc++
Now libc++ is just another build input propagated from clang-wrapper.
2014-09-24 17:55:05 +02:00
Eelco Dolstra
84a586fa9e stdenvDarwin: Do not wrap clang twice 2014-09-24 16:54:43 +02:00
Eelco Dolstra
66dedaa6ee gcc-wrapper: Remove NIX_GCC_NEEDS_GREP
This is not needed on any currently supported platform.
2014-09-23 19:43:38 +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
6fe1ac69f9 Cleanup legacy settings in stdenvLinux
This causes a mass rebuild, because it changes the hashes of
stdenvLinux, as it enable tests for coreutils.
2014-09-14 21:57:00 +02:00
Gergely Risko
c5df246ba9 Cleanup perl logic in stdenvLinux
Make thread disabling explicit.  This changes the semantics of the perl
derivation, so on other platforms it may require setting

  enableThreading = false

This commit doesn't change the derivation or out hash of stdenvLinux.
2014-09-14 21:36:14 +02:00
Gergely Risko
fca5d864b6 pkgs/stdenv/linux: stageFun refactoring
The stage3.extraAttrs.glibc argument was required for this whole build
procedure to correctly work and it was very-very hard to see why (the
comment said something about gcc47, but we're using gcc48 now).

This stage3.extraAttrs.glibc goes into stage3.stdenv.glibc after some
arg passing, and in pkgs/development/compiler/gcc an (stdenv ? glibc)
boolean expression decides to override /usr/include during the GCC
build.

All of our stages are built with glibc, so this refactoring moves this
repeating specification of glibc (once for gcc wrapper and once here for
extraAttrs) to stageFun, by getting rid of wrapGCC, as we were using
that in all of the stages anyways.

Incidentally it turned out, that this stdenv.glibc inconsistency caused
some random other stuff to behave differently:
  - stage1.pkgs.perl has threading disabled,
  - stage4.pkgs.coreutils (the production coreutils) has testing disabled.

Leave this historical accidents as they are in this commit, so the scope
of this commit can stay as a refactoring only, these issues will be
fixed in separate commits.

This commit doesn't change the derivation or the output hash of
stdenvLinux.
2014-09-14 21:35:54 +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
Gergely Risko
0a3d811e42 Fix zlib handling in stdenvLinux
Previously stdenv depended on two different zlibs and there was a third
one in the top-level package set for other purposes.  This commit merges
all this zlibs to one.

Actually this have been committed once as 1f2b636, but then got lost
while resolving merge conflicts.  Hopefully it survives this time.
2014-09-14 19:37:51 +02:00
Gergely Risko
4ac4af08f2 Cosmetic renaming: extraPath -> extraBuildInputs 2014-09-14 19:37:32 +02:00
Gergely Risko
034b07e6ff Remove gcc and zlib dependency on bootstrap-tools
The 82797f98f2917e164db8691b516ed7f354b40ff4 merge caused this
issue while trying to merge the staging refactorings with
the modular-stdenv feature branch.
2014-09-14 19:32:58 +02:00
Gergely Risko
18592c78fc Cosmetic fix in pkgs/stdenv/linux/default.nix
Keep the rule that every stage only refers to the previous stage
for clarity.

This commit doesn't change derivation or output hashes.
2014-09-11 00:39:08 +02:00
Gergely Risko
f2c5125e82 Fix testability of pkgs/stdenv/linux/default.nix
The point here is that it's always possible to debug this staging
logic by using `nix-repl pkgs/stdenv/linux'. The modular-stdenv
change introduced the lib dependency, which we now default to
../../../lib.

No derivation or out hashes of stdenvLinux is changed by this commit.
2014-09-11 00:24:03 +02:00
Joel Taylor
afa1db198b fix even more clang builds 2014-09-09 13:54:57 -07:00
Joel Taylor
fa9b1f9cda build nix head successfully 2014-09-09 13:54:57 -07:00
Joel Taylor
2e26f7bef1 livcxx build 2014-09-09 13:54:25 -07:00
Joel Taylor
7da056233f wip libc++ 2014-09-09 13:54:25 -07:00
Joel Taylor
3e8344d334 suitable clang stdenv 2014-09-09 13:54:24 -07:00
Vladimír Čunát
82797f98f2 Merge branch 'staging' into modular-stdenv
Conflicts:
	pkgs/development/interpreters/perl/5.10/setup-hook.sh
	pkgs/development/interpreters/perl/5.8/setup-hook.sh
	pkgs/stdenv/linux/default.nix
2014-09-08 18:24:58 +02: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
Eelco Dolstra
3360fa1afb Revert "stdenv/setup.sh: unbreak *.lz sources on darwin"
This reverts commit fcafdd27616b91049c506441802b9cfe970388d4. 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
Gergely Risko
1f2b636ff6 Fix zlib handling in stdenvLinux
Previously stdenv depended on two different zlibs and there was a third
one in the top-level package set for other purposes.  This commit merges
all this zlibs to one.
2014-08-26 17:17:13 +02:00
Eelco Dolstra
f5d648e27d Fix evaluation 2014-08-25 09:35:06 +02:00
Eelco Dolstra
27d3984935 Indentation 2014-08-24 18:08:23 +02:00
Gergely Risko
ea65229f70 Refactor stages to only ever refer to the previous stage
This commit doesn't change the outhash (or drvhash) of the stdenv.
2014-08-24 17:10:55 +02:00
Gergely Risko
49e5837780 Move wrapGCC helper up
This commit doesn't change the outhash (or drvhash) of the stdenv.
2014-08-24 17:10:53 +02:00
Gergely Risko
350022247a Refactor stage handling in stdenvLinux
Make stages explicit and generalize the pattern of having an stdenv and
a pkgs collection for all stages to a common stage generating function
called stageFun.

Rewrite all stage handling with this new function.

This commit doesn't change the outhash (or drvhash) of the stdenv.
2014-08-24 17:10:50 +02:00
Gergely Risko
142970b9eb Refactor wrapGCC in stdenvLinux
Don't use default parameter values, to make the callsites more readable
and for easier debuggability/changability.  Also reordered the
callsites' parameter ordering for consistency.

In the final stdenv don't repeat the name of the shell.

This commit doesn't change the outhash (or drvhash) of the stdenv.
2014-08-24 17:10:37 +02:00
Gergely Risko
8a445f9237 Refactor fetchurl handling in stdenvLinux
All the different stages of stdenv had the fetchurl inherited anyways,
so make this generic in stdenvBootFun.

This commit doesn't change the outhash (or drvhash) of the stdenv.
2014-08-24 17:10: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
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
497997cc38 Move generation of coverage reports from nixos/lib/testing to releaseTools
Also, turn some stdenv adapters into setup hooks.
2014-03-03 13:57:08 +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
bea2b3c517 addCoverageInstrumentation: Set NIX_CFLAGS_COMPILE as an attribute
This allows it to show up in nix-shell.
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
Eelco Dolstra
7703f04b75 Add a stdenv adapter ‘useGoldLinker’ to force use of Gold 2014-02-05 19:18:33 +01:00
Eelco Dolstra
a8a5a59059 stdenv-linux: Fix binutils override
This ensures that pkgs.binutils equals the binutils used in the final
stdenv, as intended.
2014-01-28 15:23:57 +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 1d11c1dc48a3849f447350681ebba9d8cb97b979 in the
multiple-outputs branch.
2014-01-14 14:21:27 +01:00
Peter Simons
9c582619c6 Merge pull request #1516 from ttuegel/glob
Don't split paths with spaces
2014-01-14 04:44:03 -08:00
Vladimír Čunát
a2c316288c Merge master into stdenv-updates
Conflicts:
	pkgs/development/lisp-modules/stumpwm/default.nix (auto-solved)
	pkgs/top-level/all-packages.nix (trivial)
2014-01-12 12:29:24 +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
860c681fb3 stdenv-linux: Prevent dependency on bootstrap-tools in the final binutils
Binutils nowadays contains ld.gold, which depends on libstdc++.  So it
needs to be built with the new GCC rather than the one from
bootstrap-tools.

Issue #1469.
2014-01-07 17:50:12 +01: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
c3d31749fb Remove gcc 4.7
There is really no reason to keep it around, given that it was never
the default in Nixpkgs.
2014-01-07 10:36:15 +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 0a44a091217ecd335cd10c06c1ddd29ad599f18c.
2014-01-07 09:48:01 +01:00
Shea Levy
f4ce59cee0 Remove non-kernel-specific klibc derivation
Signed-off-by: Shea Levy <shea@shealevy.com>
2014-01-05 07:38:58 -05: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 b08e12b37ae9470c9d8eb8438c21adb8ddbae19e.
2013-06-27 15:14:32 +02:00
Eelco Dolstra
acba9240cd nixos.org/tarballs -> tarballs.nixos.org
It's currently the same machine, but tarballs.nixos.org should become
an S3/CloudFront site eventually.
2013-06-25 14:12:16 +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 abc7591aaf3912d819401241d7d2339fb96441f3, reversing changes
made to 6b1ebeccf2c9d9e8f68d7e21a1e55b5d91577683, 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
986f361946 linux/bootstrap: Use <nix/fetchurl> to get the static binaries
Since nix-1.4, nix's corepkgs contain a fetchurl suitable for
downloading the bootstrap binaries. Doing this will allow us to have a
nixpkgs with no in-tree binaries without breaking the purity of the
bootstrap (though for now, they are fetched in-tree until the binaries
are added to nixos.org somewhere). As an additional small benefit, the
in-tree binaries do not have to be hashed on every instantiation as they
do now.

The fetchurl in nix-1.2 and 1.3 isn't able to make binaries executable,
so it can't be used for this case. In that case, attempting to build the
bootstrap will show a message asking the user to manually download each
file and add it to the store with nix-store --add (but the hash is
ultimately the same, of course).

Signed-off-by: Shea Levy <shea@shealevy.com>
2013-05-05 11:30:34 -04: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 1764ea2b0a635587746d382db1b6cd832483a362 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
Vladimír Čunát
637e799ead Merge stdenv-updates-gcc47 into stdenv-updates
Conflicts (simple):
	pkgs/development/libraries/gmp/5.0.5.nix
	pkgs/development/libraries/gmp/5.1.1.nix
	pkgs/top-level/all-packages.nix
2013-03-09 12:01:39 +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
Danny Wilson
cbfc76d5ca Add SmartOS native GCC path. 2013-02-28 20:04:04 +01:00
Danny Wilson
15e865ac09 GCC 4.7.2 + updated libraries compiles on Illumos/SmartOS!
- Add solaris native ld support to GCC build wrapper
- Add solaris ld wrapper that fixes -L argument order
2013-02-28 20:04:02 +01:00
Danny Wilson
bcaea92a12 Attempt at getting GCC 4.7 compiled on Illumos...
No success yet :-(
2013-02-28 20:04:01 +01:00
Danny Wilson
cf42601f92 Coreutils update and Illumos compatibility fixes.
- GNU Coreutils 8.21
- Add is64Bit checks to stdenv for Solaris.
- Fix OpenSSL Illumos build.
2013-02-28 20:04:01 +01:00
aszlig
82f94df719 stdenv/setup.sh: Always run postPatch hook.
I'm not sure whether this was by intention, but so far postPatch hooks were
silently skipped whenever the patches list was empty. This change could possibly
change the build results of the following packages:

 * gcc
 * cmake (264)
 * systemtap
 * quemu-kvm

These packages all have in common that they have a postPatch hook and the
patches list can be empty when certain conditions are met.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2013-02-27 15:26:18 +01:00
Eelco Dolstra
2aa6f262cb Merge remote-tracking branch 'origin/master' into stdenv-updates 2013-02-15 13:36:34 +01:00
Lluís Batlle i Rossell
be88539d84 stdenv bootstrap: removing xz override from stdenvLinuxBoot4
Due to xz being override in the last stdenv and also in the previous, the
nixpkgs xz ended up being built by bootstrap-tools, and thus depending on it
through libgcc_so.so.1. That ends up making 'nix' with a runtime
dependency on bootstrap-tools.
2013-01-29 23:39:27 +01:00
Shea Levy
9ac6c53cbf lib.licenses.proprietary is definitely unfree 2013-01-27 18:36:54 -05:00
Lluís Batlle i Rossell
3b26ba7019 Merge remote-tracking branch 'central/master' into stdenv-updates
Conflicts:
	pkgs/os-specific/linux/alsa-utils/default.nix
2013-01-27 11:32:12 +01:00
Eelco Dolstra
d9d9723ca7 With !allowUnfree, reject unfree-redistributable packages as well 2013-01-24 18:27:22 +01:00
Rickard Nilsson
1886d1db6a Merge remote-tracking branch 'upstream/master' into stdenv-updates 2013-01-20 16:53:21 +01:00
Eelco Dolstra
d8e722985b Add config option ‘allowUnfree’
If set to false, mkDerivation will throw an exception if a package has
an unfree license.  ‘release-lib.nix’ uses this to enforce that we
don't build unfree packages as part of the Nixpkgs channel.  Since
this is set through Nixpkgs' ‘config’ argument, it's more finegrained
than $HYDRA_DISALLOW_UNFREE.
2013-01-17 23:41:37 +01:00
Eelco Dolstra
deaef8abaf Pass ‘config’ to stdenv/generic/default.nix
This is a backport of cf8daf63120adedbeaf5bc8c2f396be2496a741e in
stdenv-updates (sans the userHook stuff).
2013-01-17 23:24:55 +01:00
Michael Raskin
ed2f075930 ARMv7l fails in strange way with ARMv5 bootstrap but works with ARMv6 bootstrap 2013-01-05 23:28:22 +04:00
Michael Raskin
21e57a0d08 Not all parenthesis are extraneous, after all 2013-01-05 22:49:31 +04:00
Michael Raskin
bbc494644f ARMv7 seems to need special ARM unpacking procedure, too 2013-01-05 22:14:59 +04:00
Lluís Batlle i Rossell
aadf9699cb Merge branch 'stdenv-updates' into stdenv-updates-gcc47 2012-12-31 17:05:51 +01:00
Lluís Batlle i Rossell
d16f4bb3ed Merge branch 'pi-stdenv-updates' into stdenv-updates
This adds raspberry pi support. I've almost tested all.

Should fix https://github.com/NixOS/nixpkgs/issues/234
2012-12-31 16:03:16 +00:00
Lluís Batlle i Rossell
8067f14699 Fixing the gcc47 build in stdenv
gcc 4.7 wants an explicit reference to the system include directory,
and that's guessed through 'stdenv ? glibc'.
2012-12-31 10:13:55 +01:00
Lluís Batlle i Rossell
d8b0834973 unpack-bootstrap-tools: Removing the patch of libstdc++
Although patching it made some programs run (configure tests), some others
crashed with segfault. So I don't think there is any win patching it. The
proper way to solve the bootstrap in the raspberry pi is, as far as I've been
testing, use glibc 2.17 libs in bootstrap-tools with the same ld.so name as the
bootstrapped glibc.

This is a problem inherent in our way to bootstrap, that first replaces
the glibc of a given gcc+glibc (bootstrap-tools) with gcc-wrapper tricks, and
then builds a new gcc. A nicer way would be to build a gcc without glibc,
then the glibc, then the final gcc, as we do with cross-tools.

Some comments about this problem in
https://github.com/NixOS/nixpkgs/issues/234#issuecomment-11764352
2012-12-30 13:53:48 +00:00
Lluís Batlle i Rossell
cfdc532102 Updating bootstrap tools to ones with glibc 2.17
This solves the problem of the change of name in ld.so between
glibc 2.13 and 2.17 (at least for armhf). Some comments about it in
https://github.com/NixOS/nixpkgs/issues/234#issuecomment-11764352

As there says, without this, gmp (after glibc built) tests crashed
- segfault.
2012-12-30 13:50:31 +00:00
Michael Raskin
df65a79bb3 Export shell packages from stdenvLinux
Now that we have a way to alter /bin/sh in chroots on non-NixOS Linux
platforms, it may be useful to have access to stdenv.shell package and to
static bash contained in bootstrap tools. So make them accessible via stdenv
attribute set.
2012-12-30 15:29:02 +04:00
Lluís Batlle i Rossell
0ba8b50e83 Fixing again about libstdc++.
I also move the 'echo patching' lines down, so they are printed
only for files really patched.
2012-12-29 23:46:00 +00:00
Lluís Batlle i Rossell
52ac6f96aa Fix on prev commit: the bootstrap tools don't have libmudflap
Out of glibc libs, only libstdc++ requires ld.so.
2012-12-29 23:31:48 +00:00
Lluís Batlle i Rossell
f050675458 unpack bootstrap tools arm: fix more rpaths
libstdc++ and libmudflapth link to the dynamic loader; if the
bootstrap uses another dynamic loader name, and the rpath of these
libs isn't changed, they will fail to load.
2012-12-29 23:14:25 +00:00
Lluís Batlle i Rossell
f2133155d8 armv6l: new bootstrap-tools
Trying again to get a hardfp compiler.
2012-12-29 07:47:13 +00:00
Lluís Batlle i Rossell
d7fb4db241 armv6l: Updating bootstrap tools to build for harfp 2012-12-28 20:20:18 +00:00
Lluís Batlle i Rossell
2b19eb189d Adapting make-bootstrap-tools-crosspi.nix to crossDrv 2012-12-28 21:22:13 +01:00
Lluís Batlle i Rossell
719ba63004 Merge branch 'stdenv-updates' into pi-stdenv-updates
Conflicts:
	pkgs/development/compilers/gcc/4.6/default.nix
	pkgs/development/compilers/gcc/4.7/default.nix

The 4.7 had some weird parameters added in crossAttrs; I've removed
them, but I don't understand where they come from.
2012-12-28 20:14:01 +00:00
Eelco Dolstra
e2d505b24e More renames 2012-12-28 19:42:10 +01:00
Eelco Dolstra
dcdef5a0fe More random cleanup 2012-12-28 19:37:42 +01:00