diff --git a/pkgs/misc/ghc68_extra_libs/default.nix b/pkgs/misc/ghc68_extra_libs/default.nix index 4112edbe8836..860a7e6666e1 100644 --- a/pkgs/misc/ghc68_extra_libs/default.nix +++ b/pkgs/misc/ghc68_extra_libs/default.nix @@ -55,6 +55,19 @@ rec { # echo 'build-depends: old-locale, old-time' >> *.cabal"; # }; + takusen = rec { name = "takusen-0.8"; p_deps = [ x.base x.mtl x.haskell98 x.time postgresql sqlite ]; + src = sourceByName "takusen"; + pass = { + inherit postgresql sqlite; + patch = ./takusen_setup_patch; + # no ODBC, Oracle support in nix + patchPhase = "patch -p1 Setup.hs < \$patch + sed -e '/ODBC/d' -i Takusen.cabal + sed -e '/Oracle/d' -i Takusen.cabal + sed -e \"s=pg_path=\$postgresql=\" -e \"s=sqlite_path=\$sqlite=\" -i Setup.hs + "; + }; + }; # 1.13 is stable. There are more recent non stable versions haxml = rec { name = "HaXml-1.13.3"; p_deps = [ x.base x.rts x.directory x.process x.pretty x.containers x.filepath x.haskell98 ]; diff --git a/pkgs/misc/ghc68_extra_libs/takusen_setup_patch b/pkgs/misc/ghc68_extra_libs/takusen_setup_patch new file mode 100644 index 000000000000..baa318de5568 --- /dev/null +++ b/pkgs/misc/ghc68_extra_libs/takusen_setup_patch @@ -0,0 +1,51 @@ +--- orig/Setup.hs 2008-03-11 16:35:54.000000000 +0100 ++++ mod/Setup.hs 2008-03-11 16:45:16.000000000 +0100 +@@ -1,3 +1,4 @@ ++-- packages:HAppS-Server,mtl,HAppS-Data,HAppS-State,mtl,process,filepath,Cabal,directory + -- #!/usr/bin/env runhaskell + + {-# OPTIONS -cpp #-} +@@ -8,12 +9,13 @@ + import Control.Exception (bracket) + import Control.Monad (when) + import Data.List (isPrefixOf, unionBy) ++import Distribution.PackageDescription.Parse (writeHookedBuildInfo) + import Distribution.PackageDescription + ( PackageDescription(..), Library(..), BuildInfo(..), HookedBuildInfo +- , emptyHookedBuildInfo, writeHookedBuildInfo, emptyBuildInfo, hasLibs ++ , emptyHookedBuildInfo, emptyBuildInfo, hasLibs + ) + import Distribution.Simple.Setup -- ( --Flag, fromFlag, toFlag +- ( ConfigFlags(..), BuildFlags(..) ++ ( fromFlag, Flag(..), ConfigFlags(..), BuildFlags(..) + , InstallFlags(..), HaddockFlags(..) + , CopyFlags(..) + , RegisterFlags(..), emptyRegisterFlags +@@ -78,11 +80,16 @@ + preConf args flags = do + try (removeFile "takusen.buildinfo") + return emptyHookedBuildInfo ++ conf libName path = (Just emptyBuildInfo { ++ extraLibs = [libName] ++ , extraLibDirs = [ path ++ "/lib" ] ++ , includeDirs = [ path ++ "/include" ] ++ }) + postConf :: Args -> ConfigFlags -> PackageDescription -> LocalBuildInfo -> IO () + postConf args flags _ localbuildinfo = do + let verbose = (configVerbose flags) +- sqliteBI <- configSqlite3 verbose +- pgBI <- configPG verbose ++ let sqliteBI = conf "sqlite3" "sqlite_path" ++ let pgBI = conf "pq" "pg_path" + oraBI <- configOracle verbose + odbcBI <- configOdbc verbose + let bis = [sqliteBI, pgBI, oraBI, odbcBI] +@@ -99,7 +106,7 @@ + defaultInstallHook :: PackageDescription -> LocalBuildInfo + -> UserHooks -> InstallFlags -> IO () + defaultInstallHook pkg_descr localbuildinfo _ (InstallFlags uInstFlag verbosity) = do +- install pkg_descr localbuildinfo (CopyFlags NoCopyDest verbosity) ++ install pkg_descr localbuildinfo (CopyFlags (Flag NoCopyDest) verbosity) + when (hasLibs pkg_descr) $ + register pkg_descr localbuildinfo + emptyRegisterFlags{ regPackageDB=uInstFlag, regVerbose=verbosity }