diff options
Diffstat (limited to 'pkgs/development/compilers/ghc')
-rw-r--r-- | pkgs/development/compilers/ghc/ghc-wrapper/default.nix | 51 | ||||
-rw-r--r-- | pkgs/development/compilers/ghc/ghc-wrapper/ghc-cabal-executable-fun.nix | 17 |
2 files changed, 0 insertions, 68 deletions
diff --git a/pkgs/development/compilers/ghc/ghc-wrapper/default.nix b/pkgs/development/compilers/ghc/ghc-wrapper/default.nix deleted file mode 100644 index 9cff8095c65f..000000000000 --- a/pkgs/development/compilers/ghc/ghc-wrapper/default.nix +++ /dev/null @@ -1,51 +0,0 @@ -args: with args; with lib; - -stdenv.mkDerivation { - inherit suffix name ghc readline ncurses; - - buildInputs = (libraries ++ [ghcPkgUtil]); - tags = if installSourceAndTags then - map (x : sourceWithTagsDerivation (sourceWithTagsFromDerivation x)) - ( uniqList { inputList= filter annotatedWithSourceAndTagInfo libraries; } ) - else []; - - phases="installPhase"; - - installPhase=" - set -e - ensureDir \$out/bin - if test -n \"\$ghcPackagedLibs\"; then - g=:\$(echo \$ghc/lib/ghc-*/package.conf) - fi - - for a in ghc ghci ghc-pkg; do - app=$(ls -al $ghc/bin/$a | sed -n 's%.*-> \\(.*\\)%\\1%p'); -cat > \"\$out/bin/\$a$suffix\" << EOF -#!`type -f sh | gawk '{ print $3; }'` -export LIBRARY_PATH=\$readline/lib:\$ncurses/lib -GHC_PACKAGE_PATH=\${GHC_PACKAGE_PATH}\${g} \$ghc/bin/$app \"\\\$@\" -EOF - chmod +x \"\$out/bin/\$a$suffix\" - done - - ensureDir \$out/src - for i in \$tags; do - ln -s \$i/src/* \$out/src - done - - ensureDir \$out/bin - for i in `echo $GHC_PACKAGE_PATH | sed 's/:/ /g'`; do - o=\${i/lib*/} - o=\${i/nix-support*/} - for j in \$ghc/bin/* `find \${o}bin/ -type f 2>/dev/null` `find \${o}usr/local/bin/ -type f 2>/dev/null`; do - b=`basename \$j` - if [ \$b == sh ]; then continue; fi - if [ \$b == bash ]; then continue; fi - if [ \$b == bashbug ]; then continue; fi - if [ \$b == bashbug ]; then continue; fi - if [ -e \$out/bin/\$b ]; then continue; fi - ln -s \$j \$out/bin/; - done - done -"; -} diff --git a/pkgs/development/compilers/ghc/ghc-wrapper/ghc-cabal-executable-fun.nix b/pkgs/development/compilers/ghc/ghc-wrapper/ghc-cabal-executable-fun.nix deleted file mode 100644 index 1fe0dac74758..000000000000 --- a/pkgs/development/compilers/ghc/ghc-wrapper/ghc-cabal-executable-fun.nix +++ /dev/null @@ -1,17 +0,0 @@ -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 []); }) |