2022-02-08 01:33:52 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, callPackage
|
|
|
|
, autoreconfHook, texinfo, libffi
|
2021-10-21 14:27:36 +00:00
|
|
|
}:
|
2022-02-08 01:33:52 +00:00
|
|
|
|
2014-11-18 13:38:55 +00:00
|
|
|
let
|
2022-02-08 01:33:52 +00:00
|
|
|
swig = callPackage ./swig.nix { };
|
2021-10-21 14:27:36 +00:00
|
|
|
bootForth = callPackage ./boot-forth.nix { };
|
2022-05-28 21:13:48 +00:00
|
|
|
lispDir = "${placeholder "out"}/share/emacs/site-lisp";
|
2022-02-08 01:33:52 +00:00
|
|
|
in stdenv.mkDerivation rec {
|
|
|
|
|
2022-02-08 02:50:20 +00:00
|
|
|
pname = "gforth";
|
2022-02-08 01:33:52 +00:00
|
|
|
version = "0.7.9_20220127";
|
2021-10-21 14:27:36 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "forthy42";
|
|
|
|
repo = "gforth";
|
|
|
|
rev = version;
|
2022-02-08 01:33:52 +00:00
|
|
|
sha256 = "sha256-3+ObHhsPvW44UFiN0GWOhwo7aiqhjwxNY8hw2Wv4MK0=";
|
2014-09-22 13:15:17 +00:00
|
|
|
};
|
2014-11-18 13:38:55 +00:00
|
|
|
|
2021-10-21 14:27:36 +00:00
|
|
|
nativeBuildInputs = [
|
2022-02-08 01:33:52 +00:00
|
|
|
autoreconfHook texinfo bootForth swig
|
2021-10-21 14:27:36 +00:00
|
|
|
];
|
|
|
|
buildInputs = [
|
2022-02-08 01:33:52 +00:00
|
|
|
libffi
|
2021-10-21 14:27:36 +00:00
|
|
|
];
|
2014-11-18 13:38:55 +00:00
|
|
|
|
2021-10-21 14:27:36 +00:00
|
|
|
passthru = { inherit bootForth; };
|
|
|
|
|
2022-05-28 21:13:48 +00:00
|
|
|
configureFlags = [
|
|
|
|
"--with-lispdir=${lispDir}"
|
|
|
|
] ++ lib.optionals (stdenv.isDarwin && stdenv.isx86_64) [
|
|
|
|
"--build=x86_64-apple-darwin"
|
|
|
|
];
|
2016-04-06 21:11:19 +00:00
|
|
|
|
2022-05-28 21:13:48 +00:00
|
|
|
preConfigure = ''
|
|
|
|
mkdir -p ${lispDir}
|
2014-11-18 13:38:55 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
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
|
|
|
};
|
|
|
|
}
|