2021-10-21 14:27:36 +00:00
|
|
|
{ lib, stdenv, callPackage, autoreconfHook, texinfo, fetchFromGitHub
|
|
|
|
, swig, libffi
|
|
|
|
}:
|
2014-11-18 13:38:55 +00:00
|
|
|
let
|
2021-10-21 14:27:36 +00:00
|
|
|
version = "0.7.9_20211111";
|
|
|
|
sha256 = "sha256-KwYPMWdsL9o8SVcNdENMs4C9ioFBEfyVMqe5bgIrfzs=";
|
|
|
|
## FIXME build https://github.com/GeraldWodni/swig with gforth, then rebuild
|
|
|
|
#### This will get rid of the configuration warning
|
|
|
|
# swigf = swig.overrideDerivation (old: {
|
|
|
|
# configureFlags = old.configureFlags ++ [
|
|
|
|
# "--enable-forth"
|
|
|
|
# ];
|
|
|
|
# });
|
|
|
|
bootForth = callPackage ./boot-forth.nix { };
|
|
|
|
|
|
|
|
in stdenv.mkDerivation {
|
2021-11-26 01:42:32 +00:00
|
|
|
pname = "gforth";
|
2019-08-13 21:52:01 +00:00
|
|
|
inherit version;
|
2021-10-21 14:27:36 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "forthy42";
|
|
|
|
repo = "gforth";
|
|
|
|
rev = version;
|
|
|
|
inherit sha256;
|
2014-09-22 13:15:17 +00:00
|
|
|
};
|
2021-10-21 14:27:36 +00:00
|
|
|
patches = [ ./fix-install-txt.patch ];
|
2014-11-18 13:38:55 +00:00
|
|
|
|
2021-10-21 14:27:36 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
autoreconfHook texinfo bootForth
|
|
|
|
];
|
|
|
|
buildInputs = [
|
|
|
|
swig libffi
|
|
|
|
];
|
2014-11-18 13:38:55 +00:00
|
|
|
|
2021-10-21 14:27:36 +00:00
|
|
|
passthru = { inherit bootForth; };
|
|
|
|
|
2021-11-26 02:22:47 +00:00
|
|
|
configureFlags =
|
2021-10-21 14:27:36 +00:00
|
|
|
lib.optional stdenv.isDarwin [ "--build=x86_64-apple-darwin" ];
|
2016-04-06 21:11:19 +00:00
|
|
|
|
2014-11-18 13:38:55 +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";
|
2021-10-21 14:27:36 +00:00
|
|
|
homepage = "https://github.com/forthy42/gforth";
|
2021-01-22 11:25:31 +00:00
|
|
|
license = lib.licenses.gpl3;
|
|
|
|
platforms = lib.platforms.all;
|
2014-11-18 13:38:55 +00:00
|
|
|
};
|
2021-10-21 14:27:36 +00:00
|
|
|
|
2014-11-18 13:38:55 +00:00
|
|
|
}
|