From 55d21cad95cf325e42c0919d1ed8a290d9207f4d Mon Sep 17 00:00:00 2001 From: Willi Butz <wbutz@cyberfnord.de> Date: Sat, 25 Mar 2017 15:54:24 +0100 Subject: [PATCH] manticore: fix build, remove builder.sh (see #23253) --- .../compilers/manticore/builder.sh | 24 --------------- .../compilers/manticore/default.nix | 29 ++++++++++++++----- 2 files changed, 22 insertions(+), 31 deletions(-) delete mode 100755 pkgs/development/compilers/manticore/builder.sh diff --git a/pkgs/development/compilers/manticore/builder.sh b/pkgs/development/compilers/manticore/builder.sh deleted file mode 100755 index ad72f50a1b3..00000000000 --- a/pkgs/development/compilers/manticore/builder.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!@shell@ - -source $stdenv/setup -echo "Building Manticore research compiler." -set -xe - -PATH=$smlnj/bin:$PATH - -mkdir -p $out/bin - -# Manticore seems to use the MLB files from the build tree, -# so for now we copy the whole build tree into the store: -cd $out/ -tar xf $src -mv manticore* repo_checkout -cd repo_checkout/ -# TODO: At the very least, this could probably be cut down to a subset -# of the repo. - -${autoconf}/bin/autoheader -Iconfig -${autoconf}/bin/autoconf -Iconfig -./configure --prefix=$out -make build -j -make install diff --git a/pkgs/development/compilers/manticore/default.nix b/pkgs/development/compilers/manticore/default.nix index 7e8312549da..d068d744f20 100644 --- a/pkgs/development/compilers/manticore/default.nix +++ b/pkgs/development/compilers/manticore/default.nix @@ -1,14 +1,29 @@ -{ stdenv, fetchurl, coreutils, autoconf, automake, smlnj }: +{ stdenv, fetchFromGitHub, coreutils, autoreconfHook, smlnj }: -stdenv.mkDerivation rec { +let + rev = "592a5714595b4448b646a7d49df04c285668c2f8"; +in stdenv.mkDerivation rec { name = "manticore-${version}"; version = "2014.08.18"; - builder = ./builder.sh; - src = fetchurl { - url = https://github.com/rrnewton/manticore_temp_mirror/archive/snapshot-20140818.tar.gz; - sha256 = "1x52xpj5gbcpqjqm6aw6ssn901f353zypj3d5scm8i3ad777y29d"; + + src = fetchFromGitHub { + owner = "rrnewton"; + repo = "manticore_temp_mirror"; + sha256 = "1snwlm9a31wfgvzb80y7r7yvc6n0k0bi675lqwzll95as7cdswwi"; + inherit rev; }; - inherit stdenv coreutils autoconf automake smlnj; + + enableParallelBuilding = false; + + nativeBuildInputs = [ autoreconfHook ]; + + buildInputs = [ coreutils smlnj ]; + + autoreconfFlags = "-Iconfig -vfi"; + + postPatch = "patchShebangs ."; + + preInstall = "mkdir -p $out/bin"; meta = { description = "A parallel, pure variant of Standard ML";