elpa-devel-packages: build xeft dynamic module

Build the native dynamic module required by the xeft package for Emacs.
This commit is contained in:
Anthony Cowley 2023-08-19 12:34:14 -04:00 committed by Anderson Torres
parent 6dd389dd9f
commit 9b3fefd37d

View File

@ -63,6 +63,22 @@ self: let
popd
'';
});
xeft = super.xeft.overrideAttrs (old: let
libExt = pkgs.stdenv.targetPlatform.extensions.sharedLibrary;
in {
dontUnpack = false;
buildInputs = (old.buildInputs or [ ]) ++ [ pkgs.xapian ];
buildPhase = (old.buildPhase or "") + ''
$CXX -shared -o xapian-lite${libExt} xapian-lite.cc $NIX_CFLAGS_COMPILE -lxapian
'';
postInstall = (old.postInstall or "") + "\n" + ''
outd=$out/share/emacs/site-lisp/elpa/xeft-*
install -m444 -t $outd xapian-lite${libExt}
rm $outd/xapian-lite.cc $outd/emacs-module.h $outd/emacs-module-prelude.h $outd/demo.gif $outd/Makefile
'';
});
};
elpaDevelPackages = super // overrides;