system/pkgs/derivations/GnuCobal/_default.nix

82 lines
2.8 KiB
Nix
Raw Normal View History

2024-10-14 18:35:04 -04:00
{
# outputs = { self, nixpkgs }:
# let
# # set -euo pipefail;
# # https://nix.dev/manual/nix/2.18/language/derivations.html
# # required
# system = "x86_64-linux";
# name = 'GnuCobal';
#
# src = "https://sourceforge.net/projects/gnucobol/files/gnucobol/${version}/gnucobol-${version}.tar.gz";
# sha256 = "abd657e581c14558c79d4e8974b7830f0204bd272b5a2a4a397cfea3b278e524";
# mkdir -p "$nixpkgs";
# cd "$nixpkgs";
# cat <<EOF > "${program_name}-${version}.drv";
# { pkgs ? import <nixpkgs> {} }:
# with pkgs;
lib, stdenv, fetchurl, make, glibc, gcc, binutils, coreutils}:
stdenv.mkDerivation rec {
pname = "gnucobal";
version = "3.2";
src = fetchurl {
url = "https://sourceforge.net/projects/gnucobol/files/gnucobol/${version}/gnucobol-${version}.tar.gz";
sha256 = "abd657e581c14558c79d4e8974b7830f0204bd272b5a2a4a397cfea3b278e524";
};
strictDeps = true;
buildInputs = [ make ];
env.NIX_CFLAGS_COMPILE = lib.concatStringsSep " " [
"-I../common/include"
"-I../debug/include"
"-I../exception/include"
];
doCheck = true;
meta = {
description = "GnuCobal";
longDescription = ''GnuCOBOL (formerly OpenCOBOL) is a free COBOL compiler. cobc translates COBOL source code to native executable using intermediate C, designated C compiler and linker. Source code features include fixed and free-format source code, data division that can define any variable format, file I/O, and external call interface. Intrinsic functions include math, sorting, searching, date and time, file operations, and string manipulation. Supports CICS, CGI, DB2, and Windows DLL. Formally known as OpenCOBOL, GnuCOBOL is a COBOL compiler with run time support. The run time is now GNU LGPL. GnuCOBOL implements a substantial part of the COBOL 85, X/Open COBOL and newer ISO COBOL standards (2002, 2014, 2022), as well as many extensions included in other COBOL compilers (IBM COBOL, MicroFocus COBOL, ACUCOBOL-GT and others).'';
homepage = "https://sourceforge.net/projects/gnucobol/";
license = lib.licenses.gpl3;
mainProgram = "GnuCobal";
platforms = lib.platforms.linux;
};
}
# in { inherit name system url sha256; };
# }
# }
# ./configure \
# --libdir=$lib/lib \
# --includedir=$headers/include \
# --docdir=$doc/share/doc
# buildPhase = ''
# ./configure && make
# '';
# installPhase = ''
# mkdir -p $out/bin
# cp Gnu-Cobal $out/bin
# wrapProgram $out/bin/GnuCobal \
# --prefix PATH : "${pkgs.lib.makeBinPath [ pkgs.glibc ]}"
# '';