borgbackup: unbundle xxhash and use pkgconfig

Borg can use the python pkgconfig package to discover library paths, we
don't need to pass them explicitly.

Removes libb2, because borg since version 1.2.0 uses hashlib.blake2b
instead.
This commit is contained in:
Martin Weinelt 2022-12-25 02:40:25 +01:00
parent c64195df27
commit 71ab3109f2
No known key found for this signature in database
GPG Key ID: 87C1E9888F856759

View File

@ -7,6 +7,7 @@
, openssh
, openssl
, python3
, xxHash
, zstd
, installShellFiles
, nixosTests
@ -41,6 +42,7 @@ python3.pkgs.buildPythonApplication rec {
nativeBuildInputs = with python3.pkgs; [
cython
setuptools-scm
pkgconfig
# docs
sphinxHook
@ -55,6 +57,7 @@ python3.pkgs.buildPythonApplication rec {
buildInputs = [
libb2
lz4
xxHash
zstd
openssl
] ++ lib.optionals stdenv.isLinux [
@ -67,13 +70,6 @@ python3.pkgs.buildPythonApplication rec {
(if stdenv.isLinux then pyfuse3 else llfuse)
];
preConfigure = ''
export BORG_OPENSSL_PREFIX="${openssl.dev}"
export BORG_LZ4_PREFIX="${lz4.dev}"
export BORG_LIBB2_PREFIX="${libb2}"
export BORG_LIBZSTD_PREFIX="${zstd.dev}"
'';
makeWrapperArgs = [
''--prefix PATH ':' "${openssh}/bin"''
];