From 3bef6e064225117eb71e23f83b9f8fb9c5570af9 Mon Sep 17 00:00:00 2001
From: Philipp Jungkamp
Date: Fri, 4 Jul 2025 15:11:29 +0200
Subject: [PATCH] kakoune: fix statically-linked and cross-compiled build
The kakoune Makefile does not use the c++ compiler specified by the
`CXX` environment variable and instead defaults to `c++` as the
executable name.
Override the Makefile `CXX` variable with the value from the stdenv
environment.
---
pkgs/applications/editors/kakoune/default.nix | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/pkgs/applications/editors/kakoune/default.nix b/pkgs/applications/editors/kakoune/default.nix
index a2bd4c7e087e..29b2c4674be7 100644
--- a/pkgs/applications/editors/kakoune/default.nix
+++ b/pkgs/applications/editors/kakoune/default.nix
@@ -13,6 +13,7 @@ stdenv.mkDerivation (finalAttrs: {
rev = "v${finalAttrs.version}";
hash = "sha256-AJvh6NVFpbPsyzfeii/5muE+i4TwfxhwhDVgMLYOJCM=";
};
+
makeFlags = [
"debug=no"
"PREFIX=${placeholder "out"}"
@@ -23,6 +24,9 @@ stdenv.mkDerivation (finalAttrs: {
'';
enableParallelBuilding = true;
+ preBuild = ''
+ appendToVar makeFlags "CXX=$CXX"
+ '';
doInstallCheck = true;
installCheckPhase = ''