forked from mirrors/nixpkgs
* Make it easier to override parts of stdenv (like gcc or make) per
package using the `overrideGCC' and `overrideInStdenv' functions. svn path=/nixpkgs/trunk/; revision=5505
This commit is contained in:
parent
45e1edfda8
commit
7682bf3d1e
|
@ -1,4 +1,4 @@
|
|||
{stdenv, fetchurl, aterm, sdf, pkgconfig, make}:
|
||||
{stdenv, fetchurl, aterm, sdf, pkgconfig}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
|
||||
|
@ -11,5 +11,5 @@ stdenv.mkDerivation {
|
|||
};
|
||||
|
||||
inherit aterm sdf;
|
||||
buildInputs = [pkgconfig aterm sdf make];
|
||||
buildInputs = [pkgconfig aterm sdf];
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{stdenv, fetchurl, gcc}:
|
||||
{stdenv, fetchurl}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "spidermonkey-1.5";
|
||||
|
@ -8,6 +8,4 @@ stdenv.mkDerivation {
|
|||
};
|
||||
|
||||
builder = ./builder.sh;
|
||||
|
||||
NIX_GCC = gcc; # remove when the "internal compiler error" in gcc 4.1.x is fixed
|
||||
}
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
# Note: sdf2-bundle currently requires GNU make 3.80; remove explicit
|
||||
# dependency when this is fixed.
|
||||
{stdenv, fetchurl, aterm, getopt, pkgconfig, make}:
|
||||
{stdenv, fetchurl, aterm, getopt, pkgconfig}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "sdf2-bundle-2.3.3";
|
||||
|
@ -9,6 +7,6 @@ stdenv.mkDerivation {
|
|||
md5 = "62ecabe5fbb8bbe043ee18470107ef88";
|
||||
};
|
||||
|
||||
buildInputs = [aterm pkgconfig make];
|
||||
buildInputs = [aterm pkgconfig];
|
||||
propagatedBuildInputs = [getopt];
|
||||
}
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
{stdenv, fetchurl}: stdenv.mkDerivation {
|
||||
{stdenv, fetchurl}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "par2cmdline-0.4";
|
||||
src = fetchurl {
|
||||
url = http://nix.cs.uu.nl/dist/tarballs/par2cmdline-0.4.tar.gz;
|
||||
|
|
|
@ -44,6 +44,20 @@ rec {
|
|||
# inside the set for derivations.
|
||||
recurseIntoAttrs = attrs: attrs // {recurseForDerivations = true;};
|
||||
|
||||
# Override the compiler in stdenv for specific packages.
|
||||
overrideGCC = stdenv: gcc: stdenv //
|
||||
{ mkDerivation = args: stdenv.mkDerivation (args // { NIX_GCC = gcc; });
|
||||
};
|
||||
|
||||
# Add some arbitrary packages to buildInputs for specific packages.
|
||||
# Used to override packages in stenv like Make. Should not be used
|
||||
# for other dependencies.
|
||||
overrideInStdenv = stdenv: pkgs: stdenv //
|
||||
{ mkDerivation = args: stdenv.mkDerivation (args //
|
||||
{ buildInputs = (if args ? buildInputs then args.buildInputs else []) ++ pkgs; }
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
### STANDARD ENVIRONMENT
|
||||
|
||||
|
@ -256,7 +270,8 @@ rec {
|
|||
};
|
||||
|
||||
par2cmdline = (import ../tools/networking/par2cmdline) {
|
||||
inherit fetchurl stdenv;
|
||||
inherit fetchurl;
|
||||
stdenv = overrideGCC stdenv gcc34;
|
||||
};
|
||||
|
||||
cksfv = (import ../tools/networking/cksfv) {
|
||||
|
@ -757,7 +772,8 @@ rec {
|
|||
};
|
||||
|
||||
ocaml3080 = (import ../development/compilers/ocaml/ocaml-3.08.0.nix) {
|
||||
inherit fetchurl stdenv x11;
|
||||
inherit fetchurl x11;
|
||||
stdenv = overrideGCC stdenv gcc34;
|
||||
};
|
||||
|
||||
qcmm = (import ../development/compilers/qcmm) {
|
||||
|
@ -776,8 +792,8 @@ rec {
|
|||
};
|
||||
|
||||
strategoxt = (import ../development/compilers/strategoxt) {
|
||||
inherit fetchurl stdenv pkgconfig sdf aterm;
|
||||
make = gnumake380;
|
||||
inherit fetchurl pkgconfig sdf aterm;
|
||||
stdenv = overrideInStdenv stdenv [gnumake380];
|
||||
};
|
||||
|
||||
strategoxtUtils = (import ../development/compilers/strategoxt/utils) {
|
||||
|
@ -884,9 +900,10 @@ rec {
|
|||
inherit fetchurl stdenv readline ncurses;
|
||||
};
|
||||
|
||||
spidermonkey = (import ../development/interpreters/spidermonkey) {
|
||||
inherit fetchurl stdenv;
|
||||
gcc = gcc34;
|
||||
spidermonkey = import ../development/interpreters/spidermonkey {
|
||||
inherit fetchurl;
|
||||
# remove when the "internal compiler error" in gcc 4.1.x is fixed
|
||||
stdenv = overrideGCC stdenv gcc34;
|
||||
};
|
||||
|
||||
lua4 = (import ../development/interpreters/lua-4) {
|
||||
|
@ -993,8 +1010,10 @@ rec {
|
|||
};
|
||||
|
||||
sdf = (import ../development/tools/parsing/sdf) {
|
||||
inherit fetchurl stdenv aterm getopt pkgconfig;
|
||||
make = gnumake380;
|
||||
inherit fetchurl aterm getopt pkgconfig;
|
||||
# Note: sdf2-bundle currently requires GNU make 3.80; remove
|
||||
# explicit dependency when this is fixed.
|
||||
stdenv = overrideInStdenv stdenv [gnumake380];
|
||||
};
|
||||
|
||||
jikespg = (import ../development/tools/parsing/jikespg) {
|
||||
|
@ -2138,9 +2157,10 @@ rec {
|
|||
};
|
||||
|
||||
xmms = (import ../applications/audio/xmms) {
|
||||
inherit fetchurl stdenv libogg libvorbis alsaLib;
|
||||
inherit fetchurl libogg libvorbis alsaLib;
|
||||
inherit (gnome) esound;
|
||||
inherit (gtkLibs1x) glib gtk;
|
||||
stdenv = overrideGCC stdenv gcc34; # due to problems with gcc 4.x
|
||||
};
|
||||
|
||||
bmp = import ../applications/audio/bmp {
|
||||
|
|
|
@ -75,7 +75,7 @@ let {
|
|||
mysql
|
||||
# nix
|
||||
nxml
|
||||
octave
|
||||
# octave
|
||||
openssl
|
||||
pan
|
||||
par2cmdline
|
||||
|
|
Loading…
Reference in a new issue