acr-cli: init at 0.14 (#359508)
[NixPkgs.git] / pkgs / by-name / ma / maude / package.nix
blob2050760adaf6869ffd6e1e9329a50baeed827940
1 { lib, stdenv, fetchurl, unzip, makeWrapper, flex, bison, ncurses, buddy, tecla
2 , libsigsegv, gmpxx, cln, yices
3 # passthru.tests
4 , tamarin-prover
5 }:
7 let
8   version = "3.4";
9 in
11 stdenv.mkDerivation {
12   pname = "maude";
13   inherit version;
15   src = fetchurl {
16     url = "https://github.com/maude-lang/Maude/archive/refs/tags/Maude${version}.tar.gz";
17     sha256 = "IXWEWAmh388NpNSt9wnOpLkzhZ09N+AStO2wn5dRT8o=";
18   };
20   nativeBuildInputs = [ flex bison unzip makeWrapper ];
21   buildInputs = [
22     ncurses buddy tecla gmpxx libsigsegv cln yices
23   ];
25   hardeningDisable = [ "stackprotector" ] ++
26     lib.optionals stdenv.hostPlatform.isi686 [ "pic" "fortify" ];
28   # Fix for glibc-2.34, see
29   # https://gitweb.gentoo.org/repo/gentoo.git/commit/dev-lang/maude/maude-3.1-r1.ebuild?id=f021cc6cfa1e35eb9c59955830f1fd89bfcb26b4
30   configureFlags = [ "--without-libsigsegv" ];
32   # Certain tests (in particular, Misc/fileTest) expect us to build in a subdirectory
33   # We'll use the directory Opt/ as suggested in INSTALL
34   preConfigure = ''
35     mkdir Opt; cd Opt
36     configureFlagsArray=(
37       --datadir="$out/share/maude"
38       TECLA_LIBS="-ltecla -lncursesw"
39       LIBS="-lcln"
40       CFLAGS="-O3" CXXFLAGS="-O3"
41     )
42   '';
43   configureScript = "../configure";
45   doCheck = true;
47   postInstall = ''
48     for n in "$out/bin/"*; do wrapProgram "$n" --suffix MAUDE_LIB ':' "$out/share/maude"; done
49   '';
51   passthru.tests = {
52     # tamarin-prover only supports specific versions of maude explicitly
53     inherit tamarin-prover;
54   };
56   enableParallelBuilding = true;
58   meta = {
59     homepage = "http://maude.cs.illinois.edu/";
60     description = "High-level specification language";
61     mainProgram = "maude";
62     license = lib.licenses.gpl2Plus;
64     longDescription = ''
65       Maude is a high-performance reflective language and system
66       supporting both equational and rewriting logic specification and
67       programming for a wide range of applications. Maude has been
68       influenced in important ways by the OBJ3 language, which can be
69       regarded as an equational logic sublanguage. Besides supporting
70       equational specification and programming, Maude also supports
71       rewriting logic computation.
72     '';
74     platforms = lib.platforms.unix;
75     maintainers = [ lib.maintainers.peti ];
76   };