* 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
This commit is contained in:
@@ -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"
|
||||
}
|
||||
|
||||
|
||||
14
pkgs/development/compilers/ghc/wrapper.nix
Normal file
14
pkgs/development/compilers/ghc/wrapper.nix
Normal file
@@ -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];
|
||||
}
|
||||
Reference in New Issue
Block a user