lol

gforth: enable swig bindings

+28 -46
+12 -21
pkgs/development/compilers/gforth/default.nix
··· 1 - { lib, stdenv, callPackage, autoreconfHook, texinfo, fetchFromGitHub 2 - , swig, libffi 1 + { lib, stdenv, fetchFromGitHub, callPackage 2 + , autoreconfHook, texinfo, libffi 3 3 }: 4 + 4 5 let 5 - version = "0.7.9_20211111"; 6 - sha256 = "sha256-KwYPMWdsL9o8SVcNdENMs4C9ioFBEfyVMqe5bgIrfzs="; 7 - ## FIXME build https://github.com/GeraldWodni/swig with gforth, then rebuild 8 - #### This will get rid of the configuration warning 9 - # swigf = swig.overrideDerivation (old: { 10 - # configureFlags = old.configureFlags ++ [ 11 - # "--enable-forth" 12 - # ]; 13 - # }); 6 + swig = callPackage ./swig.nix { }; 14 7 bootForth = callPackage ./boot-forth.nix { }; 8 + in stdenv.mkDerivation rec { 15 9 16 - in stdenv.mkDerivation { 17 - pname = "gforth"; 18 - inherit version; 10 + name = "gforth-${version}"; 11 + version = "0.7.9_20220127"; 12 + 19 13 src = fetchFromGitHub { 20 14 owner = "forthy42"; 21 15 repo = "gforth"; 22 16 rev = version; 23 - inherit sha256; 17 + sha256 = "sha256-3+ObHhsPvW44UFiN0GWOhwo7aiqhjwxNY8hw2Wv4MK0="; 24 18 }; 25 - patches = [ ./fix-install-txt.patch ]; 26 19 27 20 nativeBuildInputs = [ 28 - autoreconfHook texinfo bootForth 21 + autoreconfHook texinfo bootForth swig 29 22 ]; 30 23 buildInputs = [ 31 - swig libffi 24 + libffi 32 25 ]; 33 26 34 27 passthru = { inherit bootForth; }; 35 28 36 - configureFlags = 37 - lib.optional stdenv.isDarwin [ "--build=x86_64-apple-darwin" ]; 29 + configureFlags = lib.optional stdenv.isDarwin [ "--build=x86_64-apple-darwin" ]; 38 30 39 31 postInstall = '' 40 32 mkdir -p $out/share/emacs/site-lisp ··· 47 39 license = lib.licenses.gpl3; 48 40 platforms = lib.platforms.all; 49 41 }; 50 - 51 42 }
-25
pkgs/development/compilers/gforth/fix-install-txt.patch
··· 1 - From c03408921ee8f5592e19cfcb64132a320fbd6279 Mon Sep 17 00:00:00 2001 2 - From: Herwig Hochleitner <herwig@bendlas.net> 3 - Date: Thu, 9 Sep 2021 18:19:42 +0200 4 - Subject: [PATCH 1/2] fix install-txt task 5 - 6 - --- 7 - Makefile.in | 2 +- 8 - 1 file changed, 1 insertion(+), 1 deletion(-) 9 - 10 - diff --git a/Makefile.in b/Makefile.in 11 - index 5fe49787..51ad67c6 100644 12 - --- a/Makefile.in 13 - +++ b/Makefile.in 14 - @@ -839,7 +839,7 @@ install-gensources: 15 - done 16 - echo "\\ empty site-init" > $(siteforthdir)/siteinit.fs 17 - 18 - -install-txt: doc 19 - +install-txt: txt 20 - $(INSTALL_DATA) doc/gforth.txt $(datadir)/gforth/$(VERSION)/doc/gforth.txt 21 - 22 - install-images: install-txt 23 - -- 24 - 2.33.0 25 -
+16
pkgs/development/compilers/gforth/swig.nix
··· 1 + { swig3, fetchFromGitHub }: 2 + 3 + ## for updating to swig4, see 4 + ## https://github.com/GeraldWodni/swig/pull/6 5 + swig3.overrideDerivation (old: { 6 + version = "3.0.9-forth"; 7 + src = fetchFromGitHub { 8 + owner = "GeraldWodni"; 9 + repo = "swig"; 10 + rev = "a45b807e5f9d8ca1a43649c8265d2741a393862a"; 11 + sha256 = "sha256-6nOOPFGFNaQInEkul0ZAh+ks9n3wqCQ6/tbduvG/To0="; 12 + }; 13 + configureFlags = old.configureFlags ++ [ 14 + "--enable-forth" 15 + ]; 16 + })