1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-09-11 15:08:33 +01:00

still missing piece

svn path=/nixpkgs/trunk/; revision=11566
This commit is contained in:
Marc Weber 2008-04-11 10:25:28 +00:00
parent 05ebf87bbf
commit b40945afba

View file

@ -0,0 +1,17 @@
args: with args;
{ name, src, meta ? {}, libsFun, pass ? {} } :
let buildInputs = libsFun ((ghc68extraLibs ghcsAndLibs.ghc68) // ghcsAndLibs.ghc68.core_libs)
++ [ ghcsAndLibs.ghc68.ghc perl ];
in stdenv.mkDerivation ({
inherit name src meta;
phases = "unpackPhase patchPhase buildPhase";
# TODO The ghc must be the one having compiled the libs.. So make this obvious by not having to pass it
buildPhase = ''
ghc --make Setup.*hs -o setup
ensureDir \out
nix_ghc_pkg_tool join local-pkg-db
./setup configure --prefix=$out --package-db=local-pkg-db
./setup build
./setup install
'';
} // pass // { buildInputs = buildInputs ++ (if pass ? buildInputs then lib.toList pass.buildInputs else []); })