nixpkgs/pkgs/development/compilers/halvm/2.4.0.nix

49 lines
1.6 KiB
Nix
Raw Normal View History

2017-02-04 17:19:14 +00:00
{ 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 {
2017-04-14 05:21:38 +01:00
rev = "65fad65966eb7e60f234453a35aeb564a09d2595";
2017-02-04 17:19:14 +00:00
url = "https://github.com/GaloisInc/HaLVM";
2017-04-14 05:21:38 +01:00
sha256 = "09633h38w0z20cz0wcfp9z5kzv8v1zwcv0wqvgq3c8svqbrxp28k";
2017-02-04 17:19:14 +00:00
};
prePatch = ''
2017-04-14 05:21:38 +01:00
sed -i '305 d' Makefile
sed -i '309,439 d' Makefile # Removes RPM packaging
2017-02-04 17:19:14 +00:00
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;
};
}