* Move the composition of Haskell packages out of all-packages.nix

into haskell-packages.nix, which depends on an instance of GHC.
  This allows a consistent set of packages to be built with the same
  GHC.  For instance,

  $ nix-build -A haskellPackages_ghc683.xmonad

  builds xmonad and all its dependencies with GHC 6.8.3, while

  $ nix-build -A haskellPackages_ghc6102.xmonad

  does the same with GHC 6.10.2.  This is the same technique used with
  kernelPackages.  It also means that we don't need things like
  "cabal682" and "cabal683" anymore.

* The setup hook is now in a separate wrapper package so that we don't
  have to recompile all of GHC every time we want to make a small
  change.

* cinelerra: this package appears to have an accidental dependency on
  the "X11" Haskell package.

svn path=/nixpkgs/trunk/; revision=15125
wip/yesman
Eelco Dolstra 15 years ago
parent 034248f57a
commit cee387e845
  1. 2
      pkgs/applications/video/cinelerra/default.nix
  2. 4
      pkgs/development/compilers/ghc/setup-hook.sh
  3. 14
      pkgs/development/compilers/ghc/wrapper.nix
  4. 2
      pkgs/development/libraries/haskell/editline/default.nix
  5. 10
      pkgs/development/tools/parsing/happy/default.nix
  6. 171
      pkgs/top-level/all-packages.nix
  7. 160
      pkgs/top-level/haskell-packages.nix

