Merge pull request #146234 from NixOS/update-gforth-forthy42

gforth: 0.7.3 -> 0.7.9_20220127
This commit is contained in:
Herwig Hochleitner
2022-02-08 09:09:55 +01:00
committed by GitHub
3 changed files with 63 additions and 10 deletions
@@ -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;
};
}
+23 -10
View File
@@ -1,17 +1,30 @@
{ lib, stdenv, fetchurl, m4 }:
{ lib, stdenv, fetchFromGitHub, callPackage
, autoreconfHook, texinfo, libffi
}:
let
version = "0.7.3";
in
stdenv.mkDerivation {
swig = callPackage ./swig.nix { };
bootForth = callPackage ./boot-forth.nix { };
in stdenv.mkDerivation rec {
pname = "gforth";
inherit version;
src = fetchurl {
url = "https://ftp.gnu.org/gnu/gforth/gforth-${version}.tar.gz";
sha256 = "1c1bahc9ypmca8rv2dijiqbangm1d9av286904yw48ph7ciz4qig";
version = "0.7.9_20220127";
src = fetchFromGitHub {
owner = "forthy42";
repo = "gforth";
rev = version;
sha256 = "sha256-3+ObHhsPvW44UFiN0GWOhwo7aiqhjwxNY8hw2Wv4MK0=";
};
buildInputs = [ m4 ];
nativeBuildInputs = [
autoreconfHook texinfo bootForth swig
];
buildInputs = [
libffi
];
passthru = { inherit bootForth; };
configureFlags = lib.optional stdenv.isDarwin [ "--build=x86_64-apple-darwin" ];
@@ -22,7 +35,7 @@ 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;
};
@@ -0,0 +1,16 @@
{ swig3, fetchFromGitHub }:
## for updating to swig4, see
## https://github.com/GeraldWodni/swig/pull/6
swig3.overrideDerivation (old: {
version = "3.0.9-forth";
src = fetchFromGitHub {
owner = "GeraldWodni";
repo = "swig";
rev = "a45b807e5f9d8ca1a43649c8265d2741a393862a";
sha256 = "sha256-6nOOPFGFNaQInEkul0ZAh+ks9n3wqCQ6/tbduvG/To0=";
};
configureFlags = old.configureFlags ++ [
"--enable-forth"
];
})