git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #42409 from Chiiruno/dev/libtorrent

libtorrentRasterbar: fix build, restructure

commit7bf378ce7fecf1c467bf2b49c47376306e795260 authorAndreas Rammhold <andreas@rammhold.de> dateSun 24 Jun 2018, 10:53 (8 years ago) parent49a16a210c4d7d
1 file changed+24−21
pkgs/development/libraries/libtorrent-rasterbar/default.nix+24−21
pkgs/development/libraries/libtorrent-rasterbar/default.nix+24−21
@@ -1,26 +1,33 @@
1−{ stdenv, fetchurl, fetchpatch, automake, autoconf, boost, openssl, lib, libtool, pkgconfig, zlib, python, libiconv, geoip, ... }:
1+{ stdenv, lib, fetchFromGitHub, fetchpatch, pkgconfig, automake, autoconf, zlib
2+, boost, openssl, libtool, python, libiconv, geoip }:
23
3−stdenv.mkDerivation rec {
4− name = "libtorrent-rasterbar-${version}";
4+let
55 version = "1.1.7";
6+ formattedVersion = lib.replaceChars ["."] ["_"] version;
7+in stdenv.mkDerivation {
8+ name = "libtorrent-rasterbar-${version}";
69
7− src =
8− let formattedVersion = lib.replaceChars ["."] ["_"] version;
9− in fetchurl {
10− url = "https://github.com/arvidn/libtorrent/archive/libtorrent-${formattedVersion}.tar.gz";
11− sha256 = "0vbw7wcw8x9787rq5fwaibpvvspm3237l8ahbf20gjpzxhn4yfwc";
12− };
10+ src = fetchFromGitHub {
11+ owner = "arvidn";
12+ repo = "libtorrent";
13+ rev = "libtorrent-${formattedVersion}";
14+ sha256 = "073nb7yca5jg1i8z5h76qrmddl2hdy8fc1pnchkg574087an31r3";
15+ };
1316
14−patches = [
15− (fetchpatch {
16− url = "https://github.com/arvidn/libtorrent/commit/64d6b4900448097b0157abb328621dd211e2947d.patch";
17− sha256 = "0d4h0g129rsgm8xikybxypgv6nnya7ap7kskl7q78p4h6y2a0fhc";
18− })
19−];
17+ patches = [
18+ (fetchpatch {
19+ url = "https://github.com/arvidn/libtorrent/commit/64d6b4900448097b0157abb328621dd211e2947d.patch";
20+ sha256 = "1bdv0icqzbg1il60sckcly4y22lkdbkkwdjadwdzxv7cdj586bzd";
21+ })
22+ (fetchpatch {
23+ url = "https://github.com/arvidn/libtorrent/commit/9cd0ae67e74a507c1b9ff9c057ee97dda38ccb81.patch";
24+ sha256 = "1cscqpc6fq9iwspww930dsxf0yb01bgrghzf5hdhl09a87r6q2zg";
25+ })
26+ ];
2027
28+ enableParallelBuilding = true;
2129 nativeBuildInputs = [ automake autoconf libtool pkgconfig ];
2230 buildInputs = [ boost openssl zlib python libiconv geoip ];
23−
2431 preConfigure = "./autotool.sh";
2532
2633 configureFlags = [
@@ -32,12 +39,8 @@ patches = [
3239 "--with-libiconv=yes"
3340 ];
3441
35− enableParallelBuilding = true;
36−
37− doCheck = false; # fails to link
38−
3942 meta = with stdenv.lib; {
40− homepage = http://www.rasterbar.com/products/libtorrent/;
43+ homepage = "https://libtorrent.org/";
4144 description = "A C++ BitTorrent implementation focusing on efficiency and scalability";
4245 license = licenses.bsd3;
4346 maintainers = [ maintainers.phreedom ];