21 stdenv.mkDerivation rec {
26 url = "mirror://sourceforge/gnucobol/${lib.versions.majorMinor version}/gnucobol-${version}.tar.xz";
27 sha256 = "0x15ybfm63g7c9340fc6712h9v59spnbyaz4rf85pmnp3zbhaw2r";
47 outputs = [ "bin" "dev" "lib" "out" ];
48 # XXX: Without this, we get a cycle between bin and dev
49 propagatedBuildOutputs = [];
53 sed -i '/^AT_CHECK.*crud\.cob/i AT_SKIP_IF([true])' tests/testsuite.src/listings.at
62 enableParallelBuilding = true;
64 installFlags = [ "install-pdf" "install-html" "localedir=$out/share/locale" ];
66 # Tests must run after install.
69 doInstallCheck = true;
70 installCheckPhase = ''
71 runHook preInstallCheck
74 make -j$NIX_BUILD_CORES check
77 message="Hello, COBOL!"
78 # XXX: Don't for a second think you can just get rid of these spaces, they
81 IDENTIFICATION DIVISION.
88 $bin/bin/cobc -x -o hello-cobol "hello.cbl"
89 hello="$(./hello-cobol | tee >(cat >&2))"
90 [[ "$hello" == "$message" ]] || exit 1
92 runHook postInstallCheck
96 description = "An open-source COBOL compiler";
97 homepage = "https://sourceforge.net/projects/gnucobol/";
98 license = with licenses; [ gpl3Only lgpl3Only ];
99 maintainers = with maintainers; [ ericsagnes lovesegfault ];
100 platforms = platforms.all;