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