proxmox-backup-client: avoid some unnecessary buildInputs due to greedy linkage

These are actually not necessary, rustc just does greedy linkage.

Signed-off-by: Christoph Heiss <christoph@c8h4.io>
This commit is contained in:
Christoph Heiss
2025-06-10 22:18:56 +02:00
parent 6bc9f0fbe3
commit 723612485f
@@ -11,9 +11,7 @@
libxcrypt,
installShellFiles,
sphinx,
systemd,
stdenv,
fetchpatch,
versionCheckHook,
}:
@@ -111,6 +109,13 @@ rustPlatform.buildRustPackage {
cp ${./Cargo.lock} Cargo.lock
rm .cargo/config.toml
# avoid some unnecessary dependendcies, stemming from greedy linkage by rustc
# see also upstream Makefile for similar workaround
mkdir -p .dep-stubs
echo '!<arch>' >.dep-stubs/libsystemd.a
echo '!<arch>' >.dep-stubs/libuuid.a
echo '!<arch>' >.dep-stubs/libcrypt.a
'';
postBuild = ''
@@ -145,6 +150,8 @@ rustPlatform.buildRustPackage {
"--bin=pxar"
];
RUSTFLAGS = [ "-L.dep-stubs" ];
doCheck = false;
# pbs-buildcfg requires this set, would be the git commit id
@@ -156,15 +163,15 @@ rustPlatform.buildRustPackage {
installShellFiles
sphinx
];
buildInputs = [
openssl
fuse3
libuuid
acl
libxcrypt
systemd.dev
];
strictDeps = true;
doInstallCheck = true;
nativeInstallCheckInputs = [ versionCheckHook ];
versionCheckProgramArg = "version";