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 { };
|
2022-06-16 17:23:12 +00:00
|
|
|
lispDir = "${placeholder "out"}/share/emacs/site-lisp";
|
2022-02-10 20:34:41 +00:00
|
|
|
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
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
configureFlags = [
|
|
|
|
"--with-lispdir=${lispDir}"
|
|
|
|
] ++ lib.optionals (stdenv.isDarwin && stdenv.isx86_64) [
|
|
|
|
"--build=x86_64-apple-darwin"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
preConfigure = ''
|
|
|
|
mkdir -p ${lispDir}
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
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
|
|
|
};
|
|
|
|
}
|