gforth: 0.7.9_20230518 -> 0.7.9_20251001 (#449792)

This commit is contained in:
Bjørn Forsman
2025-10-09 17:36:37 +00:00
committed by GitHub
3 changed files with 34 additions and 9 deletions

View File

@@ -23,7 +23,7 @@ stdenv.mkDerivation {
meta = { meta = {
description = "Forth implementation of the GNU project (outdated version used to bootstrap)"; description = "Forth implementation of the GNU project (outdated version used to bootstrap)";
homepage = "https://www.gnu.org/software/gforth/"; homepage = "https://www.gnu.org/software/gforth/";
license = lib.licenses.gpl3; license = lib.licenses.gpl3Plus;
platforms = lib.platforms.all; platforms = lib.platforms.all;
}; };
} }

View File

@@ -4,8 +4,10 @@
fetchFromGitHub, fetchFromGitHub,
callPackage, callPackage,
autoreconfHook, autoreconfHook,
gitUpdater,
texinfo, texinfo,
libffi, libffi,
writableTmpDirAsHomeHook,
}: }:
let let
@@ -13,24 +15,27 @@ let
bootForth = callPackage ./boot-forth.nix { }; bootForth = callPackage ./boot-forth.nix { };
lispDir = "${placeholder "out"}/share/emacs/site-lisp"; lispDir = "${placeholder "out"}/share/emacs/site-lisp";
in in
stdenv.mkDerivation rec { stdenv.mkDerivation (finalAttrs: {
pname = "gforth"; pname = "gforth";
version = "0.7.9_20230518"; version = "0.7.9_20251001";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "forthy42"; owner = "forthy42";
repo = "gforth"; repo = "gforth";
rev = version; rev = finalAttrs.version;
hash = "sha256-rXtmmENBt9RMdLPq8GDyndh4+CYnCmz6NYpe3kH5OwU="; hash = "sha256-u9snXcFa/YYvITgMBY8FRYyyLFhHCP6hWA5ljwdKGLk=";
}; };
patches = [ ./use-nproc-instead-of-fhs.patch ];
nativeBuildInputs = [ nativeBuildInputs = [
writableTmpDirAsHomeHook
autoreconfHook autoreconfHook
texinfo texinfo
bootForth bootForth
swig swig
]; ];
buildInputs = [ buildInputs = [
libffi libffi
]; ];
@@ -48,11 +53,15 @@ stdenv.mkDerivation rec {
mkdir -p ${lispDir} mkdir -p ${lispDir}
''; '';
passthru.updateScript = gitUpdater { };
meta = { meta = {
description = "Forth implementation of the GNU project"; description = "Forth implementation of the GNU project";
homepage = "https://github.com/forthy42/gforth"; homepage = "https://www.gnu.org/software/gforth";
license = lib.licenses.gpl3; downloadPage = "https://github.com/forthy42/gforth";
license = lib.licenses.gpl3Plus;
broken = stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64; # segfault when running ./gforthmi broken = stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64; # segfault when running ./gforthmi
platforms = lib.platforms.all; platforms = lib.platforms.all;
mainProgram = "gforth";
}; };
} })

View File

@@ -0,0 +1,16 @@
diff --git i/cilk.fs w/cilk.fs
index 9c675d06..df858f3d 100644
--- i/cilk.fs
+++ w/cilk.fs
@@ -25,9 +25,8 @@ e? os-type 2dup s" darwin" string-prefix? -rot s" openbsd" string-prefix? or [IF
s>number drop
r> free throw
[ELSE] e? os-type s" linux" search nip nip [IF]
- s" /sys/devices/system/cpu/present" slurp-file over >r
- #lf -scan '-' $split 2nip
- s>number drop 1+
+ s" nproc" r/o open-pipe throw slurp-fid over >r
+ s>number drop
r> free throw
[ELSE]
1 \ we don't know