nixpkgs/pkgs/applications/window-managers/xmonad/default.nix
Andres Löh c08a54cb66 * added xmonad (runtime reconfiguration does not yet work)
* added Haskell X11 bindings (required for xmonad)
* added missing entry for alex in all-packages.nix

svn path=/nixpkgs/trunk/; revision=10171
2008-01-16 10:35:49 +00:00

43 lines
1,003 B
Nix

{stdenv, fetchurl, ghc, X11, xmessage}:
stdenv.mkDerivation (rec {
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];
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"
'';
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
'';
})