diff --git a/pkgs/development/compilers/gforth/default.nix b/pkgs/development/compilers/gforth/default.nix index a57dea7b1b62..c84fa5975abf 100644 --- a/pkgs/development/compilers/gforth/default.nix +++ b/pkgs/development/compilers/gforth/default.nix @@ -5,6 +5,7 @@ let swig = callPackage ./swig.nix { }; bootForth = callPackage ./boot-forth.nix { }; + lispDir = "${placeholder "out"}/share/emacs/site-lisp"; in stdenv.mkDerivation rec { pname = "gforth"; @@ -26,15 +27,17 @@ in stdenv.mkDerivation rec { passthru = { inherit bootForth; }; - configureFlags = lib.optional stdenv.isDarwin [ "--build=x86_64-apple-darwin" ]; + configureFlags = [ + "--with-lispdir=${lispDir}" + ] ++ lib.optionals (stdenv.isDarwin && stdenv.isx86_64) [ + "--build=x86_64-apple-darwin" + ]; - postInstall = '' - mkdir -p $out/share/emacs/site-lisp - cp gforth.el $out/share/emacs/site-lisp/ + preConfigure = '' + mkdir -p ${lispDir} ''; meta = { - broken = stdenv.isDarwin; description = "The Forth implementation of the GNU project"; homepage = "https://github.com/forthy42/gforth"; license = lib.licenses.gpl3;