about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/libtorrent-rasterbar/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/libtorrent-rasterbar/default.nix')
-rw-r--r--nixpkgs/pkgs/development/libraries/libtorrent-rasterbar/default.nix17
1 files changed, 14 insertions, 3 deletions
diff --git a/nixpkgs/pkgs/development/libraries/libtorrent-rasterbar/default.nix b/nixpkgs/pkgs/development/libraries/libtorrent-rasterbar/default.nix
index 412446f215f8..4ec70464e1ab 100644
--- a/nixpkgs/pkgs/development/libraries/libtorrent-rasterbar/default.nix
+++ b/nixpkgs/pkgs/development/libraries/libtorrent-rasterbar/default.nix
@@ -3,7 +3,7 @@
 }:
 
 let
-  version = "2.0.7";
+  version = "2.0.9";
 
   # Make sure we override python, so the correct version is chosen
   boostPython = boost.override { enablePython = true; inherit python; };
@@ -16,7 +16,7 @@ in stdenv.mkDerivation {
     owner = "arvidn";
     repo = "libtorrent";
     rev = "v${version}";
-    sha256 = "sha256-ikDtx1BIikVEL5jf37byNbuS+ft1lDtHUlFqegndapw=";
+    sha256 = "sha256-kUpeofullQ70uK/YZUD0ikHCquFTGwev7MxBYj0oHeU=";
     fetchSubmodules = true;
   };
 
@@ -25,6 +25,18 @@ in stdenv.mkDerivation {
   buildInputs = [ boostPython openssl zlib python ncurses ]
     ++ lib.optionals stdenv.isDarwin [ SystemConfiguration ];
 
+  # https://github.com/arvidn/libtorrent/issues/6865
+  postPatch = ''
+    substituteInPlace cmake/Modules/GeneratePkgConfig.cmake \
+      --replace @CMAKE_INSTALL_PREFIX@/'$<'1: '$<'1:
+    substituteInPlace cmake/Modules/GeneratePkgConfig/target-compile-settings.cmake.in \
+      --replace 'set(_INSTALL_LIBDIR "@CMAKE_INSTALL_LIBDIR@")' \
+                'set(_INSTALL_LIBDIR "@CMAKE_INSTALL_LIBDIR@")
+                 set(_INSTALL_FULL_LIBDIR "@CMAKE_INSTALL_FULL_LIBDIR@")'
+    substituteInPlace cmake/Modules/GeneratePkgConfig/pkg-config.cmake.in \
+      --replace '$'{prefix}/@_INSTALL_LIBDIR@ @_INSTALL_FULL_LIBDIR@
+  '';
+
   postInstall = ''
     moveToOutput "include" "$dev"
     moveToOutput "lib/${python.libPrefix}" "$python"
@@ -37,7 +49,6 @@ in stdenv.mkDerivation {
   ];
 
   meta = with lib; {
-    broken = stdenv.isDarwin;
     homepage = "https://libtorrent.org/";
     description = "A C++ BitTorrent implementation focusing on efficiency and scalability";
     license = licenses.bsd3;