@ -14,7 +14,7 @@ args.stdenv.mkDerivation {
buildInputs =(with args; [
automake autoconf libtool pkgconfig
X11 faad2 faac
faad2 faac
a52dec alsaLib fftw lame libavc1394 libiec61883
libraw1394 libsndfile libvorbis libogg libjpeg libtiff freetype
mjpegtools x264 gettext openexr esound

@ -4,7 +4,7 @@ ensureDir $ghc_support
# Create isolated package config
packages_db=$ghc_support/package.conf
cp @out@/lib/ghc-*/package.conf $packages_db
cp @ghc@/lib/ghc-*/package.conf $packages_db
chmod +w $packages_db
# Generate wrappers for GHC that use the isolated package config
@ -13,7 +13,7 @@ makeWrapper() {
wrapper="$ghc_support/$wrapperName"
shift #the other arguments are passed to the source app
echo '#!'"$SHELL" > "$wrapper"
echo "exec \"@out@/bin/$wrapperName\" $@" '"$@"' >> "$wrapper"
echo "exec \"@ghc@/bin/$wrapperName\" $@" '"$@"' >> "$wrapper"
chmod +x "$wrapper"
}

@ -0,0 +1,14 @@
{stdenv, ghc}:
stdenv.mkDerivation {
name = "${ghc.name}-wrapper";
propagatedBuildInputs = [ghc];
unpackPhase = "true";
installPhase = "true";
setupHook = ./setup-hook.sh;
inherit ghc;
}

@ -4,7 +4,7 @@ cabal.mkDerivation (self : {
pname = "editline";
version = "0.2";
sha256 = "6ee0b553cc8d7542c096730ceebabdcb9b2951d7b00a5a0ddbf47b5436a77ce4";
propagatedBuildInputs = [ libedit ];
buildInputs = [ libedit ];
patchLibFiles = [ "editline.buildinfo.in" ];
preConfigure = ''
sed -i -e '/el_get/d' include/HsEditline.h

@ -1,10 +0,0 @@
{stdenv, fetchurl, perl, ghc}:
stdenv.mkDerivation {
name = "happy-1.14";
src = fetchurl {
url = http://www.haskell.org/happy/dist/1.14/happy-1.14-src.tar.gz;
md5 = "501b5b63533b2e2838de18085e8c4492";
};
buildInputs = [ghc perl];
}

@ -1550,11 +1550,6 @@ let
};
};
# Essential Haskell Compiler -- nix expression is work in progress
ehc = import ../development/compilers/ehc {
inherit fetchsvn stdenv coreutils m4 libtool ghc uulib uuagc llvm;
};
adobeFlexSDK33 = import ../development/compilers/adobe-flex-sdk {
inherit fetchurl stdenv unzip jre;
};
@ -1804,7 +1799,7 @@ let
# Executables compiled by this ghc68 - I'm too lazy to add them all as additional file in here
ghc68executables = recurseIntoAttrs (import ../misc/ghc68executables {
inherit ghcCabalExecutableFun fetchurl lib bleedingEdgeRepos autoconf zlib getConfig;
inherit X11;
#inherit X11;
inherit (xlibs) xmessage;
inherit pkgs; # passing pkgs to add the possibility for the user to add his own executables. pkgs is passed.
});
@ -1880,6 +1875,18 @@ let
inherit fetchurl stdenv perl ncurses gmp libedit;
});
haskellPackages = haskellPackages_ghc6102;
haskellPackages_ghc6102 = import ./haskell-packages.nix {
inherit pkgs;
ghc = ghc6102;
};
haskellPackages_ghc683 = import ./haskell-packages.nix {
inherit pkgs;
ghc = ghc683;
};
gprolog = import ../development/compilers/gprolog {
inherit fetchurl stdenv;
};
@ -2321,10 +2328,6 @@ let
### DEVELOPMENT / TOOLS
alex = import ../development/tools/parsing/alex {
inherit cabal perl;
};
antlr = import ../development/tools/parsing/antlr/2.7.7.nix {
inherit fetchurl stdenv jdk python;
};
@ -2507,21 +2510,13 @@ let
inherit fetchurl stdenv;
};
# old version of haddock, still more stable than 2.0
haddock09 = import ../development/tools/documentation/haddock/haddock-0.9.nix {
inherit cabal;
};
# does not compile with ghc-6.8.3
haddock210 = lowPrio (import ../development/tools/documentation/haddock/haddock-2.1.0.nix {
cabal = cabal682;
});
/*
hsc2hs = import ../development/tools/misc/hsc2hs {
inherit bleedingEdgeRepos stdenv;
ghc = ghcsAndLibs.ghc68.ghc;
libs = with (ghc68extraLibs ghcsAndLibs.ghc68 // ghcsAndLibs.ghc68.core_libs); [ base directory process cabal_darcs ];
};
*/
guileLint = import ../development/tools/guile/guile-lint {
inherit fetchurl stdenv guile;
@ -2532,16 +2527,6 @@ let
inherit (gtkLibs) glib;
};
/*
happy = import ../development/tools/parsing/happy {
inherit fetchurl stdenv perl ghc;
};
*/
happy = import ../development/tools/parsing/happy/happy-1.17.nix {
inherit cabal perl;
};
help2man = import ../development/tools/misc/help2man {
inherit fetchurl stdenv perl gettext perlLocaleGettext;
};
@ -2680,10 +2665,6 @@ let
inherit fetchurl stdenv;
};
uuagc = import ../development/tools/haskell/uuagc {
inherit cabal uulib;
};
gdb = import ../development/tools/misc/gdb {
inherit fetchurl stdenv ncurses readline gmp mpfr texinfo;
};
@ -4177,113 +4158,6 @@ let
};
### DEVELOPMENT / LIBRARIES / HASKELL
benchpress = import ../development/libraries/haskell/benchpress {
inherit cabal;
};
maybench = import ../development/libraries/haskell/maybench {
inherit cabal benchpress;
};
binary = import ../development/libraries/haskell/binary {
inherit cabal;
};
# cabal is a utility function to build cabal-based
# Haskell packages
cabal682 = import ../development/libraries/haskell/cabal/cabal.nix {
inherit stdenv fetchurl;
ghc = ghc682;
};
cabal683 = import ../development/libraries/haskell/cabal/cabal.nix {
inherit stdenv fetchurl;
ghc = ghc683;
};
cabal = cabal683;
Crypto = import ../development/libraries/haskell/Crypto {
inherit cabal;
};
gtk2hs = import ../development/libraries/haskell/gtk2hs {
inherit pkgconfig stdenv fetchurl cairo ghc;
inherit (gnome) gtk glib GConf libglade libgtkhtml gtkhtml;
};
haxr = import ../development/libraries/haskell/haxr {
inherit cabal HaXml HTTP;
};
haxr_th = import ../development/libraries/haskell/haxr-th {
inherit cabal haxr HaXml HTTP;
};
HaXml = import ../development/libraries/haskell/HaXml {
inherit cabal;
};
haskellEditline = import ../development/libraries/haskell/editline {
inherit cabal libedit;
};
HDBC = import ../development/libraries/haskell/HDBC/HDBC-1.1.4.nix {
inherit cabal;
};
HDBCPostgresql = import ../development/libraries/haskell/HDBC/HDBC-postgresql-1.1.4.0.nix {
inherit cabal HDBC postgresql;
};
HDBCSqlite = import ../development/libraries/haskell/HDBC/HDBC-sqlite3-1.1.4.0.nix {
inherit cabal HDBC sqlite;
};
HTTP = import ../development/libraries/haskell/HTTP {
inherit cabal;
};
monadlab = import ../development/libraries/haskell/monadlab {
inherit cabal;
};
pcreLight = import ../development/libraries/haskell/pcre-light {
inherit cabal pcre;
};
uulib = import ../development/libraries/haskell/uulib {
inherit cabal;
};
wxHaskell = import ../development/libraries/haskell/wxHaskell {
inherit stdenv fetchurl unzip wxGTK ghc;
};
/*
wxHaskell68 = lowPrio (appendToName "ghc68" (import ../development/libraries/haskell/wxHaskell {
inherit stdenv fetchurl unzip wxGTK;
ghc = ghc68;
}));
*/
X11 = import ../development/libraries/haskell/X11 {
inherit cabal;
inherit (xlibs) libX11 libXinerama libXext;
xineramaSupport = true;
};
vty = import ../development/libraries/haskell/vty {
inherit cabal;
};
zlibHaskell = import ../development/libraries/haskell/zlib {
inherit cabal zlib;
};
### DEVELOPMENT / PERL MODULES
buildPerlPackage = import ../development/perl-modules/generic perl;
@ -7932,7 +7806,7 @@ let
automake autoconf libtool
a52dec alsaLib lame libavc1394 libiec61883 libraw1394 libsndfile
libvorbis libogg libjpeg libtiff freetype mjpegtools x264
gettext X11 faad2 faac libtheora libpng libdv perl nasm e2fsprogs
gettext faad2 faac libtheora libpng libdv perl nasm e2fsprogs
pkgconfig;
openexr = openexr_1_6_1;
fftw = fftwSinglePrec;
@ -9190,19 +9064,6 @@ let
stdenv = overrideGCC stdenv gcc34; # due to problems with gcc 4.x
};
xmobar = import ../applications/misc/xmobar {
inherit cabal X11;
};
xmonad = import ../applications/window-managers/xmonad {
inherit cabal X11;
inherit (xlibs) xmessage;
};
xmonadContrib = import ../applications/window-managers/xmonad/xmonad-contrib.nix {
inherit cabal xmonad X11;
};
xneur = import ../applications/misc/xneur {
inherit fetchurl stdenv pkgconfig pcre libxml2 aspell imlib2 xosd;
GStreamer=gst_all.gstreamer;

@ -0,0 +1,160 @@
{pkgs, ghc}:
let ghcOrig = ghc; in
rec {
ghc = import ../development/compilers/ghc/wrapper.nix {
inherit (pkgs) stdenv;
ghc = ghcOrig;
};
cabal = import ../development/libraries/haskell/cabal/cabal.nix {
inherit (pkgs) stdenv fetchurl;
inherit ghc;
};
# Haskell libraries.
benchpress = import ../development/libraries/haskell/benchpress {
inherit cabal;
};
maybench = import ../development/libraries/haskell/maybench {
inherit cabal benchpress;
};
binary = import ../development/libraries/haskell/binary {
inherit cabal;
};
Crypto = import ../development/libraries/haskell/Crypto {
inherit cabal;
};
editline = import ../development/libraries/haskell/editline {
inherit (pkgs) libedit;
inherit cabal;
};
gtk2hs = import ../development/libraries/haskell/gtk2hs {
inherit (pkgs) pkgconfig stdenv fetchurl cairo ghc;
inherit (pkgs.gnome) gtk glib GConf libglade libgtkhtml gtkhtml;
};
HTTP = import ../development/libraries/haskell/HTTP {
inherit cabal;
};
haxr = import ../development/libraries/haskell/haxr {
inherit cabal HaXml HTTP;
};
haxr_th = import ../development/libraries/haskell/haxr-th {
inherit cabal haxr HaXml HTTP;
};
HaXml = import ../development/libraries/haskell/HaXml {
inherit cabal;
};
HDBC = import ../development/libraries/haskell/HDBC/HDBC-1.1.4.nix {
inherit cabal;
};
HDBCPostgresql = import ../development/libraries/haskell/HDBC/HDBC-postgresql-1.1.4.0.nix {
inherit cabal HDBC;
inherit (pkgs) postgresql;
};
HDBCSqlite = import ../development/libraries/haskell/HDBC/HDBC-sqlite3-1.1.4.0.nix {
inherit cabal HDBC;
inherit (pkgs) sqlite;
};
monadlab = import ../development/libraries/haskell/monadlab {
inherit cabal;
};
pcreLight = import ../development/libraries/haskell/pcre-light {
inherit cabal;
inherit (pkgs) pcre;
};
uuagc = import ../development/tools/haskell/uuagc {
inherit cabal uulib;
};
uulib = import ../development/libraries/haskell/uulib {
inherit cabal;
};
wxHaskell = import ../development/libraries/haskell/wxHaskell {
inherit ghc;
inherit (pkgs) stdenv fetchurl unzip wxGTK;
};
X11 = import ../development/libraries/haskell/X11 {
inherit cabal;
inherit (pkgs.xlibs) libX11 libXinerama libXext;
xineramaSupport = true;
};
vty = import ../development/libraries/haskell/vty {
inherit cabal;
};
zlib = import ../development/libraries/haskell/zlib {
inherit cabal zlib;
};
# Compilers.
ehc = import ../development/compilers/ehc {
inherit ghc;
inherit (pkgs) fetchsvn stdenv coreutils m4 libtool uulib uuagc llvm;
};
# Development tools.
alex = import ../development/tools/parsing/alex {
inherit cabal;
inherit (pkgs) perl;
};
# old version of haddock, still more stable than 2.0
haddock09 = import ../development/tools/documentation/haddock/haddock-0.9.nix {
inherit cabal;
};
# does not compile with ghc-6.8.3
haddock210 = pkgs.stdenv.lib.lowPrio (import ../development/tools/documentation/haddock/haddock-2.1.0.nix {
inherit cabal;
});
happy = import ../development/tools/parsing/happy/happy-1.17.nix {
inherit cabal;
inherit (pkgs) perl;
};
# Applications.
xmobar = import ../applications/misc/xmobar {
inherit cabal;
inherit (pkgs) X11;
};
xmonad = import ../applications/window-managers/xmonad {
inherit cabal X11;
inherit (pkgs.xlibs) xmessage;
};
xmonadContrib = import ../applications/window-managers/xmonad/xmonad-contrib.nix {
inherit cabal xmonad X11;
};
}
Loading…
Cancel
Save