diff options
author | Charlotte Van Petegem <charlotte@vanpetegem.me> | 2023-07-02 20:12:10 +0200 |
---|---|---|
committer | Charlotte Van Petegem <charlotte.vanpetegem@ugent.be> | 2023-07-03 11:39:48 +0200 |
commit | 760949b72bcb5762ffed8c39124f1704e784b1d4 (patch) | |
tree | 42f679040641433a212ff265764edf2eb1a4ff92 /pkgs/applications/networking/p2p/transmission | |
parent | d5188368ce62dca0821b5a157f9d7d6124d0cc82 (diff) |
transmission_4: make sure to use dependencies from nixpkgs
Diffstat (limited to 'pkgs/applications/networking/p2p/transmission')
-rw-r--r-- | pkgs/applications/networking/p2p/transmission/4.nix | 39 |
1 files changed, 31 insertions, 8 deletions
diff --git a/pkgs/applications/networking/p2p/transmission/4.nix b/pkgs/applications/networking/p2p/transmission/4.nix index 82f6aa83ed7c7..6ad2c8dd08283 100644 --- a/pkgs/applications/networking/p2p/transmission/4.nix +++ b/pkgs/applications/networking/p2p/transmission/4.nix @@ -14,6 +14,9 @@ , libb64 , libutp , libdeflate +, utf8cpp +, fmt +, libpsl , miniupnpc , dht , libnatpmp @@ -64,6 +67,23 @@ stdenv.mkDerivation rec { "-DCMAKE_OSX_DEPLOYMENT_TARGET=${stdenv.hostPlatform.darwinMinVersion}" ]; + postPatch = '' + # Clean third-party libraries to ensure system ones are used. + # Excluding gtest since it is hardcoded to vendored version. The rest of the listed libraries are not packaged. + pushd third-party + for f in *; do + if [[ ! $f =~ googletest|wildmat|fast_float|wide-integer|jsonsl ]]; then + rm -r "$f" + fi + done + popd + rm \ + cmake/FindFmt.cmake \ + cmake/FindUtfCpp.cmake + # Upstream uses different config file name. + substituteInPlace CMakeLists.txt --replace 'find_package(UtfCpp)' 'find_package(utf8cpp)' + ''; + nativeBuildInputs = [ pkg-config cmake @@ -74,17 +94,20 @@ stdenv.mkDerivation rec { ; buildInputs = [ - openssl curl - libevent - zlib - pcre + dht + fmt libb64 - libutp libdeflate - miniupnpc - dht + libevent libnatpmp + libpsl + libutp + miniupnpc + openssl + pcre + utf8cpp + zlib ] ++ lib.optionals enableQt [ qt5.qttools qt5.qtbase ] ++ lib.optionals enableGTK3 [ gtkmm3 xorg.libpthreadstubs ] @@ -101,7 +124,7 @@ stdenv.mkDerivation rec { include <abstractions/nameservice> include <abstractions/ssl_certs> include "${apparmorRulesFromClosure { name = "transmission-daemon"; } ([ - curl libevent openssl pcre zlib libdeflate libnatpmp miniupnpc + curl libevent openssl pcre zlib libdeflate libpsl libnatpmp miniupnpc ] ++ lib.optionals enableSystemd [ systemd ] ++ lib.optionals stdenv.isLinux [ inotify-tools ] )}" |