2021-01-19 07:50:56 +01:00
|
|
|
{ lib, stdenv, fetchurl, pkg-config, smlnj, rsync }:
|
2014-06-27 00:54:12 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "twelf";
|
2014-06-27 00:54:12 +02:00
|
|
|
version = "1.7.1";
|
|
|
|
|
|
|
|
src = fetchurl {
|
2014-06-27 19:46:13 +02:00
|
|
|
url = "http://twelf.plparty.org/releases/twelf-src-${version}.tar.gz";
|
2014-06-27 00:54:12 +02:00
|
|
|
sha256 = "0fi1kbs9hrdrm1x4k13angpjasxlyd1gc3ys8ah54i75qbcd9c4i";
|
|
|
|
};
|
|
|
|
|
2021-01-19 07:50:56 +01:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2017-09-05 23:26:13 +02:00
|
|
|
buildInputs = [ smlnj rsync ];
|
2014-06-27 00:54:12 +02:00
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
export SMLNJ_HOME=${smlnj}
|
|
|
|
make smlnj
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
2014-07-22 11:01:32 +02:00
|
|
|
mkdir -p $out/bin
|
2015-03-31 07:11:57 +02:00
|
|
|
rsync -av bin/{*,.heap} $out/bin/
|
|
|
|
bin/.mkexec ${smlnj}/bin/sml $out/ twelf-server twelf-server
|
2014-06-27 00:54:12 +02:00
|
|
|
|
2016-09-09 05:11:36 +02:00
|
|
|
substituteInPlace emacs/twelf-init.el \
|
|
|
|
--replace '(concat twelf-root "emacs")' '(concat twelf-root "share/emacs/site-lisp/twelf")'
|
|
|
|
|
2014-07-22 11:01:32 +02:00
|
|
|
mkdir -p $out/share/emacs/site-lisp/twelf/
|
2014-06-27 00:54:12 +02:00
|
|
|
rsync -av emacs/ $out/share/emacs/site-lisp/twelf/
|
|
|
|
|
2014-07-22 11:01:32 +02:00
|
|
|
mkdir -p $out/share/twelf/examples
|
2014-06-27 00:54:12 +02:00
|
|
|
rsync -av examples/ $out/share/twelf/examples/
|
2014-07-22 11:01:32 +02:00
|
|
|
mkdir -p $out/share/twelf/vim
|
2014-06-27 00:54:12 +02:00
|
|
|
rsync -av vim/ $out/share/twelf/vim/
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
2014-08-24 16:21:08 +02:00
|
|
|
description = "Logic proof assistant";
|
2014-06-27 00:54:12 +02:00
|
|
|
longDescription = ''
|
|
|
|
Twelf is a language used to specify, implement, and prove properties of
|
|
|
|
deductive systems such as programming languages and logics. Large
|
|
|
|
research projects using Twelf include the TALT typed assembly language,
|
|
|
|
a foundational proof-carrying-code system, and a type safety proof for
|
|
|
|
Standard ML.
|
|
|
|
'';
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "http://twelf.org/wiki/Main_Page";
|
2021-01-15 14:21:58 +01:00
|
|
|
license = lib.licenses.mit;
|
|
|
|
maintainers = with lib.maintainers; [ jwiegley ];
|
|
|
|
platforms = lib.platforms.unix;
|
2014-06-27 00:54:12 +02:00
|
|
|
};
|
|
|
|
}
|