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

52 lines
1.2 KiB
Nix
Raw Normal View History

{ lib, stdenv, callPackage, autoreconfHook, texinfo, fetchFromGitHub
, swig, libffi
}:
let
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 {
pname = "gforth";
2019-08-13 21:52:01 +00:00
inherit version;
src = fetchFromGitHub {
owner = "forthy42";
repo = "gforth";
rev = version;
inherit sha256;
2014-09-22 13:15:17 +00:00
};
patches = [ ./fix-install-txt.patch ];
nativeBuildInputs = [
autoreconfHook texinfo bootForth
];
buildInputs = [
swig libffi
];
passthru = { inherit bootForth; };
configureFlags =
lib.optional stdenv.isDarwin [ "--build=x86_64-apple-darwin" ];
2016-04-06 21:11:19 +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";
homepage = "https://github.com/forthy42/gforth";
license = lib.licenses.gpl3;
platforms = lib.platforms.all;
};
}