ghc prebuilt: Fix indentation

Doing this separately so the other commits are more readable

+117 -119
+29 -30
pkgs/development/compilers/ghc/6.10.2-binary.nix
··· 9 9 name = "ghc-${version}-binary"; 10 10 11 11 src = fetchurl ({ 12 - "i686-linux" = { 13 - # This binary requires libedit.so.0 (rather than libedit.so.2). 14 - url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-i386-unknown-linux.tar.bz2"; 15 - sha256 = "1fw0zr2qshlpk8s0d16k27zcv5263nqdg2xds5ymw8ff6qz9rz9b"; 16 - }; 17 - "x86_64-linux" = { 18 - # Idem. 19 - url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-x86_64-unknown-linux.tar.bz2"; 20 - sha256 = "1rd2j7lmcfsm2rdfb5g6q0l8dz3sxadk5m3d2f69d4a6g4p4h7jj"; 21 - }; 22 - }.${stdenv.hostPlatform.system} 23 - or (throw "cannot bootstrap GHC on this platform")); 12 + "i686-linux" = { 13 + # This binary requires libedit.so.0 (rather than libedit.so.2). 14 + url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-i386-unknown-linux.tar.bz2"; 15 + sha256 = "1fw0zr2qshlpk8s0d16k27zcv5263nqdg2xds5ymw8ff6qz9rz9b"; 16 + }; 17 + "x86_64-linux" = { 18 + # Idem. 19 + url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-x86_64-unknown-linux.tar.bz2"; 20 + sha256 = "1rd2j7lmcfsm2rdfb5g6q0l8dz3sxadk5m3d2f69d4a6g4p4h7jj"; 21 + }; 22 + }.${stdenv.hostPlatform.system} 23 + or (throw "cannot bootstrap GHC on this platform")); 24 24 25 25 buildInputs = [perl]; 26 26 ··· 29 29 # first. The GHC Cabal build system makes use of strip by default and 30 30 # has hardcoded paths to /usr/bin/strip in many places. We replace 31 31 # those below, making them point to our dummy script. 32 - '' 32 + '' 33 33 mkdir "$TMP/bin" 34 34 for i in strip; do 35 35 echo '#! ${stdenv.shell}' > "$TMP/bin/$i" 36 36 chmod +x "$TMP/bin/$i" 37 37 done 38 38 PATH="$TMP/bin:$PATH" 39 - '' + 39 + '' + 40 40 # On Linux, use patchelf to modify the executables so that they can 41 41 # find editline/gmp. 42 42 stdenv.lib.optionalString stdenv.hostPlatform.isLinux '' ··· 46 46 for prog in ld ar gcc strip ranlib; do 47 47 find . -name "setup-config" -exec sed -i "s@/usr/bin/$prog@$(type -p $prog)@g" {} \; 48 48 done 49 - ''; 49 + ''; 50 50 51 51 configurePhase = '' 52 52 ./configure --prefix=$out --with-gmp-libraries=${stdenv.lib.getLib gmp}/lib --with-gmp-includes=${stdenv.lib.getDev gmp}/include ··· 60 60 # calls install-strip ... 61 61 dontBuild = true; 62 62 63 - postInstall = 64 - '' 65 - # bah, the passing gmp doesn't work, so let's add it to the final package.conf in a quick but dirty way 66 - sed -i "s@^\(.*pkgName = PackageName \"rts\".*\libraryDirs = \\[\)\(.*\)@\\1\"${gmp.out}/lib\",\2@" $out/lib/ghc-${version}/package.conf 63 + postInstall = '' 64 + # bah, the passing gmp doesn't work, so let's add it to the final package.conf in a quick but dirty way 65 + sed -i "s@^\(.*pkgName = PackageName \"rts\".*\libraryDirs = \\[\)\(.*\)@\\1\"${gmp.out}/lib\",\2@" $out/lib/ghc-${version}/package.conf 67 66 68 - # Sanity check, can ghc create executables? 69 - cd $TMP 70 - mkdir test-ghc; cd test-ghc 71 - cat > main.hs << EOF 72 - module Main where 73 - main = putStrLn "yes" 74 - EOF 75 - $out/bin/ghc --make main.hs 76 - echo compilation ok 77 - [ $(./main) == "yes" ] 78 - ''; 67 + # Sanity check, can ghc create executables? 68 + cd $TMP 69 + mkdir test-ghc; cd test-ghc 70 + cat > main.hs << EOF 71 + module Main where 72 + main = putStrLn "yes" 73 + EOF 74 + $out/bin/ghc --make main.hs 75 + echo compilation ok 76 + [ $(./main) == "yes" ] 77 + ''; 79 78 80 79 meta = { 81 80 homepage = http://haskell.org/ghc;
+50 -51
pkgs/development/compilers/ghc/7.0.4-binary.nix
··· 9 9 name = "ghc-${version}-binary"; 10 10 11 11 src = fetchurl ({ 12 - "i686-linux" = { 13 - url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-i386-unknown-linux.tar.bz2"; 14 - sha256 = "0mfnihiyjl06f5w1yrjp36sw9g67g2ymg5sdl0g23h1pab99jx63"; 15 - }; 16 - "x86_64-linux" = { 17 - url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-x86_64-unknown-linux.tar.bz2"; 18 - sha256 = "0mc4rhqcxz427wq4zgffmnn0d2yjqvy6af4x9mha283p1gdj5q99"; 19 - }; 20 - "i686-darwin" = { 21 - url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-i386-apple-darwin.tar.bz2"; 22 - sha256 = "0qj45hslrrr8zfks8m1jcb3awwx9rh35ndnpfmb0gwb6j7azq5n3"; 23 - }; 24 - "x86_64-darwin" = { 25 - url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-x86_64-apple-darwin.tar.bz2"; 26 - sha256 = "1m2ml88p1swf4dnv2vq8hz4drcp46n3ahpfi05wh01ajkf8hnn3l"; 27 - }; 28 - }.${stdenv.hostPlatform.system} 29 - or (throw "cannot bootstrap GHC on this platform")); 12 + "i686-linux" = { 13 + url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-i386-unknown-linux.tar.bz2"; 14 + sha256 = "0mfnihiyjl06f5w1yrjp36sw9g67g2ymg5sdl0g23h1pab99jx63"; 15 + }; 16 + "x86_64-linux" = { 17 + url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-x86_64-unknown-linux.tar.bz2"; 18 + sha256 = "0mc4rhqcxz427wq4zgffmnn0d2yjqvy6af4x9mha283p1gdj5q99"; 19 + }; 20 + "i686-darwin" = { 21 + url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-i386-apple-darwin.tar.bz2"; 22 + sha256 = "0qj45hslrrr8zfks8m1jcb3awwx9rh35ndnpfmb0gwb6j7azq5n3"; 23 + }; 24 + "x86_64-darwin" = { 25 + url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-x86_64-apple-darwin.tar.bz2"; 26 + sha256 = "1m2ml88p1swf4dnv2vq8hz4drcp46n3ahpfi05wh01ajkf8hnn3l"; 27 + }; 28 + }.${stdenv.hostPlatform.system} 29 + or (throw "cannot bootstrap GHC on this platform")); 30 30 31 31 buildInputs = [perl]; 32 32 ··· 41 41 # first. The GHC Cabal build system makes use of strip by default and 42 42 # has hardcoded paths to /usr/bin/strip in many places. We replace 43 43 # those below, making them point to our dummy script. 44 - '' 44 + '' 45 45 mkdir "$TMP/bin" 46 46 for i in strip; do 47 47 echo '#! ${stdenv.shell}' > "$TMP/bin/$i" 48 48 chmod +x "$TMP/bin/$i" 49 49 done 50 50 PATH="$TMP/bin:$PATH" 51 - '' + 51 + '' + 52 52 # We have to patch the GMP paths for the integer-gmp package. 53 - '' 53 + '' 54 54 find . -name integer-gmp.buildinfo \ 55 55 -exec sed -i "s@extra-lib-dirs: @extra-lib-dirs: ${gmp.out}/lib@" {} \; 56 - '' + stdenv.lib.optionalString stdenv.isDarwin '' 56 + '' + stdenv.lib.optionalString stdenv.isDarwin '' 57 57 find . -name base.buildinfo \ 58 58 -exec sed -i "s@extra-lib-dirs: @extra-lib-dirs: ${libiconv}/lib@" {} \; 59 - '' + 59 + '' + 60 60 # On Linux, use patchelf to modify the executables so that they can 61 61 # find editline/gmp. 62 62 stdenv.lib.optionalString stdenv.isLinux '' ··· 68 68 for prog in ld ar gcc strip ranlib; do 69 69 find . -name "setup-config" -exec sed -i "s@/usr/bin/$prog@$(type -p $prog)@g" {} \; 70 70 done 71 - '' + stdenv.lib.optionalString stdenv.isDarwin '' 72 - # not enough room in the object files for the full path to libiconv :( 73 - fix () { 74 - install_name_tool -change /usr/lib/libiconv.2.dylib @executable_path/libiconv.dylib $1 75 - } 71 + '' + stdenv.lib.optionalString stdenv.isDarwin '' 72 + # not enough room in the object files for the full path to libiconv :( 73 + fix () { 74 + install_name_tool -change /usr/lib/libiconv.2.dylib @executable_path/libiconv.dylib $1 75 + } 76 76 77 - ln -s ${libiconv}/lib/libiconv.dylib ghc-${version}/utils/ghc-pwd/dist/build/tmp 78 - ln -s ${libiconv}/lib/libiconv.dylib ghc-${version}/utils/hpc/dist/build/tmp 79 - ln -s ${libiconv}/lib/libiconv.dylib ghc-${version}/ghc/stage2/build/tmp 77 + ln -s ${libiconv}/lib/libiconv.dylib ghc-${version}/utils/ghc-pwd/dist/build/tmp 78 + ln -s ${libiconv}/lib/libiconv.dylib ghc-${version}/utils/hpc/dist/build/tmp 79 + ln -s ${libiconv}/lib/libiconv.dylib ghc-${version}/ghc/stage2/build/tmp 80 80 81 - for file in ghc-cabal ghc-pwd ghc-stage2 ghc-pkg haddock hsc2hs hpc; do 82 - fix $(find . -type f -name $file) 83 - done 81 + for file in ghc-cabal ghc-pwd ghc-stage2 ghc-pkg haddock hsc2hs hpc; do 82 + fix $(find . -type f -name $file) 83 + done 84 84 85 - for file in $(find . -name setup-config); do 86 - substituteInPlace $file --replace /usr/bin/ranlib "$(type -P ranlib)" 87 - done 88 - ''; 85 + for file in $(find . -name setup-config); do 86 + substituteInPlace $file --replace /usr/bin/ranlib "$(type -P ranlib)" 87 + done 88 + ''; 89 89 90 90 configurePhase = '' 91 91 ./configure --prefix=$out \ ··· 101 101 # calls install-strip ... 102 102 dontBuild = true; 103 103 104 - postInstall = 105 - '' 106 - # Sanity check, can ghc create executables? 107 - cd $TMP 108 - mkdir test-ghc; cd test-ghc 109 - cat > main.hs << EOF 110 - module Main where 111 - main = putStrLn "yes" 112 - EOF 113 - $out/bin/ghc --make main.hs 114 - echo compilation ok 115 - [ $(./main) == "yes" ] 116 - ''; 104 + postInstall = '' 105 + # Sanity check, can ghc create executables? 106 + cd $TMP 107 + mkdir test-ghc; cd test-ghc 108 + cat > main.hs << EOF 109 + module Main where 110 + main = putStrLn "yes" 111 + EOF 112 + $out/bin/ghc --make main.hs 113 + echo compilation ok 114 + [ $(./main) == "yes" ] 115 + ''; 117 116 118 117 meta.license = stdenv.lib.licenses.bsd3; 119 118 meta.platforms = ["x86_64-linux" "i686-linux" "x86_64-darwin"];
+38 -38
pkgs/development/compilers/ghc/7.4.2-binary.nix
··· 9 9 name = "ghc-${version}-binary"; 10 10 11 11 src = fetchurl ({ 12 - "i686-linux" = { 13 - url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-i386-unknown-linux.tar.bz2"; 14 - sha256 = "0gny7knhss0w0d9r6jm1gghrcb8kqjvj94bb7hxf9syrk4fxlcxi"; 15 - }; 16 - "x86_64-linux" = { 17 - url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-x86_64-unknown-linux.tar.bz2"; 18 - sha256 = "043jabd0lh6n1zlqhysngbpvlsdznsa2mmsj08jyqgahw9sjb5ns"; 19 - }; 20 - "i686-darwin" = { 21 - url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-i386-apple-darwin.tar.bz2"; 22 - sha256 = "1vrbs3pzki37hzym1f1nh07lrqh066z3ypvm81fwlikfsvk4djc0"; 23 - }; 24 - "x86_64-darwin" = { 25 - url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-x86_64-apple-darwin.tar.bz2"; 26 - sha256 = "1imzqc0slpg0r6p40n5a9m18cbcm0m86z8dgyhfxcckksw54mzwf"; 27 - }; 28 - }.${stdenv.hostPlatform.system} 29 - or (throw "cannot bootstrap GHC on this platform")); 12 + "i686-linux" = { 13 + url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-i386-unknown-linux.tar.bz2"; 14 + sha256 = "0gny7knhss0w0d9r6jm1gghrcb8kqjvj94bb7hxf9syrk4fxlcxi"; 15 + }; 16 + "x86_64-linux" = { 17 + url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-x86_64-unknown-linux.tar.bz2"; 18 + sha256 = "043jabd0lh6n1zlqhysngbpvlsdznsa2mmsj08jyqgahw9sjb5ns"; 19 + }; 20 + "i686-darwin" = { 21 + url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-i386-apple-darwin.tar.bz2"; 22 + sha256 = "1vrbs3pzki37hzym1f1nh07lrqh066z3ypvm81fwlikfsvk4djc0"; 23 + }; 24 + "x86_64-darwin" = { 25 + url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-x86_64-apple-darwin.tar.bz2"; 26 + sha256 = "1imzqc0slpg0r6p40n5a9m18cbcm0m86z8dgyhfxcckksw54mzwf"; 27 + }; 28 + }.${stdenv.hostPlatform.system} 29 + or (throw "cannot bootstrap GHC on this platform")); 30 30 31 31 buildInputs = [perl]; 32 32 ··· 41 41 # first. The GHC Cabal build system makes use of strip by default and 42 42 # has hardcoded paths to /usr/bin/strip in many places. We replace 43 43 # those below, making them point to our dummy script. 44 - '' 44 + '' 45 45 mkdir "$TMP/bin" 46 46 for i in strip; do 47 47 echo '#! ${stdenv.shell}' > "$TMP/bin/$i" 48 48 chmod +x "$TMP/bin/$i" 49 49 done 50 50 PATH="$TMP/bin:$PATH" 51 - '' + 51 + '' + 52 52 # We have to patch the GMP paths for the integer-gmp package. 53 - '' 53 + '' 54 54 find . -name integer-gmp.buildinfo \ 55 55 -exec sed -i "s@extra-lib-dirs: @extra-lib-dirs: ${gmp.out}/lib@" {} \; 56 - '' + stdenv.lib.optionalString stdenv.isDarwin '' 56 + '' + stdenv.lib.optionalString stdenv.isDarwin '' 57 57 find . -name base.buildinfo \ 58 58 -exec sed -i "s@extra-lib-dirs: @extra-lib-dirs: ${libiconv}/lib@" {} \; 59 - '' + 59 + '' + 60 60 # On Linux, use patchelf to modify the executables so that they can 61 61 # find editline/gmp. 62 62 stdenv.lib.optionalString stdenv.isLinux '' ··· 73 73 for prog in ld ar gcc strip ranlib; do 74 74 find . -name "setup-config" -exec sed -i "s@/usr/bin/$prog@$(type -p $prog)@g" {} \; 75 75 done 76 - '' + stdenv.lib.optionalString stdenv.isDarwin '' 77 - # not enough room in the object files for the full path to libiconv :( 78 - fix () { 79 - install_name_tool -change /usr/lib/libiconv.2.dylib @executable_path/libiconv.dylib $1 80 - } 76 + '' + stdenv.lib.optionalString stdenv.isDarwin '' 77 + # not enough room in the object files for the full path to libiconv :( 78 + fix () { 79 + install_name_tool -change /usr/lib/libiconv.2.dylib @executable_path/libiconv.dylib $1 80 + } 81 81 82 - ln -s ${libiconv}/lib/libiconv.dylib ghc-${version}/utils/ghc-pwd/dist-install/build/tmp 83 - ln -s ${libiconv}/lib/libiconv.dylib ghc-${version}/utils/hpc/dist-install/build/tmp 84 - ln -s ${libiconv}/lib/libiconv.dylib ghc-${version}/ghc/stage2/build/tmp 82 + ln -s ${libiconv}/lib/libiconv.dylib ghc-${version}/utils/ghc-pwd/dist-install/build/tmp 83 + ln -s ${libiconv}/lib/libiconv.dylib ghc-${version}/utils/hpc/dist-install/build/tmp 84 + ln -s ${libiconv}/lib/libiconv.dylib ghc-${version}/ghc/stage2/build/tmp 85 85 86 - for file in ghc-cabal ghc-pwd ghc-stage2 ghc-pkg haddock hsc2hs hpc; do 87 - fix $(find . -type f -name $file) 88 - done 86 + for file in ghc-cabal ghc-pwd ghc-stage2 ghc-pkg haddock hsc2hs hpc; do 87 + fix $(find . -type f -name $file) 88 + done 89 89 90 - for file in $(find . -name setup-config); do 91 - substituteInPlace $file --replace /usr/bin/ranlib "$(type -P ranlib)" 92 - done 93 - ''; 90 + for file in $(find . -name setup-config); do 91 + substituteInPlace $file --replace /usr/bin/ranlib "$(type -P ranlib)" 92 + done 93 + ''; 94 94 95 95 configurePhase = '' 96 96 ./configure --prefix=$out \