887295fd2d
@the-kenny did a good job in the past and is set as maintainer in many package, however since 2017-2018 he stopped contributing. To create less confusion in pull requests when people try to request his feedback, I removed him as maintainer from all packages.
41 lines
1.2 KiB
Nix
41 lines
1.2 KiB
Nix
{ stdenv, fetchurl, gcc, makeWrapper
|
|
, db, gmp, ncurses }:
|
|
|
|
let
|
|
version = "2.2";
|
|
lib = stdenv.lib;
|
|
in
|
|
stdenv.mkDerivation rec {
|
|
pname = "gnu-cobol";
|
|
inherit version;
|
|
|
|
src = fetchurl {
|
|
url = "https://sourceforge.com/projects/open-cobol/files/gnu-cobol/${version}/gnucobol-${version}.tar.gz";
|
|
sha256 = "1jrjmdx0swssjh388pp08awhiisbrs2i7gx4lcm4p1k5rpg3hn4j";
|
|
};
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
buildInputs = [ db gmp ncurses ];
|
|
|
|
cflags = stdenv.lib.concatMapStringsSep " " (p: "-L" + (lib.getLib p) + "/lib ") buildInputs;
|
|
ldflags = stdenv.lib.concatMapStringsSep " " (p: "-I" + (lib.getDev p) + "/include ") buildInputs;
|
|
|
|
cobolCCFlags = "-I$out/include ${ldflags} -L$out/lib ${cflags}";
|
|
|
|
postInstall = with stdenv.lib; ''
|
|
wrapProgram "$out/bin/cobc" \
|
|
--set COB_CC "${gcc}/bin/gcc" \
|
|
--prefix COB_LDFLAGS " " "${cobolCCFlags}" \
|
|
--prefix COB_CFLAGS " " "${cobolCCFlags}"
|
|
'';
|
|
|
|
meta = with stdenv.lib; {
|
|
description = "An open-source COBOL compiler";
|
|
homepage = "https://sourceforge.net/projects/open-cobol/";
|
|
license = licenses.gpl3;
|
|
maintainers = with maintainers; [ ericsagnes ];
|
|
platforms = with platforms; linux ++ darwin;
|
|
};
|
|
}
|