3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/editors/kakoune/default.nix
Cole Helbling 9b3fe2eef4
kakoune: fix installCheck
* `doInstallCheckPhase` -> `doInstallCheck`
* `-E` throws an exception that is uncaught, leading the check to fail.
`-e` works as expected.
2020-12-21 16:21:22 -08:00

50 lines
1.2 KiB
Nix

{ stdenv, fetchFromGitHub, ncurses, asciidoc, docbook_xsl, libxslt, pkgconfig }:
with stdenv.lib;
stdenv.mkDerivation rec {
pname = "kakoune-unwrapped";
version = "2020.09.01";
src = fetchFromGitHub {
repo = "kakoune";
owner = "mawww";
rev = "v${version}";
sha256 = "091qzk0qs7hql0q51hix99srgma35mhdnjfd5ncfba1bmc1h8x5i";
};
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ ncurses asciidoc docbook_xsl libxslt ];
makeFlags = [ "debug=no" ];
postPatch = ''
export PREFIX=$out
cd src
sed -ie 's#--no-xmllint#--no-xmllint --xsltproc-opts="--nonet"#g' Makefile
'';
preConfigure = ''
export version="v${version}"
'';
doInstallCheck = true;
installCheckPhase = ''
$out/bin/kak -ui json -e "kill 0"
'';
postInstall = ''
# make share/kak/autoload a directory, so we can use symlinkJoin with plugins
cd "$out/share/kak"
autoload_target=$(readlink autoload)
rm autoload
mkdir autoload
ln -s --relative "$autoload_target" autoload
'';
meta = {
homepage = "http://kakoune.org/";
description = "A vim inspired text editor";
license = licenses.publicDomain;
maintainers = with maintainers; [ vrthra ];
platforms = platforms.unix;
};
}