diff --git a/pkgs/development/libraries/libtorrent-rasterbar/0.16.nix b/pkgs/development/libraries/libtorrent-rasterbar/0.16.nix new file mode 100644 index 00000000000..6298f2f0c0f --- /dev/null +++ b/pkgs/development/libraries/libtorrent-rasterbar/0.16.nix @@ -0,0 +1,6 @@ +{ callPackage, ... } @ args: + +callPackage ./generic.nix (args // { + version = "0.16.17"; + sha256 = "1w5gcizd6jlvzwgy0307az856h0cly685yf275p1v6bdcafd58b7"; +}) diff --git a/pkgs/development/libraries/libtorrent-rasterbar/default.nix b/pkgs/development/libraries/libtorrent-rasterbar/default.nix index 761fe1d94fb..e1f1fc179d6 100644 --- a/pkgs/development/libraries/libtorrent-rasterbar/default.nix +++ b/pkgs/development/libraries/libtorrent-rasterbar/default.nix @@ -1,26 +1,6 @@ -{ stdenv, fetchurl, boost, openssl, pkgconfig, zlib, python, libiconvOrNull, geoip }: +{ callPackage, ... } @ args: -stdenv.mkDerivation rec { - name = "libtorrent-rasterbar-1.0.2"; - - src = fetchurl { - url = "mirror://sourceforge/libtorrent/${name}.tar.gz"; - sha256 = "1ph4cb6nrk2hiy89j3kz1wj16ph0b9yixrf4f4935rnzhha8x31w"; - }; - - buildInputs = [ boost pkgconfig openssl zlib python libiconvOrNull geoip ]; - - configureFlags = [ - "--enable-python-binding" - "--with-libgeoip=system" - "--with-libiconv=yes" - "--with-boost=${boost.lib}" - ]; - - meta = with stdenv.lib; { - homepage = http://www.rasterbar.com/products/libtorrent/; - description = "A C++ BitTorrent implementation focusing on efficiency and scalability"; - license = licenses.bsd3; - maintainers = [ maintainers.phreedom ]; - }; -} +callPackage ./generic.nix (args // { + version = "1.0.2"; + sha256 = "1ph4cb6nrk2hiy89j3kz1wj16ph0b9yixrf4f4935rnzhha8x31w"; +}) diff --git a/pkgs/development/libraries/libtorrent-rasterbar/generic.nix b/pkgs/development/libraries/libtorrent-rasterbar/generic.nix new file mode 100644 index 00000000000..f47ff1081bc --- /dev/null +++ b/pkgs/development/libraries/libtorrent-rasterbar/generic.nix @@ -0,0 +1,30 @@ +{ stdenv, fetchurl, boost, openssl, pkgconfig, zlib, python, libiconvOrNull, geoip +# Version specific options +, version, sha256 +, ... }: + +stdenv.mkDerivation rec { + name = "libtorrent-rasterbar-${version}"; + + src = fetchurl { + url = "mirror://sourceforge/libtorrent/${name}.tar.gz"; + inherit sha256; + }; + + buildInputs = [ boost pkgconfig openssl zlib python libiconvOrNull geoip ]; + + configureFlags = [ + "--enable-python-binding" + "--with-libgeoip=system" + "--with-libiconv=yes" + "--with-boost=${boost.dev}" + "--with-boost-libdir=${boost.lib}/lib" + ] ++ stdenv.lib.optional (libiconvOrNull != null) "--with-libiconv=yes"; + + meta = with stdenv.lib; { + homepage = http://www.rasterbar.com/products/libtorrent/; + description = "A C++ BitTorrent implementation focusing on efficiency and scalability"; + license = licenses.bsd3; + maintainers = [ maintainers.phreedom ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 75dbaa22a88..5e41450296b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6048,6 +6048,13 @@ let else stdenv; }; + libtorrentRasterbar_0_16 = callPackage ../development/libraries/libtorrent-rasterbar/0.16.nix { + # fix "unrecognized option -arch" error + stdenv = if stdenv.isDarwin + then clangStdenv + else stdenv; + }; + libtoxcore = callPackage ../development/libraries/libtoxcore { }; libtsm = callPackage ../development/libraries/libtsm { };