mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-09-01 13:14:42 +00:00
Use headers in `sources/include{32, 64}` to fix the builtin editor, as suggested by `README`.
The problem is described in the FAQ section of the [manual](https://thebeez.home.xs4all.nl/4tH/4tHmanual.pdf).
Although the manual suggests regenerating the headers (section 27.8), the required headers seem to be already in the distirbution.
58 lines
1.3 KiB
Nix
58 lines
1.3 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchurl,
|
|
}:
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "4th";
|
|
version = "3.64.2";
|
|
|
|
src = fetchurl {
|
|
url = "https://sourceforge.net/projects/forth-4th/files/4th-${finalAttrs.version}/4th-${finalAttrs.version}-unix.tar.gz";
|
|
hash = "sha256-ufQiuRDPmcYzFSQf16cuZSrOEbH3itq7yZYo87zPs1g=";
|
|
};
|
|
|
|
outputs = [
|
|
"out"
|
|
"man"
|
|
];
|
|
|
|
dontConfigure = true;
|
|
|
|
preBuild = ''
|
|
cp sources/include${if stdenv.hostPlatform.is64bit then "64" else "32"}/* sources/
|
|
make -C sources clean
|
|
'';
|
|
|
|
makeFlags = [
|
|
"-C sources"
|
|
"CC:=$(CC)"
|
|
"AR:=$(AR)"
|
|
];
|
|
|
|
preInstall = ''
|
|
install -d ${placeholder "out"}/bin \
|
|
${placeholder "out"}/lib \
|
|
${placeholder "out"}/share/doc/4th \
|
|
${placeholder "man"}/share/man
|
|
'';
|
|
|
|
installFlags = [
|
|
"BINARIES=${placeholder "out"}/bin"
|
|
"LIBRARIES=${placeholder "out"}/lib"
|
|
"DOCDIR=${placeholder "out"}/share/doc"
|
|
"MANDIR=${placeholder "man"}/share/man"
|
|
];
|
|
|
|
meta = {
|
|
homepage = "https://thebeez.home.xs4all.nl/4tH/index.html";
|
|
description = "Portable Forth compiler";
|
|
license = lib.licenses.lgpl3Plus;
|
|
mainProgram = "4th";
|
|
maintainers = with lib.maintainers; [ chillcicada ];
|
|
platforms = lib.platforms.unix;
|
|
};
|
|
})
|
|
# TODO: set Makefile according to platform
|