diff options
author | Marc Weber <marco-oweber@gmx.de> | 2008-10-26 17:44:03 +0000 |
---|---|---|
committer | Marc Weber <marco-oweber@gmx.de> | 2008-10-26 17:44:03 +0000 |
commit | 2cb8e66b8f5f8d09b0a2a9a1a9b82ec66c3dfb73 (patch) | |
tree | 1889d9f4313997152de0e8eae76ebde44ee44219 | |
parent | 8f633828edb35a30e44869fc4fb6612ea1785bc7 (diff) | |
download | nixpkgs-2cb8e66b8f5f8d09b0a2a9a1a9b82ec66c3dfb73.tar nixpkgs-2cb8e66b8f5f8d09b0a2a9a1a9b82ec66c3dfb73.tar.gz nixpkgs-2cb8e66b8f5f8d09b0a2a9a1a9b82ec66c3dfb73.tar.bz2 nixpkgs-2cb8e66b8f5f8d09b0a2a9a1a9b82ec66c3dfb73.tar.lz nixpkgs-2cb8e66b8f5f8d09b0a2a9a1a9b82ec66c3dfb73.tar.xz nixpkgs-2cb8e66b8f5f8d09b0a2a9a1a9b82ec66c3dfb73.tar.zst nixpkgs-2cb8e66b8f5f8d09b0a2a9a1a9b82ec66c3dfb73.zip |
removed dead code. I think this kind of builder is to heavy for hundreds of haskell packages which we might have in the future
svn path=/nixpkgs/trunk/; revision=13118
-rw-r--r-- | pkgs/top-level/builder-defs.nix | 63 |
1 files changed, 0 insertions, 63 deletions
diff --git a/pkgs/top-level/builder-defs.nix b/pkgs/top-level/builder-defs.nix index be6365ea875..ac02476c0f9 100644 --- a/pkgs/top-level/builder-defs.nix +++ b/pkgs/top-level/builder-defs.nix @@ -381,69 +381,6 @@ args: with args; with stringsWithDeps; with lib; surroundWithCommands = x : before : after : {deps=x.deps; text = before + "\n" + x.text + "\n" + after ;}; - - # some haskell stuff - untested! - # -------------------------------------------------------- - # creates a setup hook - # adding the package database - # nix-support/package.conf to GHC_PACKAGE_PATH - # if not already contained - # using nix-support because user does'nt want to have it in it's - # nix-profile I think? - defSetupHookRegisteringPackageDatabase = noDepEntry ( - "\nsetupHookRegisteringPackageDatabase(){" + - "\n ensureDir $out/nix-support;" + - "\n if test -n \"$1\"; then" + - "\n local pkgdb=$1" + - "\n else" + - "\n local pkgdb=$out/nix-support/package.conf" + - "\n fi" + - "\n cat >> $out/nix-support/setup-hook << EOF" + - "\n " + - "\n echo \$GHC_PACKAGE_PATH | grep -l $pkgdb &> /dev/null || \" "+ - "\n export GHC_PACKAGE_PATH=\$GHC_PACKAGE_PATH\${GHC_PACKAGE_PATH:+\"\${PATH_DELIMITER}\"}$pkgdb;" + - "\nEOF" + - "\n}"); - - # Either rungghc or compile setup.hs - # / which one is better ? runghc had some trouble with ghc-6.6.1 - defCabalSetupCmd = noDepEntry " - CABAL_SETUP=\"runghc setup.hs\" - "; - - # create an empty package database in which the new library can be registered. - defCreateEmptyPackageDatabaseAndSetupHook = FullDepEntry " - createEmptyPackageDatabaseAndSetupHook(){ - ensureDir $out/nix-support; - PACKAGE_DB=$out/nix-support/package.conf; - echo '[]' > \"$PACKAGE_DB\"; - setupHookRegisteringPackageDatabase - }" ["defSetupHookRegisteringPackageDatabase" "defEnsureDir"]; - - # Cabal does only support --user ($HOME/.ghc/** ) and --global (/nix/store/*-ghc/lib/...) - # But we need kind of --custom=my-package-db - # by accident cabal does support using multiple databases passed by GHC_PACKAGE_PATH - # - # Options: - # 1) create a local package db containing all dependencies - # 2) create a single db file for each package merging them using GHC_PACKAGE_PATH=db1:db2 - # (no trailing : which would mean add global and user db) - # I prefer 2) (Marc Weber) so the most convinient way is - # using ./setup copy to install - # and ./setup register --gen-script to install to our local database - # after replacing /usr/lib etc with our pure $out path - cabalBuild = FullDepEntry - " createEmptyPackageDatabaseAndSetupHook - ghc --make setup.hs -o setup - \$CABAL_SETUP configure - \$CABAL_SETUP build - \$CABAL_SETUP copy --dest-dir=\$out - \$CABAL_SETUP register --gen-script - sed -e 's=/usr/local/lib=\$out=g' \\ - -i register.sh - GHC_PACKAGE_PATH=\$PACKAGE_DB ./register.sh - " ["defCreateEmptyPackageDatabaseAndSetupHook" "defCabalSetupCmd"]; - realPhaseNames = args.phaseNames ++ ["doForceShare" "doPropagate" "doForceCopy"] ++ |