diff --git a/pkgs/applications/editors/emacs-modes/jdee/default.nix b/pkgs/applications/editors/emacs-modes/jdee/default.nix index 3b8cce053e5..5b7f009eacd 100644 --- a/pkgs/applications/editors/emacs-modes/jdee/default.nix +++ b/pkgs/applications/editors/emacs-modes/jdee/default.nix @@ -34,14 +34,23 @@ in build.bin.emacs = ${emacs}/bin/emacs EOF + # Substitute variables, à la Autoconf. for i in lisp/*.el do - sed -i "$i" -e"s|@out@|$out|g" + sed -i "$i" -e "s|@out@|$out|g ; + s|@javadir@|$out/lib/java|g ; + s|@datadir@|$out/share/${name}|g" done ''; buildPhase = "ant dist"; - installPhase = "ant install"; + + installPhase = '' + ant install + + ensureDir "$out/share/${name}" + cp -rv java/bsh-commands "$out/share/${name}" + ''; buildInputs = [ emacs ant ]; propagatedBuildInputs = [ cedet ]; diff --git a/pkgs/applications/editors/emacs-modes/jdee/java-directory.patch b/pkgs/applications/editors/emacs-modes/jdee/java-directory.patch index 93dc845d264..3b07246edcc 100644 --- a/pkgs/applications/editors/emacs-modes/jdee/java-directory.patch +++ b/pkgs/applications/editors/emacs-modes/jdee/java-directory.patch @@ -10,11 +10,13 @@ Tell the elisp code about the right Java directory. - (concat - (jde-find-jde-data-directory) - "java/"))) -+ (let* ((jde-java-directory "@out@/lib/java")) - - (oset this bsh-cmd-dir (expand-file-name "bsh-commands" jde-java-directory)) +- +- (oset this bsh-cmd-dir (expand-file-name "bsh-commands" jde-java-directory)) - (oset this checkstyle-jar (expand-file-name "lib/checkstyle-all.jar" jde-java-directory)) - (oset this regexp-jar (expand-file-name "lib/jakarta-regexp.jar" jde-java-directory)) ++ (let ((jde-java-directory "@out@/lib/java")) ++ ++ (oset this bsh-cmd-dir "@datadir@/bsh-commands") + (oset this checkstyle-jar (expand-file-name "checkstyle-all.jar" jde-java-directory)) + (oset this regexp-jar (expand-file-name "jakarta-regexp.jar" jde-java-directory)) (oset this jde-classes-dir (expand-file-name "classes" jde-java-directory))