mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-30 09:33:41 +00:00
80027b2272
Fixes: * CVE-2019-14468 * CVE-2019-14486 * CVE-2019-14528 * CVE-2019-14541 * CVE-2019-16395 * CVE-2019-16396
37 lines
1.1 KiB
Nix
37 lines
1.1 KiB
Nix
{ lib, stdenv, fetchurl, gcc, makeWrapper
|
|
, db, gmp, ncurses }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "gnu-cobol";
|
|
version = "3.1.2";
|
|
|
|
src = fetchurl {
|
|
url = "mirror://sourceforge/gnucobol/${lib.versions.majorMinor version}/gnucobol-${version}.tar.xz";
|
|
sha256 = "0x15ybfm63g7c9340fc6712h9v59spnbyaz4rf85pmnp3zbhaw2r";
|
|
};
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
buildInputs = [ db gmp ncurses ];
|
|
|
|
cflags = lib.concatMapStringsSep " " (p: "-L" + (lib.getLib p) + "/lib ") buildInputs;
|
|
ldflags = lib.concatMapStringsSep " " (p: "-I" + (lib.getDev p) + "/include ") buildInputs;
|
|
|
|
cobolCCFlags = "-I$out/include ${ldflags} -L$out/lib ${cflags}";
|
|
|
|
postInstall = with lib; ''
|
|
wrapProgram "$out/bin/cobc" \
|
|
--set COB_CC "${gcc}/bin/gcc" \
|
|
--prefix COB_LDFLAGS " " "${cobolCCFlags}" \
|
|
--prefix COB_CFLAGS " " "${cobolCCFlags}"
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "An open-source COBOL compiler";
|
|
homepage = "https://sourceforge.net/projects/gnucobol/";
|
|
license = with licenses; [ gpl3Only lgpl3Only ];
|
|
maintainers = with maintainers; [ ericsagnes ];
|
|
platforms = platforms.all;
|
|
};
|
|
}
|