about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/libtorrent-rasterbar
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2020-04-27 21:04:56 +0000
committerAlyssa Ross <hi@alyssa.is>2020-04-27 21:04:56 +0000
commita4e6c7d26af697f4346cacb7ab18dcd7fcfc056e (patch)
tree47950e79183035018882419c4eff5047d1537b99 /nixpkgs/pkgs/development/libraries/libtorrent-rasterbar
parent5b00523fb58512232b819a301c4309f579c7f09c (diff)
parent22a3bf9fb9edad917fb6cd1066d58b5e426ee975 (diff)
downloadnixlib-a4e6c7d26af697f4346cacb7ab18dcd7fcfc056e.tar
nixlib-a4e6c7d26af697f4346cacb7ab18dcd7fcfc056e.tar.gz
nixlib-a4e6c7d26af697f4346cacb7ab18dcd7fcfc056e.tar.bz2
nixlib-a4e6c7d26af697f4346cacb7ab18dcd7fcfc056e.tar.lz
nixlib-a4e6c7d26af697f4346cacb7ab18dcd7fcfc056e.tar.xz
nixlib-a4e6c7d26af697f4346cacb7ab18dcd7fcfc056e.tar.zst
nixlib-a4e6c7d26af697f4346cacb7ab18dcd7fcfc056e.zip
Merge commit '22a3bf9fb9edad917fb6cd1066d58b5e426ee975'
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/libtorrent-rasterbar')
-rw-r--r--nixpkgs/pkgs/development/libraries/libtorrent-rasterbar/1.1/default.nix (renamed from nixpkgs/pkgs/development/libraries/libtorrent-rasterbar/default.nix)6
-rw-r--r--nixpkgs/pkgs/development/libraries/libtorrent-rasterbar/1.2/default.nix50
2 files changed, 52 insertions, 4 deletions
diff --git a/nixpkgs/pkgs/development/libraries/libtorrent-rasterbar/default.nix b/nixpkgs/pkgs/development/libraries/libtorrent-rasterbar/1.1/default.nix
index 26605eb41dbd..b2c958795f3e 100644
--- a/nixpkgs/pkgs/development/libraries/libtorrent-rasterbar/default.nix
+++ b/nixpkgs/pkgs/development/libraries/libtorrent-rasterbar/1.1/default.nix
@@ -1,5 +1,5 @@
 { stdenv, lib, fetchFromGitHub, pkgconfig, automake, autoconf
-, zlib, boost, openssl, libtool, python, libiconv, geoip, ncurses
+, zlib, boost, openssl, libtool, python, libiconv, ncurses
 }:
 
 let
@@ -23,7 +23,7 @@ in stdenv.mkDerivation {
 
   enableParallelBuilding = true;
   nativeBuildInputs = [ automake autoconf libtool pkgconfig ];
-  buildInputs = [ boostPython openssl zlib python libiconv geoip ncurses ];
+  buildInputs = [ boostPython openssl zlib python libiconv ncurses ];
   preConfigure = "./autotool.sh";
 
   postInstall = ''
@@ -35,11 +35,9 @@ in stdenv.mkDerivation {
 
   configureFlags = [
     "--enable-python-binding"
-    "--with-libgeoip=system"
     "--with-libiconv=yes"
     "--with-boost=${boostPython.dev}"
     "--with-boost-libdir=${boostPython.out}/lib"
-    "--with-libiconv=yes"
   ];
 
   meta = with stdenv.lib; {
diff --git a/nixpkgs/pkgs/development/libraries/libtorrent-rasterbar/1.2/default.nix b/nixpkgs/pkgs/development/libraries/libtorrent-rasterbar/1.2/default.nix
new file mode 100644
index 000000000000..8b9992ec66d4
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libtorrent-rasterbar/1.2/default.nix
@@ -0,0 +1,50 @@
+{ stdenv, lib, fetchFromGitHub, pkgconfig, automake, autoconf
+, zlib, boost, openssl, libtool, python, libiconv, ncurses
+}:
+
+let
+  version = "1.2.5";
+  formattedVersion = lib.replaceChars ["."] ["_"] version;
+
+  # Make sure we override python, so the correct version is chosen
+  # for the bindings, if overridden
+  boostPython = boost.override { enablePython = true; inherit python; };
+
+in stdenv.mkDerivation {
+  pname = "libtorrent-rasterbar";
+  inherit version;
+
+  src = fetchFromGitHub {
+    owner = "arvidn";
+    repo = "libtorrent";
+    rev = "libtorrent-${formattedVersion}";
+    sha256 = "0y2fzqbvb1bxvf93d7sphwzxih6j40p5p3fay943k26w0nrq802w";
+  };
+
+  enableParallelBuilding = true;
+  nativeBuildInputs = [ automake autoconf libtool pkgconfig ];
+  buildInputs = [ boostPython openssl zlib python libiconv ncurses ];
+  preConfigure = "./autotool.sh";
+
+  postInstall = ''
+    moveToOutput "include" "$dev"
+    moveToOutput "lib/${python.libPrefix}" "$python"
+  '';
+
+  outputs = [ "out" "dev" "python" ];
+
+  configureFlags = [
+    "--enable-python-binding"
+    "--with-libiconv=yes"
+    "--with-boost=${boostPython.dev}"
+    "--with-boost-libdir=${boostPython.out}/lib"
+  ];
+
+  meta = with stdenv.lib; {
+    homepage = "https://libtorrent.org/";
+    description = "A C++ BitTorrent implementation focusing on efficiency and scalability";
+    license = licenses.bsd3;
+    maintainers = [ maintainers.phreedom ];
+    platforms = platforms.unix;
+  };
+}