7 stdenv.mkDerivation (finalAttrs: {
11 src = fetchFromGitHub {
14 rev = "v${finalAttrs.version}";
15 hash = "sha256-vEjFeHSJl+yAtatYJEnu+r9hmOr/kZOgIbSUXR/c8WU=";
18 # We build the dictionary in a cross-compile compatible way.
19 # For that, we perform steps, that the Makefile would otherwise do.
22 make -C platforms/unix pfdicapp
24 ${stdenv.hostPlatform.emulator buildPackages} ../platforms/unix/pforth -i system.fth
25 ${stdenv.hostPlatform.emulator buildPackages} ../platforms/unix/pforth -d pforth.dic <<< "include savedicd.fth sdad bye"
26 mv pforth.dic pfdicdat.h ../platforms/unix/
28 make -C platforms/unix pforthapp
34 install -Dm755 platforms/unix/pforth_standalone $out/bin/pforth
35 mkdir -p $out/share/pforth
36 cp -r fth/* $out/share/pforth/
41 homepage = "https://www.softsynth.com/pforth/";
42 description = "Portable Portable ANS-like Forth written in ANSI 'C'";
43 mainProgram = "pforth";
44 changelog = "https://github.com/philburk/pforth/blob/v${finalAttrs.version}/RELEASES.md";
45 license = lib.licenses.bsd0;
46 maintainers = with lib.maintainers; [ AndersonTorres yrashk ];
47 platforms = lib.platforms.unix;
50 # TODO: option for install the non-standalone executable