git.iko.soy/typeable/nixpkgs
on master help sign in
ghc prebuilt: Fix indentation

Doing this separately so the other commits are more readable

commit2d521567933718dee4f820efb3b41a2baaf08d02 authorJohn Ericson <John.Ericson@Obsidian.Systems> dateFri 22 Sep 2017, 13:45 (9 years ago) parenta8ef3f6
3 files changed+120−122
pkgs/development/compilers/ghc/6.10.2-binary.nix+29−30 pkgs/development/compilers/ghc/7.0.4-binary.nix+50−51 pkgs/development/compilers/ghc/7.4.2-binary.nix+41−41
pkgs/development/compilers/ghc/6.10.2-binary.nix+29−30
@@ -9,18 +9,18 @@ stdenv.mkDerivation rec {
99 name = "ghc-${version}-binary";
1010
1111 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"));
2424
2525 buildInputs = [perl];
2626
@@ -29,14 +29,14 @@ stdenv.mkDerivation rec {
2929 # first. The GHC Cabal build system makes use of strip by default and
3030 # has hardcoded paths to /usr/bin/strip in many places. We replace
3131 # those below, making them point to our dummy script.
32− ''
32+ ''
3333 mkdir "$TMP/bin"
3434 for i in strip; do
3535 echo '#! ${stdenv.shell}' > "$TMP/bin/$i"
3636 chmod +x "$TMP/bin/$i"
3737 done
3838 PATH="$TMP/bin:$PATH"
39− '' +
39+ '' +
4040 # On Linux, use patchelf to modify the executables so that they can
4141 # find editline/gmp.
4242 stdenv.lib.optionalString stdenv.hostPlatform.isLinux ''
@@ -46,7 +46,7 @@ stdenv.mkDerivation rec {
4646 for prog in ld ar gcc strip ranlib; do
4747 find . -name "setup-config" -exec sed -i "s@/usr/bin/$prog@$(type -p $prog)@g" {} \;
4848 done
49− '';
49+ '';
5050
5151 configurePhase = ''
5252 ./configure --prefix=$out --with-gmp-libraries=${stdenv.lib.getLib gmp}/lib --with-gmp-includes=${stdenv.lib.getDev gmp}/include
@@ -60,22 +60,21 @@ stdenv.mkDerivation rec {
6060 # calls install-strip ...
6161 dontBuild = true;
6262
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
6766
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+ '';
7978
8079 meta = {
8180 homepage = http://haskell.org/ghc;
pkgs/development/compilers/ghc/7.0.4-binary.nix+50−51
@@ -9,24 +9,24 @@ stdenv.mkDerivation rec {
99 name = "ghc-${version}-binary";
1010
1111 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"));
3030
3131 buildInputs = [perl];
3232
@@ -41,22 +41,22 @@ stdenv.mkDerivation rec {
4141 # first. The GHC Cabal build system makes use of strip by default and
4242 # has hardcoded paths to /usr/bin/strip in many places. We replace
4343 # those below, making them point to our dummy script.
44− ''
44+ ''
4545 mkdir "$TMP/bin"
4646 for i in strip; do
4747 echo '#! ${stdenv.shell}' > "$TMP/bin/$i"
4848 chmod +x "$TMP/bin/$i"
4949 done
5050 PATH="$TMP/bin:$PATH"
51− '' +
51+ '' +
5252 # We have to patch the GMP paths for the integer-gmp package.
53− ''
53+ ''
5454 find . -name integer-gmp.buildinfo \
5555 -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 ''
5757 find . -name base.buildinfo \
5858 -exec sed -i "s@extra-lib-dirs: @extra-lib-dirs: ${libiconv}/lib@" {} \;
59− '' +
59+ '' +
6060 # On Linux, use patchelf to modify the executables so that they can
6161 # find editline/gmp.
6262 stdenv.lib.optionalString stdenv.isLinux ''
@@ -68,24 +68,24 @@ stdenv.mkDerivation rec {
6868 for prog in ld ar gcc strip ranlib; do
6969 find . -name "setup-config" -exec sed -i "s@/usr/bin/$prog@$(type -p $prog)@g" {} \;
7070 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+ }
7676
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
8080
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
8484
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+ '';
8989
9090 configurePhase = ''
9191 ./configure --prefix=$out \
@@ -101,19 +101,18 @@ stdenv.mkDerivation rec {
101101 # calls install-strip ...
102102 dontBuild = true;
103103
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+ '';
117116
118117 meta.license = stdenv.lib.licenses.bsd3;
119118 meta.platforms = ["x86_64-linux" "i686-linux" "x86_64-darwin"];
pkgs/development/compilers/ghc/7.4.2-binary.nix+41−41
@@ -9,24 +9,24 @@ stdenv.mkDerivation rec {
99 name = "ghc-${version}-binary";
1010
1111 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"));
3030
3131 buildInputs = [perl];
3232
@@ -41,22 +41,22 @@ stdenv.mkDerivation rec {
4141 # first. The GHC Cabal build system makes use of strip by default and
4242 # has hardcoded paths to /usr/bin/strip in many places. We replace
4343 # those below, making them point to our dummy script.
44− ''
44+ ''
4545 mkdir "$TMP/bin"
4646 for i in strip; do
4747 echo '#! ${stdenv.shell}' > "$TMP/bin/$i"
4848 chmod +x "$TMP/bin/$i"
4949 done
5050 PATH="$TMP/bin:$PATH"
51− '' +
51+ '' +
5252 # We have to patch the GMP paths for the integer-gmp package.
53− ''
53+ ''
5454 find . -name integer-gmp.buildinfo \
5555 -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 ''
5757 find . -name base.buildinfo \
5858 -exec sed -i "s@extra-lib-dirs: @extra-lib-dirs: ${libiconv}/lib@" {} \;
59− '' +
59+ '' +
6060 # On Linux, use patchelf to modify the executables so that they can
6161 # find editline/gmp.
6262 stdenv.lib.optionalString stdenv.isLinux ''
@@ -73,24 +73,24 @@ stdenv.mkDerivation rec {
7373 for prog in ld ar gcc strip ranlib; do
7474 find . -name "setup-config" -exec sed -i "s@/usr/bin/$prog@$(type -p $prog)@g" {} \;
7575 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− }
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
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
89−
90− for file in $(find . -name setup-config); do
91− substituteInPlace $file --replace /usr/bin/ranlib "$(type -P ranlib)"
92− done
93− '';
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+
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+
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+
90+ for file in $(find . -name setup-config); do
91+ substituteInPlace $file --replace /usr/bin/ranlib "$(type -P ranlib)"
92+ done
93+ '';
9494
9595 configurePhase = ''
9696 ./configure --prefix=$out \