nixpkgs/pkgs/development/compilers/gforth/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

48 lines
1.1 KiB
Nix
Raw Normal View History

2022-02-08 01:33:52 +00:00
{ lib, stdenv, fetchFromGitHub, callPackage
, autoreconfHook, texinfo, libffi
}:
2022-02-08 01:33:52 +00:00
let
2022-02-08 01:33:52 +00:00
swig = callPackage ./swig.nix { };
bootForth = callPackage ./boot-forth.nix { };
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";
version = "0.7.9_20230518";
src = fetchFromGitHub {
owner = "forthy42";
repo = "gforth";
rev = version;
hash = "sha256-rXtmmENBt9RMdLPq8GDyndh4+CYnCmz6NYpe3kH5OwU=";
2014-09-22 13:15:17 +00:00
};
nativeBuildInputs = [
2022-02-08 01:33:52 +00:00
autoreconfHook texinfo bootForth swig
];
buildInputs = [
2022-02-08 01:33:52 +00:00
libffi
];
passthru = { inherit bootForth; };
configureFlags = [
"--with-lispdir=${lispDir}"
] ++ lib.optionals (stdenv.isDarwin && stdenv.isx86_64) [
"--build=x86_64-apple-darwin"
];
2016-04-06 21:11:19 +00:00
preConfigure = ''
mkdir -p ${lispDir}
'';
meta = {
description = "The Forth implementation of the GNU project";
homepage = "https://github.com/forthy42/gforth";
license = lib.licenses.gpl3;
broken = stdenv.isDarwin && stdenv.isAarch64; # segfault when running ./gforthmi
platforms = lib.platforms.all;
};
}