2024-01-02 11:29:13 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, fetchpatch }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "kakoune-unwrapped";
|
2023-10-09 19:29:22 +00:00
|
|
|
version = "2023.08.05";
|
2020-04-24 23:36:52 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
repo = "kakoune";
|
|
|
|
owner = "mawww";
|
|
|
|
rev = "v${version}";
|
2023-10-09 19:29:22 +00:00
|
|
|
sha256 = "sha256-RR3kw39vEjsg+6cIY6cK2i3ecGHlr1yzuBKaDtGlOGo=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2024-01-02 11:29:13 +00:00
|
|
|
patches = [
|
|
|
|
# Use explicit target types for gather calls to bypass clang regression
|
|
|
|
#
|
|
|
|
# Since clang-16 there has been a regression in the P0522R0 support.
|
|
|
|
# (Bug report at https://github.com/llvm/llvm-project/issue/63281)
|
|
|
|
#
|
|
|
|
# Closes mawww/kakoune#4892
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/mawww/kakoune/commit/7577fa1b668ea81eb9b7b9af690a4161187129dd.patch";
|
|
|
|
hash = "sha256-M0jKaEDhkpvX+n7k8Jf2lWaRNy8bqZ1kRHR4eG4npss=";
|
|
|
|
})
|
|
|
|
];
|
2021-09-18 10:52:07 +00:00
|
|
|
makeFlags = [ "debug=no" "PREFIX=${placeholder "out"}" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
export version="v${version}"
|
|
|
|
'';
|
|
|
|
|
2021-02-13 14:23:35 +00:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2020-12-25 13:55:36 +00:00
|
|
|
doInstallCheck = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
installCheckPhase = ''
|
2020-12-25 13:55:36 +00:00
|
|
|
$out/bin/kak -ui json -e "kill 0"
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2020-11-03 02:18:15 +00:00
|
|
|
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
|
|
|
|
'';
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "http://kakoune.org/";
|
|
|
|
description = "A vim inspired text editor";
|
|
|
|
license = licenses.publicDomain;
|
2021-12-19 01:06:50 +00:00
|
|
|
mainProgram = "kak";
|
2023-11-16 04:20:00 +00:00
|
|
|
maintainers = with maintainers; [ vrthra ];
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|