Merge pull request #71347 from peterhoeg/f/emacs_vterm

emacsPackages.vterm: fix dynamic library and autoloaders
This commit is contained in:
Peter Hoeg 2019-10-28 12:23:21 +08:00 committed by GitHub
commit c833fb3179
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -394,52 +394,22 @@ env NIXPKGS_ALLOW_BROKEN=1 nix-instantiate --show-trace ../../../../ -A emacsPac
(attrs.nativeBuildInputs or []) ++ [ external.git ]; (attrs.nativeBuildInputs or []) ++ [ external.git ];
}); });
vterm = let vterm = super.vterm.overrideAttrs(old: {
emacsSources = pkgs.stdenv.mkDerivation { buildInputs = old.buildInputs ++ [ self.emacs pkgs.cmake pkgs.libvterm-neovim ];
name = self.emacs.name + "-sources";
src = self.emacs.src;
dontConfigure = true;
dontBuild = true;
doCheck = false;
fixupPhase = ":";
installPhase = ''
mkdir -p $out
cp -a * $out
'';
};
libvterm = pkgs.libvterm-neovim.overrideAttrs(old: rec {
pname = "libvterm-neovim";
version = "2019-04-27";
name = pname + "-" + version;
src = pkgs.fetchFromGitHub {
owner = "neovim";
repo = "libvterm";
rev = "89675ffdda615ffc3f29d1c47a933f4f44183364";
sha256 = "0l9ixbj516vl41v78fi302ws655xawl7s94gmx1kb3fmfgamqisy";
};
});
in pkgs.stdenv.mkDerivation {
inherit (super.vterm) name version src;
nativeBuildInputs = [ pkgs.cmake ];
buildInputs = [ self.emacs libvterm ];
cmakeFlags = [ cmakeFlags = [
"-DEMACS_SOURCE=${emacsSources}" "-DEMACS_SOURCE=${self.emacs.src}"
"-DUSE_SYSTEM_LIBVTERM=True" "-DUSE_SYSTEM_LIBVTERM=ON"
]; ];
# we need the proper out directory to exist, so we do this in the
installPhase = '' # postInstall instead of postBuild
install -d $out/share/emacs/site-lisp postInstall = ''
install ../*.el $out/share/emacs/site-lisp pushd source/build >/dev/null
install ../*.so $out/share/emacs/site-lisp make
install -m444 -t $out/share/emacs/site-lisp/elpa/vterm-** ../*.so
popd > /dev/null
rm -rf $out/share/emacs/site-lisp/elpa/vterm-**/{CMake*,build,*.c,*.h}
''; '';
}; });
# Legacy alias # Legacy alias
emacs-libvterm = unstable.vterm; emacs-libvterm = unstable.vterm;