nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib, stdenv, fetchFromGitHub, callPackage
2, autoreconfHook, texinfo, libffi
3}:
4
5let
6 swig = callPackage ./swig.nix { };
7 bootForth = callPackage ./boot-forth.nix { };
8in stdenv.mkDerivation rec {
9
10 pname = "gforth";
11 version = "0.7.9_20220127";
12
13 src = fetchFromGitHub {
14 owner = "forthy42";
15 repo = "gforth";
16 rev = version;
17 sha256 = "sha256-3+ObHhsPvW44UFiN0GWOhwo7aiqhjwxNY8hw2Wv4MK0=";
18 };
19
20 nativeBuildInputs = [
21 autoreconfHook texinfo bootForth swig
22 ];
23 buildInputs = [
24 libffi
25 ];
26
27 passthru = { inherit bootForth; };
28
29 configureFlags = lib.optional stdenv.isDarwin [ "--build=x86_64-apple-darwin" ];
30
31 postInstall = ''
32 mkdir -p $out/share/emacs/site-lisp
33 cp gforth.el $out/share/emacs/site-lisp/
34 '';
35
36 meta = {
37 broken = stdenv.isDarwin;
38 description = "The Forth implementation of the GNU project";
39 homepage = "https://github.com/forthy42/gforth";
40 license = lib.licenses.gpl3;
41 platforms = lib.platforms.all;
42 };
43}