From cc9b725005ca9977072593eb46c364b88d628363 Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Thu, 1 Feb 2024 20:27:12 +0100 Subject: [PATCH] nix: Remove libkrb5 references from static executable --- nix/static.nix | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/nix/static.nix b/nix/static.nix index 4a54f919a..0201d506a 100644 --- a/nix/static.nix +++ b/nix/static.nix @@ -38,8 +38,15 @@ let buildInputs = prevAttrs.buildInputs ++ [ (pkgsStatic.libkrb5.overrideAttrs (finalAttrs: prevAttrs: { - # disable keyutils dependency, to avoid linking errors - configureFlags = prevAttrs.configureFlags ++ [ "--without-keyutils" ]; + configureFlags = prevAttrs.configureFlags ++ [ + "--sysconfdir=/etc" + # disable keyutils dependency, to avoid linking errors + "--without-keyutils" + ]; + + postInstall = prevAttrs.postInstall + '' + ${pkgsStatic.pkgsBuildHost.removeReferencesTo}/bin/remove-references-to -t $out $out/lib/*.a + ''; })) ]; });