2018-09-17 06:30:05 +01:00
|
|
|
{ stdenv, fetchFromGitHub, makeWrapper, clang, haskellPackages }:
|
|
|
|
|
2019-11-23 16:10:17 +00:00
|
|
|
haskellPackages.mkDerivation rec {
|
2018-09-17 06:30:05 +01:00
|
|
|
|
|
|
|
pname = "carp";
|
2019-11-23 16:02:37 +00:00
|
|
|
version = "0.3.0";
|
2018-09-17 06:30:05 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "carp-lang";
|
|
|
|
repo = "Carp";
|
2019-11-23 16:02:37 +00:00
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "07yk3gy4l6h3k7sh8al7lgwk75a13zxwfp7siqpb5gnnqr1z3brc";
|
2018-09-17 06:30:05 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
buildDepends = [ makeWrapper ];
|
|
|
|
|
|
|
|
executableHaskellDepends = with haskellPackages; [
|
2019-11-23 16:02:37 +00:00
|
|
|
HUnit blaze-markup blaze-html split cmdargs ansi-terminal cmark
|
|
|
|
edit-distance
|
2018-09-17 06:30:05 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
isExecutable = true;
|
|
|
|
|
|
|
|
# The carp executable must know where to find its core libraries and other
|
|
|
|
# files. Set the environment variable CARP_DIR so that it points to the root
|
|
|
|
# of the Carp repo. See:
|
|
|
|
# https://github.com/carp-lang/Carp/blob/master/docs/Install.md#setting-the-carp_dir
|
|
|
|
#
|
|
|
|
# Also, clang must be available run-time because carp is compiled to C which
|
|
|
|
# is then compiled with clang.
|
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/carp \
|
|
|
|
--set CARP_DIR $src \
|
|
|
|
--prefix PATH : ${clang}/bin
|
|
|
|
wrapProgram $out/bin/carp-header-parse \
|
|
|
|
--set CARP_DIR $src \
|
|
|
|
--prefix PATH : ${clang}/bin
|
|
|
|
'';
|
|
|
|
|
|
|
|
description = "A statically typed lisp, without a GC, for real-time applications";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/carp-lang/Carp";
|
2018-09-17 06:30:05 +01:00
|
|
|
license = stdenv.lib.licenses.asl20;
|
|
|
|
maintainers = with stdenv.lib.maintainers; [ jluttine ];
|
|
|
|
|
|
|
|
# Windows not (yet) supported.
|
|
|
|
platforms = with stdenv.lib.platforms; unix ++ darwin;
|
|
|
|
|
|
|
|
}
|