summary refs log tree commit diff
path: root/pkgs/development/compilers
diff options
context:
space:
mode:
authorDavid Johnson <djohnson.m@gmail.com>2017-02-04 11:19:14 -0600
committerDavid Johnson <djohnson.m@gmail.com>2017-03-10 19:31:12 -0600
commit26623240e93f8454ac69f66a3a025d98a7e94b71 (patch)
treee929462cc37cde5d489f87bcf3bbe40be5b5f601 /pkgs/development/compilers
parent2839b101f927be5daab7948421de00a6f6c084ae (diff)
downloadnixlib-26623240e93f8454ac69f66a3a025d98a7e94b71.tar
nixlib-26623240e93f8454ac69f66a3a025d98a7e94b71.tar.gz
nixlib-26623240e93f8454ac69f66a3a025d98a7e94b71.tar.bz2
nixlib-26623240e93f8454ac69f66a3a025d98a7e94b71.tar.lz
nixlib-26623240e93f8454ac69f66a3a025d98a7e94b71.tar.xz
nixlib-26623240e93f8454ac69f66a3a025d98a7e94b71.tar.zst
nixlib-26623240e93f8454ac69f66a3a025d98a7e94b71.zip
Init HaLVM at 2.4.0
Diffstat (limited to 'pkgs/development/compilers')
-rw-r--r--pkgs/development/compilers/ghc/7.10.3.nix1
-rw-r--r--pkgs/development/compilers/halvm/2.4.0.nix48
2 files changed, 48 insertions, 1 deletions
diff --git a/pkgs/development/compilers/ghc/7.10.3.nix b/pkgs/development/compilers/ghc/7.10.3.nix
index d75f5df370f8..5c6b62bee6f1 100644
--- a/pkgs/development/compilers/ghc/7.10.3.nix
+++ b/pkgs/development/compilers/ghc/7.10.3.nix
@@ -82,5 +82,4 @@ stdenv.mkDerivation rec {
     maintainers = with stdenv.lib.maintainers; [ marcweber andres peti ];
     inherit (ghc.meta) license platforms;
   };
-
 }
diff --git a/pkgs/development/compilers/halvm/2.4.0.nix b/pkgs/development/compilers/halvm/2.4.0.nix
new file mode 100644
index 000000000000..c167f4bdd75a
--- /dev/null
+++ b/pkgs/development/compilers/halvm/2.4.0.nix
@@ -0,0 +1,48 @@
+{ stdenv, fetchgit, bootPkgs, perl, gmp, ncurses, binutils, autoconf, alex, happy, makeStaticLibraries
+, hscolour, xen, automake, gcc, git, zlib, libtool, enableIntegerSimple ? false
+}:
+
+stdenv.mkDerivation rec {
+  version = "2.4.0";
+  name = "HaLVM-${version}";
+  isHaLVM = true;
+  isGhcjs = false;
+  src = fetchgit {
+    rev = "6aa72c9b047fd8ddff857c994a5a895461fc3925";
+    url = "https://github.com/GaloisInc/HaLVM";
+    sha256 = "05cg4w6fw5ajmpmh8g2msprnygmr4isb3pphqhlddfqwyvqhl167";
+  };
+  prePatch = ''
+    sed -i '312 d' Makefile
+    sed -i '316,446 d' Makefile # Removes RPM packaging
+    sed -i '20 d' src/scripts/halvm-cabal.in
+    sed -ie 's|ld |${binutils}/bin/ld |g' src/scripts/ldkernel.in
+  '';
+  configureFlags = stdenv.lib.optional (!enableIntegerSimple) [ "--enable-gmp" ];
+  propagatedNativeBuildInputs = [ alex happy ];
+  buildInputs =
+   let haskellPkgs = [ alex happy bootPkgs.hscolour bootPkgs.cabal-install bootPkgs.haddock bootPkgs.hpc
+    ]; in [ bootPkgs.ghc
+            automake perl git binutils
+            autoconf xen zlib ncurses.dev
+            libtool gmp ] ++ haskellPkgs;
+  preConfigure = ''
+    autoconf
+    patchShebangs .
+  '';
+  hardeningDisable = ["all"];
+  postInstall = "$out/bin/halvm-ghc-pkg recache";
+  passthru = {
+    inherit bootPkgs;
+    cross.config = "halvm";
+    cc = "${gcc}/bin/gcc";
+    ld = "${binutils}/bin/ld";
+  };
+
+  meta = {
+    homepage = "http://github.com/GaloisInc/HaLVM";
+    description = "The Haskell Lightweight Virtual Machine (HaLVM): GHC running on Xen";
+    maintainers = with stdenv.lib.maintainers; [ dmjio ];
+    inherit (bootPkgs.ghc.meta) license platforms;
+  };
+}