2022-02-10 20:34:41 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, callPackage
|
|
|
|
, autoreconfHook, texinfo, libffi
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
let
|
2022-02-10 20:34:41 +00:00
|
|
|
swig = callPackage ./swig.nix { };
|
|
|
|
bootForth = callPackage ./boot-forth.nix { };
|
|
|
|
in stdenv.mkDerivation rec {
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "gforth";
|
2022-02-10 20:34:41 +00:00
|
|
|
version = "0.7.9_20220127";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "forthy42";
|
|
|
|
repo = "gforth";
|
|
|
|
rev = version;
|
|
|
|
sha256 = "sha256-3+ObHhsPvW44UFiN0GWOhwo7aiqhjwxNY8hw2Wv4MK0=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
autoreconfHook texinfo bootForth swig
|
|
|
|
];
|
|
|
|
buildInputs = [
|
|
|
|
libffi
|
|
|
|
];
|
|
|
|
|
|
|
|
passthru = { inherit bootForth; };
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
configureFlags = lib.optional stdenv.isDarwin [ "--build=x86_64-apple-darwin" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $out/share/emacs/site-lisp
|
|
|
|
cp gforth.el $out/share/emacs/site-lisp/
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "The Forth implementation of the GNU project";
|
2022-02-10 20:34:41 +00:00
|
|
|
homepage = "https://github.com/forthy42/gforth";
|
2021-02-05 17:12:51 +00:00
|
|
|
license = lib.licenses.gpl3;
|
|
|
|
platforms = lib.platforms.all;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|