nixpkgs-suyu/pkgs/applications/editors/kakoune/default.nix

43 lines
1 KiB
Nix

{ lib, stdenv, fetchFromGitHub }:
with lib;
stdenv.mkDerivation rec {
pname = "kakoune-unwrapped";
version = "2021.10.28";
src = fetchFromGitHub {
repo = "kakoune";
owner = "mawww";
rev = "v${version}";
sha256 = "sha256-ph0063EHyFa7arXvCVD+tGhs8ShyCDYkFVd1w6MZ5Z8=";
};
makeFlags = [ "debug=no" "PREFIX=${placeholder "out"}" ];
preConfigure = ''
export version="v${version}"
'';
enableParallelBuilding = true;
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;
};
}