git.iko.soy/typeable/nixpkgs
on master help sign in
Add GHC 7.8.4 and create haskellPackages_ghc784 package set.
commit83119737597c06844fc47b949af74ca47294c4ed authorPeter Simons <simons@cryp.to> dateTue 23 Dec 2014, 20:31 (12 years ago) parent667b97b
3 files changed+52
pkgs/development/compilers/ghc/7.8.4.nix+44 pkgs/top-level/all-packages.nix+1 pkgs/top-level/haskell-defaults.nix+7
pkgs/development/compilers/ghc/7.8.4.nixnew file+44
@@ -0,0 +1,44 @@
1+{ stdenv, fetchurl, ghc, perl, gmp, ncurses }:
2+
3+stdenv.mkDerivation rec {
4+ version = "7.8.4";
5+ name = "ghc-${version}";
6+
7+ src = fetchurl {
8+ url = "http://www.haskell.org/ghc/dist/7.8.4/${name}-src.tar.xz";
9+ sha256 = "1i4254akbb4ym437rf469gc0m40bxm31blp6s1z1g15jmnacs6f3";
10+ };
11+
12+ buildInputs = [ ghc perl gmp ncurses ];
13+
14+ enableParallelBuilding = true;
15+
16+ buildMK = ''
17+ libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-libraries="${gmp}/lib"
18+ libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-includes="${gmp}/include"
19+ DYNAMIC_BY_DEFAULT = NO
20+ '';
21+
22+ preConfigure = ''
23+ echo "${buildMK}" > mk/build.mk
24+ sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure
25+ '' + stdenv.lib.optionalString (!stdenv.isDarwin) ''
26+ export NIX_LDFLAGS="$NIX_LDFLAGS -rpath $out/lib/ghc-${version}"
27+ '';
28+
29+ # required, because otherwise all symbols from HSffi.o are stripped, and
30+ # that in turn causes GHCi to abort
31+ stripDebugFlags = [ "-S" "--keep-file-symbols" ];
32+
33+ meta = with stdenv.lib; {
34+ homepage = "http://haskell.org/ghc";
35+ description = "The Glasgow Haskell Compiler";
36+ maintainers = [ maintainers.marcweber maintainers.andres maintainers.simons ];
37+ inherit (ghc.meta) license;
38+ # Filter old "i686-darwin" platform which is unsupported these days.
39+ platforms = filter (x: elem x platforms.all) ghc.meta.platforms;
40+ # Disable Darwin builds: <https://github.com/NixOS/nixpkgs/issues/2689>.
41+ hydraPlatforms = filter (x: !elem x platforms.darwin) meta.platforms;
42+ };
43+
44+}
pkgs/top-level/all-packages.nix+1
@@ -3363,6 +3363,7 @@ let
33633363 haskellPackages_ghc783_no_profiling = recurseIntoAttrs haskell.packages_ghc783.noProfiling;
33643364 haskellPackages_ghc783_profiling = recurseIntoAttrs haskell.packages_ghc783.profiling;
33653365 haskellPackages_ghc783 = recurseIntoAttrs haskell.packages_ghc783.highPrio;
3366+ haskellPackages_ghc784 = haskell.packages_ghc784;
33663367 haskellPackages_ghcHEAD = haskell.packages_ghcHEAD;
33673368
33683369 haxe = callPackage ../development/compilers/haxe { };
pkgs/top-level/haskell-defaults.nix+7
@@ -232,6 +232,13 @@
232232 prefFun = ghc783Prefs;
233233 };
234234
235+
236+ packages_ghc784 =
237+ packages { ghcPath = ../development/compilers/ghc/7.8.4.nix;
238+ ghcBinary = if stdenv.isDarwin then ghc783Binary else ghc742Binary;
239+ prefFun = ghc783Prefs;
240+ };
241+
235242 packages_ghc763 =
236243 packages { ghcPath = ../development/compilers/ghc/7.6.3.nix;
237244 ghcBinary = ghc704Binary;