From 84e89e2fca6be0da03d1fddf9416225b2bbf3b02 Mon Sep 17 00:00:00 2001 From: Christof Douma Date: Wed, 25 Jan 2006 11:19:21 +0000 Subject: [PATCH] added uulib - a ghc library (ghc wrapper is needed to use it with cabal - see comments in builder.sh) svn path=/nixpkgs/trunk/; revision=4588 --- .../libraries/haskell/uulib/builder.sh | 36 +++++++++++++++++++ .../libraries/haskell/uulib/default.nix | 11 ++++++ pkgs/system/all-packages-generic.nix | 6 ++++ pkgs/system/populate-cache.nix | 1 + 4 files changed, 54 insertions(+) create mode 100644 pkgs/development/libraries/haskell/uulib/builder.sh create mode 100644 pkgs/development/libraries/haskell/uulib/default.nix diff --git a/pkgs/development/libraries/haskell/uulib/builder.sh b/pkgs/development/libraries/haskell/uulib/builder.sh new file mode 100644 index 000000000000..1769fe66b8a4 --- /dev/null +++ b/pkgs/development/libraries/haskell/uulib/builder.sh @@ -0,0 +1,36 @@ +source $stdenv/setup + +#manual setup of ghc +PATH=$ghc/bin:$PATH + +#unpack +tar xzf "$src" && +cd uulib-* && + +#configure +ghc --make Setup.hs -o setup -package Cabal && +./setup configure --prefix=$out && + +#make +./setup build && + +#install +./setup copy && + +#register package locally (might use wrapper instead of ugly sed) +echo '[]' > package.conf && +./setup register --gen-script && +sed "/ghc-pkg/ s|update -|-f package.conf update -|" register.sh > register-local.sh && +sh register-local.sh && +mv package.conf $out/ && + +#add dependencies +#dependencies contains a FSO per line +#for ghc : prefix each FSO with -package-conf +#for ghc-pkg : prefix each FSO with -f or --package-conf (note the difference with ghc) +#both : append with package.conf +# +#example: $(sort FSO1/dependencies FSO2/dependencies | uniq | sed 's|^|FSO/|; s|$|/package.conf|') + +#no dependencies +touch $out/dependencies diff --git a/pkgs/development/libraries/haskell/uulib/default.nix b/pkgs/development/libraries/haskell/uulib/default.nix new file mode 100644 index 000000000000..18371d948b1e --- /dev/null +++ b/pkgs/development/libraries/haskell/uulib/default.nix @@ -0,0 +1,11 @@ +{stdenv, fetchurl, ghc}: + +stdenv.mkDerivation { + name = "uulib-0.9.2"; + src = fetchurl { + url = http://abaris.zoo.cs.uu.nl:8080/wiki/pub/HUT/Download/uulib-0.9.2-src.tar.gz; + md5 = "0cc9acc6a268e2bc5c8a954e67406e2d"; + }; + builder = ./builder.sh; + inherit ghc; +} diff --git a/pkgs/system/all-packages-generic.nix b/pkgs/system/all-packages-generic.nix index 0992aa890772..1b8f0b7c5d01 100644 --- a/pkgs/system/all-packages-generic.nix +++ b/pkgs/system/all-packages-generic.nix @@ -1248,6 +1248,12 @@ rec { inherit (xlibs) libXtst; }; + ### DEVELOPMENT / LIBRARIES / HASKELL + + uulib = import ../development/libraries/haskell/uulib { + inherit stdenv fetchurl ghc; + }; + ### DEVELOPMENT / PERL MODULES perlBerkeleyDB = import ../development/perl-modules/BerkeleyDB { diff --git a/pkgs/system/populate-cache.nix b/pkgs/system/populate-cache.nix index 2f67e7bcefdb..b9111e8fed24 100644 --- a/pkgs/system/populate-cache.nix +++ b/pkgs/system/populate-cache.nix @@ -56,6 +56,7 @@ let { transformers ghc + uulib # helium perl python