* changed xmonad to use generic Cabal builder

* version bump to 0.7

svn path=/nixpkgs/trunk/; revision=11609
This commit is contained in:
Andres Löh 2008-04-12 12:34:21 +00:00
parent ec8d275ded
commit 8a58e5fe49
2 changed files with 10 additions and 35 deletions

View File

@ -1,42 +1,17 @@
{stdenv, fetchurl, ghc, X11, xmessage}:
stdenv.mkDerivation (rec {
{cabal, X11, xmessage}:
cabal.mkDerivation (self : {
pname = "xmonad";
version = "0.5";
name = "${pname}-${version}";
src = fetchurl {
url = "http://hackage.haskell.org/packages/archive/${pname}/${version}/${name}.tar.gz";
sha256 = "cfcc4501b000fa740ed35a5be87dc01216e036219551630dcf71d9c3cf57e4c4";
};
buildInputs = [ghc X11];
name = "${self.fname}";
version = "0.7";
sha256 = "d5ee338eb6d0680082e20eaafa0b23b32358fffe69e2ec4ad7bdf6e03c751d67";
extraBuildInputs = [X11];
meta = {
description = "xmonad is a tiling window manager for X";
};
configurePhase = ''
sed -i 's|"xmessage"|"${xmessage}/bin/xmessage"|' XMonad/Core.hs
ghc --make Setup.lhs
./Setup configure --prefix="$out"
preConfigure = ''
substituteInPlace XMonad/Core.hs --replace \
'"xmessage"' '"${xmessage}/bin/xmessage"'
'';
buildPhase = ''
./Setup build
'';
installPhase = ''
./Setup copy
./Setup register --gen-script
mkdir $out/nix-support
sed -i 's/|.*\(ghc-pkg update\)/| \1/' register.sh
cp register.sh $out/nix-support/register-ghclib.sh
sed -i 's/\(ghc-pkg update\)/\1 --user/' register.sh
mkdir -p $out/bin
cp register.sh $out/bin/register-ghclib-${name}.sh
'';
})

View File

@ -5878,7 +5878,7 @@ let pkgs = rec {
};
xmonad = import ../applications/window-managers/xmonad {
inherit stdenv fetchurl ghc X11;
inherit cabal X11;
inherit (xlibs) xmessage;
};