2014-10-12 09:37:57 +01:00
|
|
|
{ lib, stdenv, fetchurl, makeWrapper,
|
|
|
|
llvm, gmp, mpfr, readline, bison, flex }:
|
2011-04-08 09:00:55 +01:00
|
|
|
|
2014-10-12 09:37:57 +01:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
baseName="pure";
|
|
|
|
project="pure-lang";
|
2014-10-23 13:30:27 +01:00
|
|
|
version="0.63";
|
2014-10-12 09:37:57 +01:00
|
|
|
name="${baseName}-${version}";
|
|
|
|
extension="tar.gz";
|
|
|
|
|
|
|
|
src = fetchurl {
|
2013-10-09 20:23:37 +01:00
|
|
|
url="https://bitbucket.org/purelang/${project}/downloads/${name}.${extension}";
|
2014-10-23 13:30:27 +01:00
|
|
|
sha256="33acb2d560b21813f5e856973b493d9cfafba82bd6f539425ce07aa22f84ee29";
|
2011-04-08 09:00:55 +01:00
|
|
|
};
|
|
|
|
|
2014-10-12 09:37:57 +01:00
|
|
|
buildInputs = [ bison flex makeWrapper ];
|
|
|
|
propagatedBuildInputs = [ llvm gmp mpfr readline ];
|
2013-02-17 09:59:43 +00:00
|
|
|
|
2014-10-23 13:30:27 +01:00
|
|
|
configureFlags = [ "--enable-release" ];
|
|
|
|
doCheck = true;
|
|
|
|
checkPhase = ''
|
|
|
|
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${llvm}/lib make check
|
|
|
|
'';
|
2014-10-12 09:37:57 +01:00
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/pure --prefix LD_LIBRARY_PATH : ${llvm}/lib
|
|
|
|
'';
|
2013-02-17 09:59:43 +00:00
|
|
|
|
2011-04-08 09:00:55 +01:00
|
|
|
meta = {
|
2014-10-12 09:37:57 +01:00
|
|
|
description = "A modern-style functional programming language based on term rewriting";
|
|
|
|
maintainers = with lib.maintainers;
|
2011-04-08 09:00:55 +01:00
|
|
|
[
|
|
|
|
raskin
|
2014-10-23 13:30:27 +01:00
|
|
|
asppsa
|
2011-04-08 09:00:55 +01:00
|
|
|
];
|
2014-10-12 09:37:57 +01:00
|
|
|
platforms = with lib.platforms;
|
2011-04-08 09:00:55 +01:00
|
|
|
linux;
|
2014-10-12 09:37:57 +01:00
|
|
|
license = lib.licenses.gpl3Plus;
|
2011-04-08 09:00:55 +01:00
|
|
|
};
|
2014-10-12 09:37:57 +01:00
|
|
|
}
|