nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchurl,
5}:
6
7stdenv.mkDerivation (finalAttrs: {
8 pname = "4th";
9 version = "3.64.1";
10
11 src = fetchurl {
12 url = "https://sourceforge.net/projects/forth-4th/files/4th-${finalAttrs.version}/4th-${finalAttrs.version}-unix.tar.gz";
13 hash = "sha256-+W6nTNsqrf3Dvr+NbSz3uJdrXVbBI3OHR5v/rs7en+M=";
14 };
15
16 outputs = [
17 "out"
18 "man"
19 ];
20
21 patches = [
22 # Fix install manual; report this patch to upstream
23 ./001-install-manual-fixup.diff
24 ];
25
26 dontConfigure = true;
27
28 makeFlags = [
29 "-C sources"
30 "CC:=$(CC)"
31 "AR:=$(AR)"
32 ];
33
34 preInstall = ''
35 install -d ${placeholder "out"}/bin \
36 ${placeholder "out"}/lib \
37 ${placeholder "out"}/share/doc/4th \
38 ${placeholder "man"}/share/man
39 '';
40
41 installFlags = [
42 "BINARIES=${placeholder "out"}/bin"
43 "LIBRARIES=${placeholder "out"}/lib"
44 "DOCDIR=${placeholder "out"}/share/doc"
45 "MANDIR=${placeholder "man"}/share/man"
46 ];
47
48 meta = {
49 homepage = "https://thebeez.home.xs4all.nl/4tH/index.html";
50 description = "Portable Forth compiler";
51 license = lib.licenses.lgpl3Plus;
52 mainProgram = "4th";
53 maintainers = with lib.maintainers; [ ];
54 platforms = lib.platforms.unix;
55 };
56})
57# TODO: set Makefile according to platform