1{ lib, stdenv, fetchurl, m4 }:
2
3let
4 version = "0.7.3";
5in
6stdenv.mkDerivation {
7 pname = "gforth";
8 inherit version;
9 src = fetchurl {
10 url = "https://ftp.gnu.org/gnu/gforth/gforth-${version}.tar.gz";
11 sha256 = "1c1bahc9ypmca8rv2dijiqbangm1d9av286904yw48ph7ciz4qig";
12 };
13
14 buildInputs = [ m4 ];
15
16 configureFlags = lib.optional stdenv.isDarwin [ "--build=x86_64-apple-darwin" ];
17
18 postInstall = ''
19 mkdir -p $out/share/emacs/site-lisp
20 cp gforth.el $out/share/emacs/site-lisp/
21 '';
22
23 meta = {
24 description = "The Forth implementation of the GNU project";
25 homepage = "https://www.gnu.org/software/gforth/";
26 license = lib.licenses.gpl3;
27 platforms = lib.platforms.all;
28 };
29}