From 9b3774cc90f4106af8aaa786479198a98d7f7f22 Mon Sep 17 00:00:00 2001 From: Peder Bergebakken Sundt Date: Fri, 20 Jan 2023 20:50:37 +0100 Subject: [PATCH] gnu-cim: init at 5.1 --- .../development/compilers/gnu-cim/default.nix | 45 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 47 insertions(+) create mode 100644 pkgs/development/compilers/gnu-cim/default.nix diff --git a/pkgs/development/compilers/gnu-cim/default.nix b/pkgs/development/compilers/gnu-cim/default.nix new file mode 100644 index 000000000000..b1cb9f08597e --- /dev/null +++ b/pkgs/development/compilers/gnu-cim/default.nix @@ -0,0 +1,45 @@ +{ lib +, stdenv +, fetchurl +}: + +stdenv.mkDerivation rec { + pname = "gnu-cim"; + version = "5.1"; + + outputs = ["out" "lib" "man" "info"]; + + src = fetchurl { + url = "mirror://gnu/cim/cim-${version}.tar.gz"; + hash = "sha256-uQcXtm7EAFA73WnlN+i38+ip0QbDupoIoErlc2mgaak="; + }; + + postPatch = '' + for fname in lib/{simulation,simset}.c; do + substituteInPlace "$fname" \ + --replace \ + '#include "../../lib/cim.h"' \ + '#include "../lib/cim.h"' + done + ''; + + CFLAGS = lib.optionalString stdenv.cc.isClang "-Wno-return-type"; + + doCheck = true; + + meta = with lib; { + description = "A GNU compiler for the programming language Simula"; + longDescription = '' + GNU Cim is a compiler for the programming language Simula. + It offers a class concept, separate compilation with full type checking, + interface to external C routines, an application package for process + simulation and a coroutine concept. Commonly used with the Demos for + discrete event modelling. + ''; + homepage = "https://www.gnu.org/software/cim/"; + license = licenses.gpl2; + platforms = platforms.all; + badPlatforms = [ "aarch64-darwin" ]; + maintainers = with maintainers; [ pbsds ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 5371bc6b7798..161c596edace 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7552,6 +7552,8 @@ with pkgs; gnucap = callPackage ../applications/science/electronics/gnucap { }; + gnu-cim = callPackage ../development/compilers/gnu-cim { }; + gnu-cobol = callPackage ../development/compilers/gnu-cobol { }; gnuclad = callPackage ../applications/graphics/gnuclad { };