2023-09-09 22:58:05 +02:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchurl
|
|
|
|
}:
|
2020-11-08 05:48:09 +01:00
|
|
|
|
2023-09-09 22:58:05 +02:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2020-11-08 05:48:09 +01:00
|
|
|
pname = "4th";
|
2022-07-29 05:51:15 +02:00
|
|
|
version = "3.64.1";
|
2020-11-08 05:48:09 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2023-09-09 22:58:05 +02:00
|
|
|
url = "https://sourceforge.net/projects/forth-4th/files/4th-${finalAttrs.version}/4th-${finalAttrs.version}-unix.tar.gz";
|
2022-07-29 05:51:15 +02:00
|
|
|
hash = "sha256-+W6nTNsqrf3Dvr+NbSz3uJdrXVbBI3OHR5v/rs7en+M=";
|
2020-11-08 05:48:09 +01:00
|
|
|
};
|
|
|
|
|
2023-09-09 22:58:05 +02:00
|
|
|
outputs = [ "out" "man" ];
|
|
|
|
|
2022-03-15 21:01:21 +01:00
|
|
|
patches = [
|
|
|
|
# Fix install manual; report this patch to upstream
|
|
|
|
./001-install-manual-fixup.diff
|
|
|
|
];
|
|
|
|
|
2020-11-08 05:48:09 +01:00
|
|
|
dontConfigure = true;
|
|
|
|
|
|
|
|
makeFlags = [
|
|
|
|
"-C sources"
|
2023-09-22 19:02:52 +02:00
|
|
|
"CC:=$(CC)"
|
|
|
|
"AR:=$(AR)"
|
2020-11-08 05:48:09 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
preInstall = ''
|
|
|
|
install -d ${placeholder "out"}/bin \
|
2023-09-09 22:58:05 +02:00
|
|
|
${placeholder "out"}/lib \
|
|
|
|
${placeholder "out"}/share/doc/4th \
|
|
|
|
${placeholder "man"}/share/man
|
2020-11-08 05:48:09 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
installFlags = [
|
|
|
|
"BINARIES=${placeholder "out"}/bin"
|
|
|
|
"LIBRARIES=${placeholder "out"}/lib"
|
|
|
|
"DOCDIR=${placeholder "out"}/share/doc"
|
2023-09-09 22:58:05 +02:00
|
|
|
"MANDIR=${placeholder "man"}/share/man"
|
2020-11-08 05:48:09 +01:00
|
|
|
];
|
|
|
|
|
2023-09-09 22:58:05 +02:00
|
|
|
meta = {
|
2020-11-08 05:48:09 +01:00
|
|
|
homepage = "https://thebeez.home.xs4all.nl/4tH/index.html";
|
2022-03-15 21:01:21 +01:00
|
|
|
description = "A portable Forth compiler";
|
2023-09-09 22:58:05 +02:00
|
|
|
license = lib.licenses.lgpl3Plus;
|
|
|
|
mainProgram = "4th";
|
|
|
|
maintainers = with lib.maintainers; [ AndersonTorres ];
|
|
|
|
platforms = lib.platforms.unix;
|
2020-11-08 05:48:09 +01:00
|
|
|
};
|
2023-09-09 22:58:05 +02:00
|
|
|
})
|
2022-03-15 21:01:21 +01:00
|
|
|
# TODO: set Makefile according to platform
|