1{ lib
2, stdenv
3, fetchurl
4}:
5
6stdenv.mkDerivation rec {
7 pname = "gnu-cim";
8 version = "5.1";
9
10 outputs = ["out" "lib" "man" "info"];
11
12 src = fetchurl {
13 url = "mirror://gnu/cim/cim-${version}.tar.gz";
14 hash = "sha256-uQcXtm7EAFA73WnlN+i38+ip0QbDupoIoErlc2mgaak=";
15 };
16
17 postPatch = ''
18 for fname in lib/{simulation,simset}.c; do
19 substituteInPlace "$fname" \
20 --replace \
21 '#include "../../lib/cim.h"' \
22 '#include "../lib/cim.h"'
23 done
24 '';
25
26 CFLAGS = lib.optionalString stdenv.cc.isClang "-Wno-return-type";
27
28 doCheck = true;
29
30 meta = with lib; {
31 description = "A GNU compiler for the programming language Simula";
32 longDescription = ''
33 GNU Cim is a compiler for the programming language Simula.
34 It offers a class concept, separate compilation with full type checking,
35 interface to external C routines, an application package for process
36 simulation and a coroutine concept. Commonly used with the Demos for
37 discrete event modelling.
38 '';
39 homepage = "https://www.gnu.org/software/cim/";
40 license = licenses.gpl2;
41 platforms = platforms.all;
42 badPlatforms = [ "aarch64-darwin" ];
43 maintainers = with maintainers; [ pbsds ];
44 };
45}