summaryrefslogtreecommitdiffstats
path: root/pkgs/development/compilers/gforth
diff options
context:
space:
mode:
authorRobert Scott <code@humanleg.org.uk>2022-05-28 22:13:48 +0100
committerRobert Scott <code@humanleg.org.uk>2022-06-11 19:13:29 +0100
commitb71cff07a73fc7949c22d045bb74c7ef1e9bbb2d (patch)
tree635be60925259d520833137c2655098d23b1dc1c /pkgs/development/compilers/gforth
parent6036dcbdb930177396012bbe39d8e31201289a14 (diff)
gforth: explicitly set lispdir
otherwise in situations where we don't have a working sandbox (darwin), if /usr/share/emacs happens to exist, the install phase will try to put its lisp files there and fail due to permissions.
Diffstat (limited to 'pkgs/development/compilers/gforth')
-rw-r--r--pkgs/development/compilers/gforth/default.nix12
1 files changed, 8 insertions, 4 deletions
diff --git a/pkgs/development/compilers/gforth/default.nix b/pkgs/development/compilers/gforth/default.nix
index a57dea7b1b62..a926c4e8cf9f 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,11 +27,14 @@ 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 = {