From 8a58e5fe49e6aac07414ae8d091f3592875f1910 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andres=20L=C3=B6h?= Date: Sat, 12 Apr 2008 12:34:21 +0000 Subject: [PATCH] * changed xmonad to use generic Cabal builder * version bump to 0.7 svn path=/nixpkgs/trunk/; revision=11609 --- .../window-managers/xmonad/default.nix | 43 ++++--------------- pkgs/top-level/all-packages.nix | 2 +- 2 files changed, 10 insertions(+), 35 deletions(-) diff --git a/pkgs/applications/window-managers/xmonad/default.nix b/pkgs/applications/window-managers/xmonad/default.nix index ccd2dc05adbe..ed01ddd3e335 100644 --- a/pkgs/applications/window-managers/xmonad/default.nix +++ b/pkgs/applications/window-managers/xmonad/default.nix @@ -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 - ''; - }) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 2f0139b6167a..4d114779594b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5878,7 +5878,7 @@ let pkgs = rec { }; xmonad = import ../applications/window-managers/xmonad { - inherit stdenv fetchurl ghc X11; + inherit cabal X11; inherit (xlibs) xmessage; };