1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-09-11 15:08:33 +01:00
nixpkgs/pkgs/development/interpreters/pure/default.nix

46 lines
1.1 KiB
Nix
Raw Normal View History

2014-10-12 09:37:57 +01:00
{ lib, stdenv, fetchurl, makeWrapper,
llvm, gmp, mpfr, readline, bison, flex }:
2014-10-12 09:37:57 +01:00
stdenv.mkDerivation rec {
baseName="pure";
project="pure-lang";
version="0.64";
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}";
sha256="01vvix302gh5vsmnjf2g0rrif3hl1yik4izsx1wrvv1a6hlm5mgg";
};
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
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 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
meta = {
2014-10-12 09:37:57 +01:00
description = "A modern-style functional programming language based on term rewriting";
maintainers = with lib.maintainers;
[
raskin
2014-10-23 13:30:27 +01:00
asppsa
];
2014-10-12 09:37:57 +01:00
platforms = with lib.platforms;
linux;
2014-10-12 09:37:57 +01:00
license = lib.licenses.gpl3Plus;
};
}