about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/networking/p2p/libtorrent-jesec/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/tools/networking/p2p/libtorrent-jesec/default.nix')
-rw-r--r--nixpkgs/pkgs/tools/networking/p2p/libtorrent-jesec/default.nix38
1 files changed, 38 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/tools/networking/p2p/libtorrent-jesec/default.nix b/nixpkgs/pkgs/tools/networking/p2p/libtorrent-jesec/default.nix
new file mode 100644
index 000000000000..0fd16f4799d6
--- /dev/null
+++ b/nixpkgs/pkgs/tools/networking/p2p/libtorrent-jesec/default.nix
@@ -0,0 +1,38 @@
+{ lib, stdenv, fetchFromGitHub, fetchpatch, cmake, gtest, openssl, zlib }:
+
+stdenv.mkDerivation rec {
+  pname = "libtorrent-jesec";
+  version = "0.13.8-r2";
+
+  src = fetchFromGitHub {
+    owner = "jesec";
+    repo = "libtorrent";
+    rev = "v${version}";
+    sha256 = "sha256-eIXVTbVOCRHcxSsLPvIm9F60t2upk5ORpDSOOYqTCJ4=";
+  };
+
+  patches = [
+    (fetchpatch {
+      name = "test-fallback";
+      url = "https://github.com/jesec/libtorrent/commit/a38205ce06aadc9908478ec3a9c8aefd9be06344.patch";
+      sha256 = "sha256-2TyQ9zYWZw6bzAfVZzTOQSkfIZnDU8ykgpRAFXscEH0=";
+    })
+  ];
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ openssl zlib ];
+
+  doCheck = true;
+  preCheck = ''
+    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}$PWD
+  '';
+  checkInputs = [ gtest ];
+
+  meta = with lib; {
+    description = "A BitTorrent library written in C++ for *nix, with focus on high performance and good code (jesec's fork)";
+    homepage = "https://github.com/jesec/libtorrent";
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ winterqt ];
+    platforms = platforms.linux;
+  };
+}