diff --git a/pkgs/by-name/pr/proxmox-backup-client/package.nix b/pkgs/by-name/pr/proxmox-backup-client/package.nix index e19b41c293c6..6bd8a0e52de4 100644 --- a/pkgs/by-name/pr/proxmox-backup-client/package.nix +++ b/pkgs/by-name/pr/proxmox-backup-client/package.nix @@ -3,19 +3,15 @@ fetchgit, fetchFromGitHub, rustPlatform, - pkg-config, pkgconf, openssl, fuse3, libuuid, acl, libxcrypt, - git, installShellFiles, sphinx, - systemd, stdenv, - fetchpatch, versionCheckHook, }: @@ -113,12 +109,19 @@ 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 '!' >.dep-stubs/libsystemd.a + echo '!' >.dep-stubs/libuuid.a + echo '!' >.dep-stubs/libcrypt.a ''; postBuild = '' make -C docs \ DEB_VERSION=${version} DEB_VERSION_UPSTREAM=${version} \ - RUSTC_TARGET=${stdenv.hostPlatform.config} \ + RUSTC_TARGET=${stdenv.targetPlatform.rust.rustcTarget} \ BUILD_MODE=release \ proxmox-backup-client.1 pxar.1 ''; @@ -147,25 +150,28 @@ rustPlatform.buildRustPackage { "--bin=pxar" ]; + RUSTFLAGS = [ "-L.dep-stubs" ]; + doCheck = false; + # pbs-buildcfg requires this set, would be the git commit id + REPOID = ""; + nativeBuildInputs = [ - git - pkg-config pkgconf rustPlatform.bindgenHook installShellFiles sphinx ]; + buildInputs = [ openssl fuse3 - libuuid acl - libxcrypt - systemd.dev ]; + strictDeps = true; + doInstallCheck = true; nativeInstallCheckInputs = [ versionCheckHook ]; versionCheckProgramArg = "version";