gforth: 0.7.3 -> 0.7.9_20211111

This updates to forthy42's version, which the community seems to have
transitioned to.
This commit is contained in:
Herwig Hochleitner 2021-10-21 16:27:36 +02:00
parent 0e3dc39c42
commit 43cab04688
3 changed files with 83 additions and 12 deletions

View file

@ -0,0 +1,24 @@
{ lib, stdenv, fetchurl, m4 }:
let
version = "0.7.3";
in
stdenv.mkDerivation {
pname = "gforth-boot";
inherit version;
src = fetchurl {
url = "https://ftp.gnu.org/gnu/gforth/gforth-${version}.tar.gz";
sha256 = "1c1bahc9ypmca8rv2dijiqbangm1d9av286904yw48ph7ciz4qig";
};
buildInputs = [ m4 ];
configureFlags = lib.optional stdenv.isDarwin [ "--build=x86_64-apple-darwin" ];
meta = {
description = "The Forth implementation of the GNU project (outdated version used to bootstrap)";
homepage = "https://www.gnu.org/software/gforth/";
license = lib.licenses.gpl3;
platforms = lib.platforms.all;
};
}

View file

@ -1,19 +1,40 @@
{ lib, stdenv, fetchurl, m4 }:
{ lib, stdenv, callPackage, autoreconfHook, texinfo, fetchFromGitHub
, swig, libffi
}:
let
version = "0.7.3";
in
stdenv.mkDerivation {
pname = "gforth";
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 {
name = "gforth-${version}";
inherit version;
src = fetchurl {
url = "https://ftp.gnu.org/gnu/gforth/gforth-${version}.tar.gz";
sha256 = "1c1bahc9ypmca8rv2dijiqbangm1d9av286904yw48ph7ciz4qig";
src = fetchFromGitHub {
owner = "forthy42";
repo = "gforth";
rev = version;
inherit sha256;
};
patches = [ ./fix-install-txt.patch ];
buildInputs = [ m4 ];
nativeBuildInputs = [
autoreconfHook texinfo bootForth
];
buildInputs = [
swig libffi
];
configureFlags = lib.optional stdenv.isDarwin [ "--build=x86_64-apple-darwin" ];
passthru = { inherit bootForth; };
configureFlags = # [ "--enable-lib" ] ++
lib.optional stdenv.isDarwin [ "--build=x86_64-apple-darwin" ];
postInstall = ''
mkdir -p $out/share/emacs/site-lisp
@ -22,8 +43,9 @@ stdenv.mkDerivation {
meta = {
description = "The Forth implementation of the GNU project";
homepage = "https://www.gnu.org/software/gforth/";
homepage = "https://github.com/forthy42/gforth";
license = lib.licenses.gpl3;
platforms = lib.platforms.all;
};
}

View file

@ -0,0 +1,25 @@
From c03408921ee8f5592e19cfcb64132a320fbd6279 Mon Sep 17 00:00:00 2001
From: Herwig Hochleitner <herwig@bendlas.net>
Date: Thu, 9 Sep 2021 18:19:42 +0200
Subject: [PATCH 1/2] fix install-txt task
---
Makefile.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile.in b/Makefile.in
index 5fe49787..51ad67c6 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -839,7 +839,7 @@ install-gensources:
done
echo "\\ empty site-init" > $(siteforthdir)/siteinit.fs
-install-txt: doc
+install-txt: txt
$(INSTALL_DATA) doc/gforth.txt $(datadir)/gforth/$(VERSION)/doc/gforth.txt
install-images: install-txt
--
2.33.0