btop: Fix static build

This commit is contained in:
Henri Menke
2026-04-08 10:12:08 +02:00
parent f23b37e079
commit 0fffcbb0b0
+4
View File
@@ -41,8 +41,12 @@ stdenv.mkDerivation (finalAttrs: {
# fix build on darwin (see https://github.com/NixOS/nixpkgs/pull/422218#issuecomment-3039181870 and https://github.com/aristocratos/btop/pull/1173)
cmakeFlags = [
(lib.cmakeBool "BTOP_LTO" (!stdenv.hostPlatform.isDarwin))
(lib.cmakeBool "BTOP_STATIC" (stdenv.hostPlatform.isStatic))
(lib.cmakeBool "BTOP_FORTIFY" (!stdenv.hostPlatform.isStatic))
];
hardeningDisable = lib.optionals stdenv.hostPlatform.isStatic [ "fortify" ];
postInstall = ''
${removeReferencesTo}/bin/remove-references-to -t ${stdenv.cc.cc} $(readlink -f $out/bin/btop)
'';