Commit graph

232 commits

Author SHA1 Message Date
Jude Taylor cb3e282cda unique host deps, otherwise we get 600000 char derivations 2015-07-08 14:15:03 -07:00
Jude Taylor fe75f16032 move pure stdenv into a new directory, bring back the old one
remove __impure from non-darwin OSes
2015-06-18 13:19:34 -07:00
Jude Taylor 87bca3698a remove sort and unique from stdenv 2015-06-18 12:37:42 -07:00
Jude Taylor fa9c81f694 pure darwin stdenv 2015-06-18 12:37:41 -07:00
Eelco Dolstra 3096d03435 Revert "Refactor mkFlag / shouldUsePkg into the nixpkgs libraries"
This reverts commit 25a148fa19.
2015-06-04 14:54:48 +02:00
Florian Friesdorf 88e58a4fa2 cygwin: stdenv 2015-05-28 10:53:34 +02:00
William A. Kennington III 25a148fa19 Refactor mkFlag / shouldUsePkg into the nixpkgs libraries 2015-05-22 13:26:55 -07:00
Vladimír Čunát 375bc8def7 Merge staging into closure-size 2015-05-05 11:49:03 +02:00
William A. Kennington III 232b71c6e8 Fix some platforms 2015-04-25 21:27:53 -07: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
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
codyopel e29b0da9c7 remove stdenv.isBSD 2015-02-24 22:15:51 -05: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
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
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 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 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
Eelco Dolstra 3a0db27b90 Fix indent 2014-10-26 01:59:05 +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
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 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
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 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 daa66b8b1c Factor out fixup phase stuff into separate setup hooks 2014-08-09 12:44:49 +02:00
Eelco Dolstra 0a8605ded1 Formatting 2014-08-09 12:44:48 +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
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
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
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
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
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
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
Eelco Dolstra 2aa6f262cb Merge remote-tracking branch 'origin/master' into stdenv-updates 2013-02-15 13:36:34 +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