at 23.05-pre 46 lines 1.0 kB view raw
1{ lib, stdenv, fetchFromGitHub, callPackage 2, autoreconfHook, texinfo, libffi 3}: 4 5let 6 swig = callPackage ./swig.nix { }; 7 bootForth = callPackage ./boot-forth.nix { }; 8 lispDir = "${placeholder "out"}/share/emacs/site-lisp"; 9in stdenv.mkDerivation rec { 10 11 pname = "gforth"; 12 version = "0.7.9_20220127"; 13 14 src = fetchFromGitHub { 15 owner = "forthy42"; 16 repo = "gforth"; 17 rev = version; 18 sha256 = "sha256-3+ObHhsPvW44UFiN0GWOhwo7aiqhjwxNY8hw2Wv4MK0="; 19 }; 20 21 nativeBuildInputs = [ 22 autoreconfHook texinfo bootForth swig 23 ]; 24 buildInputs = [ 25 libffi 26 ]; 27 28 passthru = { inherit bootForth; }; 29 30 configureFlags = [ 31 "--with-lispdir=${lispDir}" 32 ] ++ lib.optionals (stdenv.isDarwin && stdenv.isx86_64) [ 33 "--build=x86_64-apple-darwin" 34 ]; 35 36 preConfigure = '' 37 mkdir -p ${lispDir} 38 ''; 39 40 meta = { 41 description = "The Forth implementation of the GNU project"; 42 homepage = "https://github.com/forthy42/gforth"; 43 license = lib.licenses.gpl3; 44 platforms = lib.platforms.all; 45 }; 46}