53 lines
1.3 KiB
Nix
53 lines
1.3 KiB
Nix
{
|
|
description = "kakoune (patch)";
|
|
|
|
inputs = {
|
|
flake-utils.url = "github:numtide/flake-utils";
|
|
};
|
|
|
|
outputs = { self, nixpkgs, flake-utils }:
|
|
flake-utils.lib.eachDefaultSystem (sys:
|
|
let
|
|
pkgs = nixpkgs.legacyPackages.${sys};
|
|
clang = pkgs.clang_15;
|
|
|
|
kak = pkgs.stdenv.mkDerivation rec {
|
|
pname = "kak";
|
|
version = "dev";
|
|
src = ./. ;
|
|
makeFlags = [ "debug=no" "PREFIX=${placeholder "out"}" ];
|
|
nativeBuildInputs = [ clang ];
|
|
|
|
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
|
|
cat <<EOF >> kakrc
|
|
set-option -add global ui_options terminal_assistant=cat
|
|
EOF
|
|
'';
|
|
};
|
|
in rec {
|
|
packages.kak = kak;
|
|
packages.default = kak;
|
|
devShells.default = pkgs.mkShell {
|
|
packages = [ clang ];
|
|
};
|
|
}
|
|
);
|
|
}
|