2014-10-12 10:37:57 +02:00
|
|
|
{ lib, stdenv, fetchurl, makeWrapper,
|
|
|
|
llvm, gmp, mpfr, readline, bison, flex }:
|
2011-04-08 10:00:55 +02:00
|
|
|
|
2014-10-12 10:37:57 +02:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
baseName="pure";
|
2018-04-14 06:25:45 +02:00
|
|
|
version="0.68";
|
2014-10-12 10:37:57 +02:00
|
|
|
name="${baseName}-${version}";
|
|
|
|
|
|
|
|
src = fetchurl {
|
2018-04-14 06:25:45 +02:00
|
|
|
url="https://github.com/agraef/pure-lang/releases/download/${name}/${name}.tar.gz";
|
|
|
|
sha256="0px6x5ivcdbbp2pz5n1r1cwg1syadklhjw8piqhl63n91i4r7iyb";
|
2011-04-08 10:00:55 +02:00
|
|
|
};
|
|
|
|
|
2014-10-12 10:37:57 +02:00
|
|
|
buildInputs = [ bison flex makeWrapper ];
|
|
|
|
propagatedBuildInputs = [ llvm gmp mpfr readline ];
|
2019-10-30 12:34:47 +01:00
|
|
|
NIX_LDFLAGS = "-lLLVMJIT";
|
2013-02-17 10:59:43 +01:00
|
|
|
|
2015-07-09 13:52:26 +02:00
|
|
|
postPatch = ''
|
|
|
|
for f in expr.cc matcher.cc printer.cc symtable.cc parserdefs.hh; do
|
|
|
|
sed -i '1i\#include <stddef.h>' $f
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
2014-10-23 14:30:27 +02:00
|
|
|
configureFlags = [ "--enable-release" ];
|
|
|
|
doCheck = true;
|
|
|
|
checkPhase = ''
|
2020-01-02 01:29:34 +01:00
|
|
|
LD_LIBRARY_PATH=$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}${llvm}/lib make check
|
2014-10-23 14:30:27 +02:00
|
|
|
'';
|
2014-10-12 10:37:57 +02:00
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/pure --prefix LD_LIBRARY_PATH : ${llvm}/lib
|
|
|
|
'';
|
2013-02-17 10:59:43 +01:00
|
|
|
|
2011-04-08 10:00:55 +02:00
|
|
|
meta = {
|
2014-10-12 10:37:57 +02:00
|
|
|
description = "A modern-style functional programming language based on term rewriting";
|
|
|
|
maintainers = with lib.maintainers;
|
2011-04-08 10:00:55 +02:00
|
|
|
[
|
|
|
|
raskin
|
2014-10-23 14:30:27 +02:00
|
|
|
asppsa
|
2011-04-08 10:00:55 +02:00
|
|
|
];
|
2014-10-12 10:37:57 +02:00
|
|
|
platforms = with lib.platforms;
|
2011-04-08 10:00:55 +02:00
|
|
|
linux;
|
2014-10-12 10:37:57 +02:00
|
|
|
license = lib.licenses.gpl3Plus;
|
2011-04-08 10:00:55 +02:00
|
|
|
};
|
2015-03-31 08:20:31 +02:00
|
|
|
}
|