2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv, fetchurl, unzip, makeWrapper, flex, bison, ncurses, buddy, tecla
|
2020-04-24 23:36:52 +00:00
|
|
|
, libsigsegv, gmpxx, cln, yices
|
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
version = "3.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
fullMaude = fetchurl {
|
2021-02-05 17:12:51 +00:00
|
|
|
url = "http://maude.cs.illinois.edu/w/images/0/0a/Full-Maude-${version}.zip";
|
|
|
|
sha256 = "8b13af02c6243116c2ef9592622ecaa06d05dbe1dd6b1e595551ff33855948f2";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
in
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
pname = "maude";
|
|
|
|
inherit version;
|
|
|
|
|
|
|
|
src = fetchurl {
|
2021-02-05 17:12:51 +00:00
|
|
|
url = "http://maude.cs.illinois.edu/w/images/d/d3/Maude-${version}.tar.gz";
|
|
|
|
sha256 = "b112d7843f65217e3b5a9d40461698ef8dab7cbbe830af21216dfb924dc88a2f";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-03-19 17:17:44 +00:00
|
|
|
nativeBuildInputs = [ unzip ];
|
2020-04-24 23:36:52 +00:00
|
|
|
buildInputs = [
|
2021-03-19 17:17:44 +00:00
|
|
|
flex bison ncurses buddy tecla gmpxx libsigsegv makeWrapper cln yices
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
hardeningDisable = [ "stackprotector" ] ++
|
2021-02-05 17:12:51 +00:00
|
|
|
lib.optionals stdenv.isi686 [ "pic" "fortify" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-04-15 01:41:22 +00:00
|
|
|
# Fix for glibc-2.34, see
|
|
|
|
# https://gitweb.gentoo.org/repo/gentoo.git/commit/dev-lang/maude/maude-3.1-r1.ebuild?id=f021cc6cfa1e35eb9c59955830f1fd89bfcb26b4
|
|
|
|
configureFlags = [ "--without-libsigsegv" ];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
preConfigure = ''
|
|
|
|
configureFlagsArray=(
|
|
|
|
--datadir="$out/share/maude"
|
|
|
|
TECLA_LIBS="-ltecla -lncursesw"
|
|
|
|
LIBS="-lcln"
|
|
|
|
CFLAGS="-O3" CXXFLAGS="-O3"
|
|
|
|
)
|
|
|
|
'';
|
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
for n in "$out/bin/"*; do wrapProgram "$n" --suffix MAUDE_LIB ':' "$out/share/maude"; done
|
|
|
|
unzip ${fullMaude}
|
2021-02-05 17:12:51 +00:00
|
|
|
install -D -m 444 full-maude31.maude $out/share/maude/full-maude.maude
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
# bison -dv surface.yy -o surface.c
|
|
|
|
# mv surface.c surface.cc
|
|
|
|
# mv: cannot stat 'surface.c': No such file or directory
|
|
|
|
enableParallelBuilding = false;
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = "http://maude.cs.illinois.edu/";
|
|
|
|
description = "High-level specification language";
|
2021-02-05 17:12:51 +00:00
|
|
|
license = lib.licenses.gpl2Plus;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
longDescription = ''
|
|
|
|
Maude is a high-performance reflective language and system
|
|
|
|
supporting both equational and rewriting logic specification and
|
|
|
|
programming for a wide range of applications. Maude has been
|
|
|
|
influenced in important ways by the OBJ3 language, which can be
|
|
|
|
regarded as an equational logic sublanguage. Besides supporting
|
|
|
|
equational specification and programming, Maude also supports
|
|
|
|
rewriting logic computation.
|
|
|
|
'';
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
platforms = lib.platforms.unix;
|
|
|
|
maintainers = [ lib.maintainers.peti ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|