aboutsummaryrefslogtreecommitdiff
path: root/infra/libkookie/nixpkgs/pkgs/development/compilers/4th/default.nix
blob: ee3050b8ba69850929e7c70b258c2b3ae73c2991 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
{ stdenv, fetchurl }:

stdenv.mkDerivation rec {
  pname = "4th";
  version = "3.62.5";

  src = fetchurl {
    url = "https://sourceforge.net/projects/forth-4th/files/${pname}-${version}/${pname}-${version}-unix.tar.gz";
    sha256 = "sha256-+CL33Yz7CxdEpi1lPG7+kzV4rheJ7GCgiFCaOLyktPw=";
  };

  dontConfigure = true;

  makeFlags = [
    "-C sources"
    "CC=${stdenv.cc}/bin/cc"
  ];

  preInstall = ''
    install -d ${placeholder "out"}/bin \
      ${placeholder "out"}/lib \
      ${placeholder "out"}/share/doc/${pname} \
      ${placeholder "out"}/share/man
  '';

  installFlags = [
    "BINARIES=${placeholder "out"}/bin"
    "LIBRARIES=${placeholder "out"}/lib"
    "DOCDIR=${placeholder "out"}/share/doc"
    "MANDIR=${placeholder "out"}/share/man"
  ];

  meta = with stdenv.lib; {
    description = "A portable Forth compiler";
    homepage = "https://thebeez.home.xs4all.nl/4tH/index.html";
    license = licenses.lgpl3;
    platforms = platforms.linux;
  };
}