diff options
Diffstat (limited to 'nixpkgs/pkgs/applications/networking/p2p')
28 files changed, 1403 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/applications/networking/p2p/deluge/default.nix b/nixpkgs/pkgs/applications/networking/p2p/deluge/default.nix new file mode 100644 index 000000000000..f58f7e04e00b --- /dev/null +++ b/nixpkgs/pkgs/applications/networking/p2p/deluge/default.nix @@ -0,0 +1,41 @@ +{ stdenv, fetchurl, fetchpatch, intltool, libtorrentRasterbar, pythonPackages }: + +pythonPackages.buildPythonPackage rec { + name = "deluge-${version}"; + version = "1.3.15"; + + src = fetchurl { + url = "http://download.deluge-torrent.org/source/${name}.tar.bz2"; + sha256 = "1467b9hmgw59gf398mhbf40ggaka948yz3afh6022v753c9j7y6w"; + }; + + patches = [ + # Fix preferences when built against libtorrent >=0.16 + (fetchpatch { + url = "https://git.deluge-torrent.org/deluge/patch/?id=38d7b7cdfde3c50d6263602ffb03af92fcbfa52e"; + sha256 = "0la3i0lkj6yv4725h4kbd07mhfwcb34w7prjl9gxg12q7px6c31d"; + }) + ]; + + propagatedBuildInputs = with pythonPackages; [ + pyGtkGlade twisted Mako chardet pyxdg pyopenssl service-identity + libtorrentRasterbar.dev libtorrentRasterbar.python + ]; + + nativeBuildInputs = [ intltool ]; + + postInstall = '' + mkdir -p $out/share/applications + cp -R deluge/data/pixmaps $out/share/ + cp -R deluge/data/icons $out/share/ + cp deluge/data/share/applications/deluge.desktop $out/share/applications + ''; + + meta = with stdenv.lib; { + homepage = https://deluge-torrent.org; + description = "Torrent client"; + license = licenses.gpl3Plus; + maintainers = with maintainers; [ domenkozar ebzzry ]; + platforms = platforms.all; + }; +} diff --git a/nixpkgs/pkgs/applications/networking/p2p/eiskaltdcpp/default.nix b/nixpkgs/pkgs/applications/networking/p2p/eiskaltdcpp/default.nix new file mode 100644 index 000000000000..db30da82bdb2 --- /dev/null +++ b/nixpkgs/pkgs/applications/networking/p2p/eiskaltdcpp/default.nix @@ -0,0 +1,65 @@ +{ stdenv, fetchFromGitHub, cmake, pkgconfig, qt4, boost, bzip2, libX11 +, fetchpatch, libiconv, pcre-cpp, libidn, lua5, miniupnpc, aspell, gettext }: + +stdenv.mkDerivation rec { + name = "eiskaltdcpp-${version}"; + version = "2.2.10"; + + src = fetchFromGitHub { + owner = "eiskaltdcpp"; + repo = "eiskaltdcpp"; + rev = "v${version}"; + sha256 = "1mqz0g69njmlghcra3izarjxbxi1jrhiwn4ww94b8jv8xb9cv682"; + }; + + nativeBuildInputs = [ cmake pkgconfig ]; + buildInputs = [ qt4 boost bzip2 libX11 pcre-cpp libidn lua5 miniupnpc aspell gettext ] + ++ stdenv.lib.optional stdenv.isDarwin libiconv; + + patches = [ + (fetchpatch { + url = "https://github.com/eiskaltdcpp/eiskaltdcpp/commit/3b7b56bd7060b426b1f1bfded392ae6853644e2e.patch"; + sha256 = "1rqjdsvirn3ks9w9qn893fb73mz84xm04wl13fvsvj8p42i5cjas"; + }) + (fetchpatch { + url = "https://github.com/eiskaltdcpp/eiskaltdcpp/commit/bb9eb364a943fe2a67b3ea52ec6a3f9e911f07dc.patch"; + sha256 = "1hjhf9a9j4z8v24g5qh5mcg3n0540lbn85y7kvxsh3khc5v3cywx"; + }) + (fetchpatch { + url = "https://github.com/eiskaltdcpp/eiskaltdcpp/commit/ef4426f1f9a8255e335b0862234e6cc28befef5e.patch"; + sha256 = "13j018c499n4b5as2n39ws64yj0cf4fskxbqab309vmnjkirxv6x"; + }) + (fetchpatch { + url = "https://github.com/eiskaltdcpp/eiskaltdcpp/commit/a9c136c8707280d0eeb66be6b289d9718287c55c.patch"; + sha256 = "0w8v4mbrzk7pmzc475ff96mzzwlh8a0p62kk7p829m5yqdwj4sc9"; + }) + (fetchpatch { + url = "https://github.com/eiskaltdcpp/eiskaltdcpp/commit/3b9c502ff5c98856d4f8fdb7ed3c6ef34448bfb7.patch"; + sha256 = "0fjwaq0wd9a164k5ysdjy89hx0ixnxc6q7cvyn1ba28snm0pgxb8"; + }) + ]; + + cmakeFlags = '' + -DUSE_ASPELL=ON + -DUSE_QT_QML=ON + -DFREE_SPACE_BAR_C=ON + -DUSE_MINIUPNP=ON + -DLOCAL_MINIUPNP=ON + -DDBUS_NOTIFY=ON + -DUSE_JS=ON + -DPERL_REGEX=ON + -DUSE_CLI_XMLRPC=ON + -DWITH_SOUNDS=ON + -DLUA_SCRIPT=ON + -DWITH_LUASCRIPTS=ON + ''; + + enableParallelBuilding = true; + + meta = with stdenv.lib; { + description = "A cross-platform program that uses the Direct Connect and ADC protocols"; + homepage = https://github.com/eiskaltdcpp/eiskaltdcpp; + license = licenses.gpl3Plus; + platforms = platforms.linux; + }; +} diff --git a/nixpkgs/pkgs/applications/networking/p2p/firestr/default.nix b/nixpkgs/pkgs/applications/networking/p2p/firestr/default.nix new file mode 100644 index 000000000000..56eb9c354275 --- /dev/null +++ b/nixpkgs/pkgs/applications/networking/p2p/firestr/default.nix @@ -0,0 +1,36 @@ +{ stdenv, fetchFromGitHub, cmake, boost, botan, snappy, libopus, libuuid +, libXScrnSaver, openssl, qtbase, qtmultimedia }: + +stdenv.mkDerivation { + name = "firestr-0.8"; + + src = fetchFromGitHub { + owner = "mempko"; + repo = "firestr"; + rev = "f888890f71d49953d05bccdd27a1c4f6690e165c"; + sha256 = "0s2kdi8rw3i3f8gbiy0ykyi6xj5n8p80m0d1i86mhh8jpagvbfzb"; + }; + + buildInputs = [ cmake boost botan snappy libopus libuuid qtbase qtmultimedia + libXScrnSaver openssl ]; + + patches = ./return.patch; + + postPatch = '' + substituteInPlace CMakeLists.txt \ + --replace "set(Boost_USE_STATIC_LIBS on)" "" \ + --replace "/usr/include/botan" "${botan}/include/botan" \ + --replace "libopus.a" "libopus.so" \ + --replace "libsnappy.a" "libsnappy.so" \ + --replace "libbotan-1.10.a" "libbotan-1.10.so.0" + ''; + + meta = with stdenv.lib; { + description = "Grass computing platform"; + homepage = http://firestr.com/; + license = licenses.gpl3; + maintainers = [ maintainers.ehmry ]; + platforms = platforms.linux; + broken = true; + }; +} diff --git a/nixpkgs/pkgs/applications/networking/p2p/firestr/return.patch b/nixpkgs/pkgs/applications/networking/p2p/firestr/return.patch new file mode 100644 index 000000000000..c3e469ae92b0 --- /dev/null +++ b/nixpkgs/pkgs/applications/networking/p2p/firestr/return.patch @@ -0,0 +1,13 @@ +diff --git a/src/message/master_post.cpp b/src/message/master_post.cpp +index c3a5ea9..7c821b9 100644 +--- a/src/message/master_post.cpp ++++ b/src/message/master_post.cpp +@@ -56,7 +56,7 @@ namespace fire + + metadata::encryption_type to_message_encryption_type(sc::encryption_type s) + { +- metadata::encryption_type r; ++ metadata::encryption_type r = metadata::encryption_type::asymmetric; + switch(s) + { + case sc::encryption_type::plaintext: r = metadata::encryption_type::plaintext; break; diff --git a/nixpkgs/pkgs/applications/networking/p2p/freenet/default.nix b/nixpkgs/pkgs/applications/networking/p2p/freenet/default.nix new file mode 100644 index 000000000000..d674c70e4c2f --- /dev/null +++ b/nixpkgs/pkgs/applications/networking/p2p/freenet/default.nix @@ -0,0 +1,79 @@ +{ stdenv, fetchurl, fetchFromGitHub, ant, jdk, bash, coreutils, substituteAll }: + +let + freenet_ext = fetchurl { + url = https://downloads.freenetproject.org/latest/freenet-ext.jar; + sha256 = "17ypljdvazgx2z6hhswny1lxfrknysz3x6igx8vl3xgdpvbb7wij"; + }; + + bcprov_version = "jdk15on-154"; + bcprov = fetchurl { + url = "https://www.bouncycastle.org/download/bcprov-ext-${bcprov_version}.jar"; + sha256 = "0abmhg2h44g8c5p7skzqwfxj8xwcjh9vs84mc0hr78k1am0633jk"; + }; + seednodes = fetchurl { + url = https://downloads.freenetproject.org/alpha/opennet/seednodes.fref; + sha256 = "08awwr8n80b4cdzzb3y8hf2fzkr1f2ly4nlq779d6pvi5jymqdvv"; + }; + version = "build01475"; + + freenet-jars = stdenv.mkDerivation { + name = "freenet-jars-${version}"; + + src = fetchFromGitHub { + owner = "freenet"; + repo = "fred"; + rev = version; + sha256 = "0k02fna9x219j7dhginbnf27i36bibb0rmm4qdwr5xm28hy1nd08"; + }; + + patchPhase = '' + cp ${freenet_ext} lib/freenet/freenet-ext.jar + cp ${bcprov} lib/bcprov-${bcprov_version}.jar + + sed '/antcall.*-ext/d' -i build.xml + sed 's/@unknown@/${version}/g' -i build-clean.xml + ''; + + buildInputs = [ ant jdk ]; + + buildPhase = "ant package-only"; + + installPhase = '' + mkdir -p $out/share/freenet + cp lib/bcprov-${bcprov_version}.jar $out/share/freenet + cp lib/freenet/freenet-ext.jar $out/share/freenet + cp dist/freenet.jar $out/share/freenet + ''; + }; + +in stdenv.mkDerivation { + name = "freenet-${version}"; + inherit version; + + src = substituteAll { + src = ./freenetWrapper; + inherit bash coreutils seednodes bcprov_version; + freenet = freenet-jars; + jre = jdk.jre; + }; + + jars = freenet-jars; + + phases = [ "installPhase" ]; + + installPhase = '' + mkdir -p $out/bin + cp $src $out/bin/freenet + chmod +x $out/bin/freenet + ln -s ${freenet-jars}/share $out/share + ''; + + meta = { + description = "Decentralised and censorship-resistant network"; + homepage = https://freenetproject.org/; + license = stdenv.lib.licenses.gpl2Plus; + maintainers = [ stdenv.lib.maintainers.doublec ]; + platforms = with stdenv.lib.platforms; linux; + }; +} diff --git a/nixpkgs/pkgs/applications/networking/p2p/freenet/freenetWrapper b/nixpkgs/pkgs/applications/networking/p2p/freenet/freenetWrapper new file mode 100755 index 000000000000..f3106265801f --- /dev/null +++ b/nixpkgs/pkgs/applications/networking/p2p/freenet/freenetWrapper @@ -0,0 +1,18 @@ +#! @bash@/bin/bash + +PATH=@coreutils@/bin:$PATH + +export FREENET_HOME="$HOME/.local/share/freenet" +if [ -n "$XDG_DATA_HOME" ] + then export FREENET_HOME="$XDG_DATA_HOME/freenet" +fi + +if [ ! -d $FREENET_HOME ]; then + mkdir -p $FREENET_HOME +fi + +cp -u @seednodes@ $FREENET_HOME/seednodes.fref +chmod u+rw $FREENET_HOME/seednodes.fref + +cd $FREENET_HOME +@jre@/bin/java -cp @freenet@/share/freenet/bcprov-@bcprov_version@.jar:@freenet@/share/freenet/freenet-ext.jar:@freenet@/share/freenet/freenet.jar -Xmx1024M freenet.node.NodeStarter diff --git a/nixpkgs/pkgs/applications/networking/p2p/frostwire/default.nix b/nixpkgs/pkgs/applications/networking/p2p/frostwire/default.nix new file mode 100644 index 000000000000..40ff91e792b4 --- /dev/null +++ b/nixpkgs/pkgs/applications/networking/p2p/frostwire/default.nix @@ -0,0 +1,94 @@ +{ stdenv, fetchFromGitHub, gradle, perl, jre, makeWrapper, makeDesktopItem, mplayer }: + +let + version = "6.6.7-build-529"; + name = "frostwire-desktop-${version}"; + + src = fetchFromGitHub { + owner = "frostwire"; + repo = "frostwire"; + rev = name; + sha256 = "03wdj2kr8akzx8m1scvg98132zbaxh81qjdsxn2645b3gahjwz0m"; + }; + + desktopItem = makeDesktopItem { + name = "frostwire"; + desktopName = "FrostWire"; + genericName = "P2P Bittorrent client"; + exec = "frostwire"; + icon = "frostwire"; + comment = "Search and explore all kinds of files on the Bittorrent network"; + categories = "Network;FileTransfer;P2P;"; + }; + + # fake build to pre-download deps into fixed-output derivation + deps = stdenv.mkDerivation { + name = "${name}-deps"; + inherit src; + buildInputs = [ gradle perl ]; + buildPhase = '' + export GRADLE_USER_HOME=$(mktemp -d) + ( cd desktop + gradle --no-daemon build + ) + ''; + # perl code mavenizes pathes (com.squareup.okio/okio/1.13.0/a9283170b7305c8d92d25aff02a6ab7e45d06cbe/okio-1.13.0.jar -> com/squareup/okio/okio/1.13.0/okio-1.13.0.jar) + installPhase = '' + find $GRADLE_USER_HOME -type f -regex '.*\.\(jar\|pom\)' \ + | perl -pe 's#(.*/([^/]+)/([^/]+)/([^/]+)/[0-9a-f]{30,40}/([^/\s]+))$# ($x = $2) =~ tr|\.|/|; "install -Dm444 $1 \$out/$x/$3/$4/$5" #e' \ + | sh + ''; + outputHashAlgo = "sha256"; + outputHashMode = "recursive"; + outputHash = "11zd98g0d0fdgls4lsskkagwfxyh26spfd6c6g9cahl89czvlg3c"; + }; + +in stdenv.mkDerivation { + inherit name src; + + nativeBuildInputs = [ makeWrapper ]; + buildInputs = [ gradle ]; + + buildPhase = '' + export GRADLE_USER_HOME=$(mktemp -d) + ( cd desktop + + # disable auto-update (anyway it won't update frostwire installed in nix store) + substituteInPlace src/com/frostwire/gui/updates/UpdateManager.java \ + --replace 'um.checkForUpdates' '// um.checkForUpdates' + + # fix path to mplayer + substituteInPlace src/com/frostwire/gui/player/MediaPlayerLinux.java \ + --replace /usr/bin/mplayer ${mplayer}/bin/mplayer + + substituteInPlace build.gradle \ + --replace 'mavenCentral()' 'mavenLocal(); maven { url uri("${deps}") }' + gradle --offline --no-daemon build + ) + ''; + + installPhase = '' + mkdir -p $out/lib $out/share/java + + cp desktop/build/libs/frostwire.jar $out/share/java/frostwire.jar + + cp ${ { x86_64-darwin = "desktop/lib/native/*.dylib"; + x86_64-linux = "desktop/lib/native/lib{jlibtorrent,SystemUtilities}.so"; + i686-linux = "desktop/lib/native/lib{jlibtorrent,SystemUtilities}X86.so"; + }.${stdenv.hostPlatform.system} or (throw "unsupported system ${stdenv.hostPlatform.system}") + } $out/lib + + cp -dpR ${desktopItem}/share $out + + makeWrapper ${jre}/bin/java $out/bin/frostwire \ + --add-flags "-Djava.library.path=$out/lib -jar $out/share/java/frostwire.jar" + ''; + + meta = with stdenv.lib; { + homepage = http://www.frostwire.com/; + description = "BitTorrent Client and Cloud File Downloader"; + license = licenses.gpl2; + maintainers = with maintainers; [ gavin ]; + platforms = [ "x86_64-darwin" "x86_64-linux" "i686-linux" ]; + }; +} diff --git a/nixpkgs/pkgs/applications/networking/p2p/frostwire/frostwire-bin.nix b/nixpkgs/pkgs/applications/networking/p2p/frostwire/frostwire-bin.nix new file mode 100644 index 000000000000..1d98bf776755 --- /dev/null +++ b/nixpkgs/pkgs/applications/networking/p2p/frostwire/frostwire-bin.nix @@ -0,0 +1,31 @@ +{ stdenv, fetchurl, jre, makeWrapper }: + +with stdenv.lib; + +stdenv.mkDerivation rec { + version = "6.7.4"; + name = "frostwire-${version}"; + + src = fetchurl { + url = "https://dl.frostwire.com/frostwire/${version}/frostwire-${version}.noarch.tar.gz"; + sha256 = "03vxg0qas4mz5ggrmi396nkz44x1kgq8bfbhbr9mnal9ay9qmi8m"; + }; + + nativeBuildInputs = [ makeWrapper ]; + + installPhase = '' + mkdir -p $out/share/java + mv $(ls */*.jar) $out/share/java + + makeWrapper $out/share/java/frostwire $out/bin/frostwire \ + --prefix PATH : ${jre}/bin/ + ''; + + meta = with stdenv.lib; { + homepage = https://www.frostwire.com/; + description = "BitTorrent Client and Cloud File Downloader"; + license = licenses.gpl2; + maintainers = with maintainers; [ gavin ]; + platforms = platforms.all; + }; +} diff --git a/nixpkgs/pkgs/applications/networking/p2p/gnunet/default.nix b/nixpkgs/pkgs/applications/networking/p2p/gnunet/default.nix new file mode 100644 index 000000000000..715d8e13ec30 --- /dev/null +++ b/nixpkgs/pkgs/applications/networking/p2p/gnunet/default.nix @@ -0,0 +1,78 @@ +{ stdenv, fetchurl, adns, curl, gettext, gmp, gnutls, libextractor +, libgcrypt, libgnurl, libidn, libmicrohttpd, libtool, libunistring +, makeWrapper, ncurses, pkgconfig, libxml2, sqlite, zlib +, libpulseaudio, libopus, libogg }: + +stdenv.mkDerivation rec { + name = "gnunet-0.11.0"; + + src = fetchurl { + url = "mirror://gnu/gnunet/${name}.tar.gz"; + sha256 = "16kydkrjlf2vxflgls46bwaf9kjczf621p456q0qlphd7cy7lixp"; + }; + + buildInputs = [ + adns curl gettext gmp gnutls libextractor libgcrypt libgnurl libidn + libmicrohttpd libtool libunistring libxml2 makeWrapper ncurses + pkgconfig sqlite zlib libpulseaudio libopus libogg + ]; + + preConfigure = '' + # Brute force: since nix-worker chroots don't provide + # /etc/{resolv.conf,hosts}, replace all references to `localhost' + # by their IPv4 equivalent. + find . \( -name \*.c -or -name \*.conf \) | \ + xargs sed -ie 's|\<localhost\>|127.0.0.1|g' + + # Make sure the tests don't rely on `/tmp', for the sake of chroot + # builds. + find . \( -iname \*test\*.c -or -name \*.conf \) | \ + xargs sed -ie "s|/tmp|$TMPDIR|g" + + # Ensure NSS installation works fine + configureFlags="$configureFlags --with-nssdir=$out/lib" + patchShebangs src/gns/nss/install-nss-plugin.sh + + sed -ie 's|@LDFLAGS@|@LDFLAGS@ $(Z_LIBS)|g' \ + src/regex/Makefile.in \ + src/fs/Makefile.in + ''; + + doCheck = false; + + /* FIXME: Tests must be run this way, but there are still a couple of + failures. + + postInstall = + '' export GNUNET_PREFIX="$out" + export PATH="$out/bin:$PATH" + make -k check + ''; + */ + + meta = with stdenv.lib; { + description = "GNU's decentralized anonymous and censorship-resistant P2P framework"; + + longDescription = '' + GNUnet is a framework for secure peer-to-peer networking that + does not use any centralized or otherwise trusted services. A + first service implemented on top of the networking layer + allows anonymous censorship-resistant file-sharing. Anonymity + is provided by making messages originating from a peer + indistinguishable from messages that the peer is routing. All + peers act as routers and use link-encrypted connections with + stable bandwidth utilization to communicate with each other. + GNUnet uses a simple, excess-based economic model to allocate + resources. Peers in GNUnet monitor each others behavior with + respect to resource usage; peers that contribute to the + network are rewarded with better service. + ''; + + homepage = https://gnunet.org/; + + license = licenses.gpl2Plus; + + maintainers = with maintainers; [ vrthra ]; + platforms = platforms.gnu ++ platforms.linux; + }; +} diff --git a/nixpkgs/pkgs/applications/networking/p2p/gnunet/git.nix b/nixpkgs/pkgs/applications/networking/p2p/gnunet/git.nix new file mode 100644 index 000000000000..9428b2764585 --- /dev/null +++ b/nixpkgs/pkgs/applications/networking/p2p/gnunet/git.nix @@ -0,0 +1,92 @@ +{ stdenv, fetchgit, libextractor, libmicrohttpd, libgcrypt +, zlib, gmp, curl, libtool, adns, sqlite, pkgconfig +, libxml2, ncurses, gettext, libunistring, libidn +, makeWrapper, autoconf, automake, texinfo, which +, withVerbose ? false }: + +let + rev = "ce2864cfaa27e55096b480bf35db5f8cee2a5e7e"; +in +stdenv.mkDerivation rec { + name = "gnunet-git-${rev}"; + + src = fetchgit { + url = https://gnunet.org/git/gnunet.git; + inherit rev; + sha256 = "0gbw920m9v4b3425c0d1h7drgl2m1fni1bwjn4fwqnyz7kdqzsgl"; + }; + + buildInputs = [ + libextractor libmicrohttpd libgcrypt gmp curl libtool + zlib adns sqlite libxml2 ncurses libidn + pkgconfig gettext libunistring makeWrapper + autoconf automake texinfo which + ]; + + configureFlags = stdenv.lib.optional withVerbose "--enable-logging=verbose "; + + preConfigure = '' + # Brute force: since nix-worker chroots don't provide + # /etc/{resolv.conf,hosts}, replace all references to `localhost' + # by their IPv4 equivalent. + for i in $(find . \( -name \*.c -or -name \*.conf \) \ + -exec grep -l '\<localhost\>' {} \;) + do + echo "$i: substituting \`127.0.0.1' to \`localhost'..." + sed -i "$i" -e's/\<localhost\>/127.0.0.1/g' + done + + # Make sure the tests don't rely on `/tmp', for the sake of chroot + # builds. + for i in $(find . \( -iname \*test\*.c -or -name \*.conf \) \ + -exec grep -l /tmp {} \;) + do + echo "$i: replacing references to \`/tmp' by \`$TMPDIR'..." + substituteInPlace "$i" --replace "/tmp" "$TMPDIR" + done + + # Ensure NSS installation works fine + configureFlags="$configureFlags --with-nssdir=$out/lib" + + sh contrib/pogen.sh + sh bootstrap + ''; + + doCheck = false; + + /* FIXME: Tests must be run this way, but there are still a couple of + failures. + + postInstall = + '' export GNUNET_PREFIX="$out" + export PATH="$out/bin:$PATH" + make -k check + ''; + */ + + meta = { + description = "GNUnet, GNU's decentralized anonymous and censorship-resistant P2P framework"; + + longDescription = '' + GNUnet is a framework for secure peer-to-peer networking that + does not use any centralized or otherwise trusted services. A + first service implemented on top of the networking layer + allows anonymous censorship-resistant file-sharing. Anonymity + is provided by making messages originating from a peer + indistinguishable from messages that the peer is routing. All + peers act as routers and use link-encrypted connections with + stable bandwidth utilization to communicate with each other. + GNUnet uses a simple, excess-based economic model to allocate + resources. Peers in GNUnet monitor each others behavior with + respect to resource usage; peers that contribute to the + network are rewarded with better service. + ''; + + homepage = https://gnunet.org/; + + license = stdenv.lib.licenses.gpl2Plus; + + maintainers = with stdenv.lib.maintainers; [ ]; + platforms = stdenv.lib.platforms.gnu ++ stdenv.lib.platforms.linux; + }; +} diff --git a/nixpkgs/pkgs/applications/networking/p2p/ktorrent/default.nix b/nixpkgs/pkgs/applications/networking/p2p/ktorrent/default.nix new file mode 100644 index 000000000000..c66c3ca05a4e --- /dev/null +++ b/nixpkgs/pkgs/applications/networking/p2p/ktorrent/default.nix @@ -0,0 +1,52 @@ +{ stdenv, fetchurl, fetchpatch, cmake +, extra-cmake-modules, qtbase, qtscript +, karchive, kcrash, kdnssd, ki18n, kio, knotifications, knotifyconfig +, kdoctools, kross, kcmutils, kwindowsystem +, libktorrent, taglib, libgcrypt, kplotting +}: + +stdenv.mkDerivation rec { + name = "ktorrent-${version}"; + version = "${libktorrent.mainVersion}.0"; + + src = fetchurl { + url = "mirror://kde/stable/ktorrent/${libktorrent.mainVersion}/${name}.tar.xz"; + sha256 = "18w6qh09k84qpzaxxb76a4g59k4mx5wk897vqp1wwv80g0pqhmrw"; + }; + + nativeBuildInputs = [ cmake kdoctools extra-cmake-modules ]; + + buildInputs = [ + qtbase qtscript + karchive kcrash kdnssd ki18n kio knotifications knotifyconfig kross kcmutils kwindowsystem + libktorrent taglib libgcrypt kplotting + ]; + + patches = [ + # Fix build with CMake 3.11 + (fetchpatch { + url = "https://cgit.kde.org/ktorrent.git/patch/?id=672c5076de7e3a526d9bdbb484a69e9386bc49f8"; + sha256 = "1cn4rnbhadrsxqx50fawpd747azskavbjraygr6s11rh1wbfrxid"; + }) + + # Fix build against Qt 5.11 + (fetchpatch { + url = "https://cgit.kde.org/ktorrent.git/patch/?id=7876857d204188016a135a25938d9f8530fba4e8"; + sha256 = "1wnmfzkhf6y7fd0z2djwphs6i9lsg7fcrj8fqmbyi0j57dvl9gxl"; + }) + (fetchpatch { + url = "https://cgit.kde.org/ktorrent.git/patch/?id=36d112e56e56541d439326a267eb906da8b3ee60"; + sha256 = "1d41pqniljhwqs6awa644s6ks0zwm9sr0hpfygc63wyxnpcrsw2y"; + }) + ]; + + enableParallelBuilding = true; + + meta = with stdenv.lib; { + description = "KDE integrated BtTorrent client"; + homepage = https://www.kde.org/applications/internet/ktorrent/; + license = licenses.gpl2; + maintainers = with maintainers; [ eelco ]; + platforms = platforms.linux; + }; +} diff --git a/nixpkgs/pkgs/applications/networking/p2p/mldonkey/default.nix b/nixpkgs/pkgs/applications/networking/p2p/mldonkey/default.nix new file mode 100644 index 000000000000..629e748fcacf --- /dev/null +++ b/nixpkgs/pkgs/applications/networking/p2p/mldonkey/default.nix @@ -0,0 +1,37 @@ +{ stdenv, fetchurl, ocamlPackages, zlib, bzip2, ncurses, file, gd, libpng, libjpeg }: + +stdenv.mkDerivation (rec { + name = "mldonkey-3.1.6"; + + src = fetchurl { + url = https://github.com/ygrek/mldonkey/releases/download/release-3-1-6/mldonkey-3.1.6.tar.bz2; + sha256 = "0g84islkj72ymp0zzppcj9n4r21h0vlghnq87hv2wg580mybadhv"; + }; + + preConfigure = stdenv.lib.optionalString (ocamlPackages.camlp4 != null) '' + substituteInPlace Makefile --replace '+camlp4' \ + '${ocamlPackages.camlp4}/lib/ocaml/${ocamlPackages.ocaml.version}/site-lib/camlp4' + ''; + + buildInputs = [ zlib ncurses bzip2 file gd libpng libjpeg ] ++ + (with ocamlPackages; [ ocaml camlp4 ]); + configureFlags = [ "--disable-gui" ]; + + meta = { + description = "Client for many p2p networks, with multiple frontends"; + homepage = http://mldonkey.sourceforge.net/; + license = stdenv.lib.licenses.gpl2; + platforms = stdenv.lib.platforms.unix; + }; +} // (if !ocamlPackages.ocaml.nativeCompilers then +{ + # Byte code compilation (the ocaml opt compiler is not supported in some platforms) + buildPhase = "make mlnet.byte"; + installPhase = '' + mkdir -p $out/bin + cp mlnet.byte $out/bin/mlnet + ''; + + # ocaml bytecode selfcontained binaries loose the bytecode if stripped + dontStrip = true; +} else {})) diff --git a/nixpkgs/pkgs/applications/networking/p2p/ncdc/default.nix b/nixpkgs/pkgs/applications/networking/p2p/ncdc/default.nix new file mode 100644 index 000000000000..7f229be1b543 --- /dev/null +++ b/nixpkgs/pkgs/applications/networking/p2p/ncdc/default.nix @@ -0,0 +1,22 @@ +{ stdenv, fetchurl, ncurses, zlib, bzip2, sqlite, pkgconfig, glib, gnutls }: + +stdenv.mkDerivation rec { + name = "ncdc-${version}"; + version = "1.22.1"; + + src = fetchurl { + url = "https://dev.yorhel.nl/download/ncdc-${version}.tar.gz"; + sha256 = "1bdgqd07f026qk6vpbxqsin536znd33931m3b4z44prlm9wd6pyi"; + }; + + nativeBuildInputs = [ pkgconfig ]; + buildInputs = [ ncurses zlib bzip2 sqlite glib gnutls ]; + + meta = with stdenv.lib; { + description = "Modern and lightweight direct connect client with a friendly ncurses interface"; + homepage = https://dev.yorhel.nl/ncdc; + license = licenses.mit; + platforms = platforms.linux; # arbitrary + maintainers = with maintainers; [ ehmry ]; + }; +} diff --git a/nixpkgs/pkgs/applications/networking/p2p/opentracker/default.nix b/nixpkgs/pkgs/applications/networking/p2p/opentracker/default.nix new file mode 100644 index 000000000000..46c482818f8b --- /dev/null +++ b/nixpkgs/pkgs/applications/networking/p2p/opentracker/default.nix @@ -0,0 +1,28 @@ +{ stdenv, fetchgit, libowfat, zlib }: + +stdenv.mkDerivation { + name = "opentracker-2018-05-26"; + + src = fetchgit { + url = "https://erdgeist.org/gitweb/opentracker"; + rev = "6411f1567f64248b0d145493c2e61004d2822623"; + sha256 = "110nfb6n4clykwdzpk54iccsfjawq0krjfqhg114i1z0ri5dyl8j"; + }; + + buildInputs = [ libowfat zlib ]; + + installPhase = '' + runHook preInstall + install -D opentracker $out/bin/opentracker + install -D opentracker.conf.sample $out/share/doc/opentracker.conf.sample + runHook postInstall + ''; + + meta = with stdenv.lib; { + homepage = https://erdgeist.org/arts/software/opentracker/; + license = licenses.beerware; + platforms = platforms.linux; + description = "Bittorrent tracker project which aims for minimal resource usage and is intended to run at your wlan router."; + maintainers = with maintainers; [ makefu ]; + }; +} diff --git a/nixpkgs/pkgs/applications/networking/p2p/qbittorrent/default.nix b/nixpkgs/pkgs/applications/networking/p2p/qbittorrent/default.nix new file mode 100644 index 000000000000..9696c55bd865 --- /dev/null +++ b/nixpkgs/pkgs/applications/networking/p2p/qbittorrent/default.nix @@ -0,0 +1,47 @@ +{ stdenv, fetchFromGitHub, pkgconfig +, boost, libtorrentRasterbar, qtbase, qttools, qtsvg +, debugSupport ? false # Debugging +, guiSupport ? true, dbus ? null # GUI (disable to run headless) +, webuiSupport ? true # WebUI +}: + +assert guiSupport -> (dbus != null); +with stdenv.lib; + +stdenv.mkDerivation rec { + name = "qbittorrent-${version}"; + version = "4.1.6"; + + src = fetchFromGitHub { + owner = "qbittorrent"; + repo = "qbittorrent"; + rev = "release-${version}"; + sha256 = "1y9kv84sy5fg64wbl4xpm8qh0hjba7ibk045cazp0m736rjmxk8c"; + }; + + # NOTE: 2018-05-31: CMake is working but it is not officially supported + nativeBuildInputs = [ pkgconfig ]; + + buildInputs = [ boost libtorrentRasterbar qtbase qttools qtsvg ] + ++ optional guiSupport dbus; # D(esktop)-Bus depends on GUI support + + # Otherwise qm_gen.pri assumes lrelease-qt5, which does not exist. + QMAKE_LRELEASE = "lrelease"; + + configureFlags = [ + "--with-boost-libdir=${boost.out}/lib" + "--with-boost=${boost.dev}" ] + ++ optionals (!guiSupport) [ "--disable-gui" "--enable-systemd" ] # Also place qbittorrent-nox systemd service files + ++ optional (!webuiSupport) "--disable-webui" + ++ optional debugSupport "--enable-debug"; + + enableParallelBuilding = true; + + meta = { + description = "Featureful free software BitTorrent client"; + homepage = https://www.qbittorrent.org/; + license = licenses.gpl2; + platforms = platforms.linux; + maintainers = with maintainers; [ Anton-Latukha ]; + }; +} diff --git a/nixpkgs/pkgs/applications/networking/p2p/retroshare/default.nix b/nixpkgs/pkgs/applications/networking/p2p/retroshare/default.nix new file mode 100644 index 000000000000..2d523cc07dd9 --- /dev/null +++ b/nixpkgs/pkgs/applications/networking/p2p/retroshare/default.nix @@ -0,0 +1,59 @@ +{ stdenv, fetchFromGitHub, libupnp, gpgme, gnome3, glib, libssh, pkgconfig, protobuf, bzip2 +, libXScrnSaver, speex, curl, libxml2, libxslt, sqlcipher, libmicrohttpd, opencv, qmake, ffmpeg +, qtmultimedia, qtx11extras, qttools }: + +stdenv.mkDerivation rec { + name = "retroshare-${version}"; + version = "0.6.2"; + + src = fetchFromGitHub { + owner = "RetroShare"; + repo = "RetroShare"; + rev = "v${version}"; + sha256 = "0hly2x87wdvqzzwf3wjzi7092bj8fk4xs6302rkm8gp9bkkmiiw8"; + }; + + # NIX_CFLAGS_COMPILE = [ "-I${glib.dev}/include/glib-2.0" "-I${glib.dev}/lib/glib-2.0/include" "-I${libxml2.dev}/include/libxml2" "-I${sqlcipher}/include/sqlcipher" ]; + + patchPhase = '' + # Fix build error + sed -i 's/UpnpString_get_String(es_event->PublisherUrl)/es_event->PublisherUrl/' \ + libretroshare/src/upnp/UPnPBase.cpp + ''; + + nativeBuildInputs = [ pkgconfig qmake ]; + buildInputs = [ + speex libupnp gpgme gnome3.libgnome-keyring glib libssh qtmultimedia qtx11extras qttools + protobuf bzip2 libXScrnSaver curl libxml2 libxslt sqlcipher libmicrohttpd opencv ffmpeg + ]; + + preConfigure = '' + qmakeFlags="$qmakeFlags DESTDIR=$out" + ''; + + # gui/settings/PluginsPage.h:25:28: fatal error: ui_PluginsPage.h: No such file or directory + enableParallelBuilding = false; + + postInstall = '' + mkdir -p $out/bin + mv $out/RetroShare06-nogui $out/bin/RetroShare-nogui + mv $out/RetroShare06 $out/bin/Retroshare + ln -s $out/bin/RetroShare-nogui $out/bin/retroshare-nogui + + # plugins + mkdir -p $out/share/retroshare + mv $out/lib* $out/share/retroshare + + # BT DHT bootstrap + cp libbitdht/src/bitdht/bdboot.txt $out/share/retroshare + ''; + + meta = with stdenv.lib; { + description = ""; + homepage = http://retroshare.sourceforge.net/; + license = licenses.gpl2Plus; + platforms = platforms.linux; + maintainers = [ maintainers.domenkozar ]; + broken = true; # broken by libupnp: 1.6.21 -> 1.8.3 (#41684) + }; +} diff --git a/nixpkgs/pkgs/applications/networking/p2p/soulseekqt/default.nix b/nixpkgs/pkgs/applications/networking/p2p/soulseekqt/default.nix new file mode 100644 index 000000000000..104131e47752 --- /dev/null +++ b/nixpkgs/pkgs/applications/networking/p2p/soulseekqt/default.nix @@ -0,0 +1,73 @@ +{ stdenv +, fetchurl +, dbus +, zlib, fontconfig +, qtbase, qtmultimedia +, libjson, libgpgerror +, libX11, libxcb, libXau, libXdmcp, freetype, libbsd +, pythonPackages, squashfsTools, desktop-file-utils +}: + +with stdenv.lib; +let + libPath = makeLibraryPath + [ stdenv.cc.cc qtbase qtmultimedia dbus libX11 zlib libX11 libxcb libXau libXdmcp freetype fontconfig libbsd libjson libgpgerror]; + + version = "2018-1-30"; + + mainbin = "SoulseekQt-" + (version) +"-"+ (if stdenv.is64bit then "64bit" else "32bit"); + srcs = { + "x86_64-linux" = fetchurl { + url = "https://www.dropbox.com/s/0vi87eef3ooh7iy/${mainbin}.tgz"; + sha256 = "0d1cayxr1a4j19bc5a3qp9pg22ggzmd55b6f5av3lc6lvwqqg4w6"; + }; + }; + +in stdenv.mkDerivation rec { + + name = "soulseekqt-${version}"; + inherit version; + src = srcs."${stdenv.hostPlatform.system}" or (throw "unsupported system: ${stdenv.hostPlatform.system}"); + + dontBuild = true; + + buildInputs = [ pythonPackages.binwalk squashfsTools desktop-file-utils ]; + + # avoid usage of appimage's runner option --appimage-extract + unpackCmd = '' + export HOME=$(pwd) # workaround for binwalk + appimage=$(tar xvf $curSrc) && binwalk --quiet \ + $appimage -D 'squashfs:squashfs:unsquashfs %e' + ''; + + patchPhase = '' + cd squashfs-root/ + binary="$(readlink AppRun)" + + # fixup desktop file + desktop-file-edit --set-key Exec --set-value $binary default.desktop + desktop-file-edit --set-key Comment --set-value "${meta.description}" default.desktop + desktop-file-edit --set-key Categories --set-value Network default.desktop + ''; + + installPhase = '' + mkdir -p $out/{bin,share/applications,share/icons/} + cp default.desktop $out/share/applications/$binary.desktop + cp soulseek.png $out/share/icons/ + cp $binary $out/bin/ + ''; + + fixupPhase = '' + patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ + --set-rpath ${libPath} \ + $out/bin/$binary + ''; + + meta = with stdenv.lib; { + description = "Official Qt SoulSeek client"; + homepage = http://www.soulseekqt.net; + license = licenses.unfree; + maintainers = [ maintainers.genesis ]; + platforms = [ "x86_64-linux" ]; + }; +} diff --git a/nixpkgs/pkgs/applications/networking/p2p/synapse-bt/default.nix b/nixpkgs/pkgs/applications/networking/p2p/synapse-bt/default.nix new file mode 100644 index 000000000000..f3c7f8ccf18a --- /dev/null +++ b/nixpkgs/pkgs/applications/networking/p2p/synapse-bt/default.nix @@ -0,0 +1,29 @@ +{ stdenv, fetchFromGitHub, rustPlatform, pkgconfig, openssl, CoreServices, Security }: + +rustPlatform.buildRustPackage rec { + pname = "synapse-bt"; + version = "1.0"; + + src = fetchFromGitHub { + owner = "Luminarys"; + repo = "synapse"; + rev = version; + sha256 = "01npv3zwia5d534zdwisd9xfng507adv4qkljf8z0zm0khqqn71a"; + }; + + cargoSha256 = "0m4jigz6la3mf4yq217849ilcncb7d97mqyw2qicff4rbscdgf6h"; + + nativeBuildInputs = [ pkgconfig ]; + buildInputs = [ openssl ] + ++ stdenv.lib.optionals stdenv.isDarwin [ CoreServices Security ]; + + cargoBuildFlags = [ "--all" ]; + + meta = with stdenv.lib; { + description = "Flexible and fast BitTorrent daemon"; + homepage = https://synapse-bt.org/; + license = licenses.isc; + maintainers = with maintainers; [ dywedir ]; + platforms = platforms.all; + }; +} diff --git a/nixpkgs/pkgs/applications/networking/p2p/tixati/default.nix b/nixpkgs/pkgs/applications/networking/p2p/tixati/default.nix new file mode 100644 index 000000000000..7a5f389af248 --- /dev/null +++ b/nixpkgs/pkgs/applications/networking/p2p/tixati/default.nix @@ -0,0 +1,30 @@ +{ stdenv, fetchurl, glib, zlib, dbus, dbus-glib, gtk2, gdk_pixbuf, cairo, pango }: + +stdenv.mkDerivation rec { + name = "tixati-${version}"; + version = "2.61"; + + src = fetchurl { + url = "https://download2.tixati.com/download/tixati-${version}-1.x86_64.manualinstall.tar.gz"; + sha256 = "05f8lcsac2mr90bhk999qkj8wwd6igdl07389bqrd1ydjasacl2k"; + }; + + installPhase = '' + patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ + --set-rpath ${stdenv.lib.makeLibraryPath [ glib zlib dbus dbus-glib gtk2 gdk_pixbuf cairo pango ]} \ + tixati + install -D tixati $out/bin/tixati + install -D tixati.desktop $out/share/applications/tixati.desktop + install -D tixati.png $out/share/icons/tixati.png + ''; + + dontStrip = true; + + meta = with stdenv.lib; { + description = "Torrent client"; + homepage = http://www.tixati.com; + license = licenses.unfree; + platforms = [ "x86_64-linux" ]; + maintainers = with maintainers; [ volth ]; + }; +} diff --git a/nixpkgs/pkgs/applications/networking/p2p/torrential/default.nix b/nixpkgs/pkgs/applications/networking/p2p/torrential/default.nix new file mode 100644 index 000000000000..999f80a7bbd0 --- /dev/null +++ b/nixpkgs/pkgs/applications/networking/p2p/torrential/default.nix @@ -0,0 +1,60 @@ +{ stdenv +, fetchFromGitHub +, cmake +, pkgconfig +, pantheon +, curl +, glib +, gtk3 +, hicolor-icon-theme +, libb64 +, libevent +, libgee +, libnatpmp +, libunity +, miniupnpc +, openssl +, wrapGAppsHook }: + +stdenv.mkDerivation rec { + pname = "torrential"; + version = "1.1.0"; + + src = fetchFromGitHub { + owner = "davidmhewitt"; + repo = "torrential"; + rev = version; + fetchSubmodules = true; + sha256 = "17aby0c17ybyzyzyc1cg1j6q1a186801fy84avlaxahqp7vdammx"; + }; + + nativeBuildInputs = [ + cmake + pantheon.vala + pkgconfig + wrapGAppsHook + ]; + + buildInputs = [ + curl + glib + gtk3 + hicolor-icon-theme + libb64 + libevent + libgee + libnatpmp + libunity + miniupnpc + openssl + pantheon.granite + ]; + + meta = with stdenv.lib; { + description = "Download torrents in style with this speedy, minimalist torrent client for elementary OS"; + homepage = https://github.com/davidmhewitt/torrential; + maintainers = with maintainers; [ kjuvi ] ++ pantheon.maintainers; + platforms = platforms.linux; + license = licenses.gpl3; + }; +} diff --git a/nixpkgs/pkgs/applications/networking/p2p/transgui/default.nix b/nixpkgs/pkgs/applications/networking/p2p/transgui/default.nix new file mode 100644 index 000000000000..d4823988526e --- /dev/null +++ b/nixpkgs/pkgs/applications/networking/p2p/transgui/default.nix @@ -0,0 +1,76 @@ +{ stdenv, fetchFromGitHub, pkgconfig, makeDesktopItem, unzip, fpc, lazarus, +libX11, glib, gtk2, gdk_pixbuf, pango, atk, cairo, openssl }: + +stdenv.mkDerivation rec { + pname = "transgui"; + version = "5.17.0"; + + src = fetchFromGitHub { + owner = "transmission-remote-gui"; + repo = "transgui"; + rev = "v${version}"; + sha256 = "0p76vavny5asi5naa4jn67raxlarsmrkbchfn96y6gh5p2vzwpl7"; + }; + + nativeBuildInputs = [ pkgconfig ]; + buildInputs = [ + unzip fpc lazarus stdenv.cc + libX11 glib gtk2 gdk_pixbuf pango atk cairo openssl + ]; + + NIX_LDFLAGS = " + -L${stdenv.cc.cc.lib}/lib + -lX11 -lglib-2.0 -lgtk-x11-2.0 -lgdk-x11-2.0 + -lgdk_pixbuf-2.0 -lpango-1.0 -latk-1.0 -lcairo -lc -lcrypto + "; + + prePatch = '' + substituteInPlace restranslator.pas --replace /usr/ $out/ + ''; + + preBuild = '' + lazbuild -B transgui.lpr --lazarusdir=${lazarus}/share/lazarus + ''; + + makeFlags = [ + "FPC=fpc" + "PP=fpc" + "INSTALL_PREFIX=$(out)" + ]; + + LCL_PLATFORM = "gtk2"; + + desktopItem = makeDesktopItem rec { + name = "transgui"; + exec = name + " %U"; + icon = name; + type = "Application"; + comment = meta.description; + desktopName = "Transmission Remote GUI"; + genericName = "BitTorrent Client"; + categories = stdenv.lib.concatStringsSep ";" [ + "Application" "Network" "FileTransfer" "P2P" "GTK" + ]; + startupNotify = "true"; + mimeType = stdenv.lib.concatStringsSep ";" [ + "application/x-bittorrent" "x-scheme-handler/magnet" + ]; + }; + + postInstall = '' + mkdir -p "$out/share/applications" + cp $desktopItem/share/applications/* $out/share/applications + mkdir -p "$out/share/icons/hicolor/48x48/apps" + cp transgui.png "$out/share/icons/hicolor/48x48/apps" + mkdir -p "$out/share/transgui" + cp -r "./lang" "$out/share/transgui" + ''; + + meta = { + description = "A cross platform front-end for the Transmission Bit-Torrent client"; + homepage = https://sourceforge.net/p/transgui; + license = stdenv.lib.licenses.gpl2Plus; + maintainers = with stdenv.lib.maintainers; [ ramkromberg ]; + platforms = stdenv.lib.platforms.linux; + }; +} diff --git a/nixpkgs/pkgs/applications/networking/p2p/transmission-remote-cli/default.nix b/nixpkgs/pkgs/applications/networking/p2p/transmission-remote-cli/default.nix new file mode 100644 index 000000000000..fc803fa2745c --- /dev/null +++ b/nixpkgs/pkgs/applications/networking/p2p/transmission-remote-cli/default.nix @@ -0,0 +1,26 @@ +{ stdenv, fetchurl, pythonPackages }: + +stdenv.mkDerivation rec { + name = "transmission-remote-cli-${version}"; + version = "1.7.1"; + + src = fetchurl { + url = "https://github.com/fagga/transmission-remote-cli/archive/v${version}.tar.gz"; + sha256 = "1y0hkpcjf6jw9xig8yf484hbhy63nip0pkchx401yxj81m25l4z9"; + }; + + buildInputs = with pythonPackages; [ python wrapPython ]; + + installPhase = '' + install -D transmission-remote-cli $out/bin/transmission-remote-cli + install -D transmission-remote-cli.1 $out/share/man/man1/transmission-remote-cli.1 + wrapPythonPrograms + ''; + + meta = { + description = "Curses interface for the Transmission BitTorrent daemon"; + homepage = https://github.com/fagga/transmission-remote-cli; + license = stdenv.lib.licenses.gpl3Plus; + platforms = stdenv.lib.platforms.unix; + }; +} diff --git a/nixpkgs/pkgs/applications/networking/p2p/transmission-remote-gtk/default.nix b/nixpkgs/pkgs/applications/networking/p2p/transmission-remote-gtk/default.nix new file mode 100644 index 000000000000..7d2f34c591e9 --- /dev/null +++ b/nixpkgs/pkgs/applications/networking/p2p/transmission-remote-gtk/default.nix @@ -0,0 +1,36 @@ +{ stdenv, autoconf, automake, libtool, wrapGAppsHook, fetchFromGitHub, pkgconfig +, intltool, gtk3, json-glib, curl, glib, autoconf-archive, appstream-glib +, hicolor-icon-theme }: + + +stdenv.mkDerivation rec { + name = "transmission-remote-gtk-${version}"; + version = "1.4.1"; + + src = fetchFromGitHub { + owner = "transmission-remote-gtk"; + repo = "transmission-remote-gtk"; + rev = "${version}"; + sha256 = "1pipc1f94jdppv597mqmcj2kw2rdvaqcbl512v7z8vir76p1a7gk"; + }; + + preConfigure = "./autogen.sh"; + + nativeBuildInputs= [ + autoconf automake libtool wrapGAppsHook + pkgconfig intltool autoconf-archive + appstream-glib + ]; + + buildInputs = [ gtk3 json-glib curl glib hicolor-icon-theme ]; + + doCheck = false; # fails with style validation error + + meta = with stdenv.lib; { + description = "GTK remote control for the Transmission BitTorrent client"; + homepage = https://github.com/ajf8/transmission-remote-gtk; + license = licenses.gpl2; + maintainers = [ maintainers.ehmry ]; + platforms = platforms.linux; + }; +} diff --git a/nixpkgs/pkgs/applications/networking/p2p/transmission/default.nix b/nixpkgs/pkgs/applications/networking/p2p/transmission/default.nix new file mode 100644 index 000000000000..b94864a0b40f --- /dev/null +++ b/nixpkgs/pkgs/applications/networking/p2p/transmission/default.nix @@ -0,0 +1,64 @@ +{ stdenv, fetchurl, pkgconfig, intltool, file, wrapGAppsHook +, openssl, curl, libevent, inotify-tools, systemd, zlib, hicolor-icon-theme +, enableGTK3 ? false, gtk3 +, enableSystemd ? stdenv.isLinux +, enableDaemon ? true +, enableCli ? true +}: + +let inherit (stdenv.lib) optional optionals optionalString; in + +stdenv.mkDerivation rec { + name = "transmission-" + optionalString enableGTK3 "gtk-" + version; + version = "2.94"; + + src = fetchurl { + url = "https://github.com/transmission/transmission-releases/raw/master/transmission-2.94.tar.xz"; + sha256 = "0zbbj7rlm6m7vb64x68a64cwmijhsrwx9l63hbwqs7zr9742qi1m"; + }; + + nativeBuildInputs = [ pkgconfig ] + ++ optionals enableGTK3 [ wrapGAppsHook ]; + buildInputs = [ intltool file openssl curl libevent zlib ] + ++ optionals enableGTK3 [ gtk3 ] + ++ optionals enableSystemd [ systemd ] + ++ optionals stdenv.isLinux [ inotify-tools ] + ++ optionals enableGTK3 [ hicolor-icon-theme ]; + + postPatch = '' + substituteInPlace ./configure \ + --replace "libsystemd-daemon" "libsystemd" \ + --replace "/usr/bin/file" "${file}/bin/file" \ + --replace "test ! -d /Developer/SDKs/MacOSX10.5.sdk" "false" + ''; + + configureFlags = [ + ("--enable-cli=" + (if enableCli then "yes" else "no")) + ("--enable-daemon=" + (if enableDaemon then "yes" else "no")) + "--disable-mac" # requires xcodebuild + ] + ++ optional enableSystemd "--with-systemd-daemon" + ++ optional enableGTK3 "--with-gtk"; + + NIX_LDFLAGS = optionalString stdenv.isDarwin "-framework CoreFoundation"; + + meta = with stdenv.lib; { + description = "A fast, easy and free BitTorrent client"; + longDescription = '' + Transmission is a BitTorrent client which features a simple interface + on top of a cross-platform back-end. + Feature spotlight: + * Uses fewer resources than other clients + * Native Mac, GTK+ and Qt GUI clients + * Daemon ideal for servers, embedded systems, and headless use + * All these can be remote controlled by Web and Terminal clients + * Bluetack (PeerGuardian) blocklists with automatic updates + * Full encryption, DHT, and PEX support + ''; + homepage = http://www.transmissionbt.com/; + license = licenses.gpl2; # parts are under MIT + maintainers = with maintainers; [ astsmtl vcunat wizeman ]; + platforms = platforms.unix; + }; +} + diff --git a/nixpkgs/pkgs/applications/networking/p2p/tribler/default.nix b/nixpkgs/pkgs/applications/networking/p2p/tribler/default.nix new file mode 100644 index 000000000000..29ec8158099c --- /dev/null +++ b/nixpkgs/pkgs/applications/networking/p2p/tribler/default.nix @@ -0,0 +1,81 @@ +{ stdenv, fetchurl, pythonPackages, makeWrapper, imagemagick +, enablePlayer ? true, vlc ? null, qt5 }: + +stdenv.mkDerivation rec { + name = "tribler-${version}"; + version = "7.1.2"; + + src = fetchurl { + url = "https://github.com/Tribler/tribler/releases/download/v${version}/Tribler-v${version}.tar.gz"; + sha256 = "1ayzqx4358qlx56hsnsn5s8xl6mzdb6nw4kwsalmp86dw6vmmis8"; + }; + + buildInputs = [ + pythonPackages.python + pythonPackages.wrapPython + makeWrapper + imagemagick + ]; + + pythonPath = [ + pythonPackages.libtorrentRasterbar + pythonPackages.apsw + pythonPackages.twisted + pythonPackages.netifaces + pythonPackages.pycrypto + pythonPackages.pyasn1 + pythonPackages.requests + pythonPackages.setuptools + pythonPackages.m2crypto + pythonPackages.pyqt5 + pythonPackages.chardet + pythonPackages.cherrypy + pythonPackages.cryptography + pythonPackages.libnacl + pythonPackages.configobj + pythonPackages.matplotlib + pythonPackages.plyvel + pythonPackages.decorator + pythonPackages.feedparser + pythonPackages.service-identity + pythonPackages.psutil + pythonPackages.meliae + pythonPackages.sip + pythonPackages.pillow + pythonPackages.networkx + ]; + + postPatch = '' + ${stdenv.lib.optionalString enablePlayer '' + substituteInPlace "./TriblerGUI/vlc.py" --replace "ctypes.CDLL(p)" "ctypes.CDLL('${vlc}/lib/libvlc.so')" + substituteInPlace "./TriblerGUI/widgets/videoplayerpage.py" --replace "if vlc and vlc.plugin_path" "if vlc" + substituteInPlace "./TriblerGUI/widgets/videoplayerpage.py" --replace "os.environ['VLC_PLUGIN_PATH'] = vlc.plugin_path" "os.environ['VLC_PLUGIN_PATH'] = '${vlc}/lib/vlc/plugins'" + ''} + ''; + + installPhase = '' + find . -name '*.png' -exec convert -strip {} {} \; + mkdir -pv $out + # Nasty hack; call wrapPythonPrograms to set program_PYTHONPATH. + wrapPythonPrograms + cp -prvd ./* $out/ + makeWrapper ${pythonPackages.python}/bin/python $out/bin/tribler \ + --set QT_QPA_PLATFORM_PLUGIN_PATH ${qt5.qtbase.bin}/lib/qt-*/plugins/platforms \ + --set _TRIBLERPATH $out \ + --set PYTHONPATH $out:$program_PYTHONPATH \ + --set NO_AT_BRIDGE 1 \ + --run 'cd $_TRIBLERPATH' \ + --add-flags "-O $out/run_tribler.py" \ + ${stdenv.lib.optionalString enablePlayer '' + --prefix LD_LIBRARY_PATH : ${vlc}/lib + ''} + ''; + + meta = with stdenv.lib; { + maintainers = with maintainers; [ xvapx ]; + homepage = https://www.tribler.org/; + description = "A completely decentralised P2P filesharing client based on the Bittorrent protocol"; + license = licenses.lgpl21; + platforms = platforms.linux; + }; +} diff --git a/nixpkgs/pkgs/applications/networking/p2p/twister/default.nix b/nixpkgs/pkgs/applications/networking/p2p/twister/default.nix new file mode 100644 index 000000000000..cce44521a620 --- /dev/null +++ b/nixpkgs/pkgs/applications/networking/p2p/twister/default.nix @@ -0,0 +1,72 @@ +{ stdenv, fetchurl, fetchpatch, autoconf, automake, libtool, pkgconfig, python2 +, boost, db, openssl, geoip, libiconv, miniupnpc +, srcOnly, fetchgit +}: + +let + twisterHTML = srcOnly { + name = "twister-html"; + src = fetchgit { + url = "git://github.com/miguelfreitas/twister-html.git"; + rev = "01e7f7ca9b7e42ed90f91bc42da2c909ca5c0b9b"; + sha256 = "0scjbin6s1kmi0bqq0dx0qyjw4n5xgmj567n0156i39f9h0dabqy"; + }; + }; + + boostPython = boost.override { enablePython = true; }; + +in stdenv.mkDerivation rec { + name = "twister-${version}"; + version = "0.9.34"; + + src = fetchurl { + url = "https://github.com/miguelfreitas/twister-core/" + + "archive/v${version}.tar.gz"; + sha256 = "1bi8libivd9y2bn9fc7vbc5q0jnal0pykpzgri6anqaww22y58jq"; + }; + + configureFlags = [ + "--with-libgeoip" + "--with-libiconv" + "--disable-deprecated-functions" + "--enable-tests" + "--enable-python-binding" + "--with-boost-libdir=${boostPython.out}/lib" + ]; + + nativeBuildInputs = [ pkgconfig ]; + buildInputs = [ + autoconf automake libtool python2 + boostPython db openssl geoip miniupnpc libiconv + ]; + + patches = stdenv.lib.singleton (fetchpatch { + url = "https://github.com/miguelfreitas/twister-core/commit/" + + "dd4f5a176958ea6ed855dc3fcef79680c1c0c92c.patch"; + sha256 = "06fgmqnjyl83civ3ixiq673k8zjgm8n2w4w46nsh810nprqim8s6"; + }); + + postPatch = '' + sed -i -e '/-htmldir/s|(default: [^)]*)|(default: ${twisterHTML})|' \ + src/init.cpp + sed -i -e '/GetDataDir.*html/s|path *= *[^;]*|path = "${twisterHTML}"|' \ + src/util.cpp + ''; + + preConfigure = '' + sh autotool.sh + ''; + + installPhase = '' + install -vD twisterd "$out/bin/twisterd" + ''; + + enableParallelBuilding = true; + + meta = { + homepage = http://www.twister.net.co/; + description = "Peer-to-peer microblogging"; + license = stdenv.lib.licenses.mit; + platforms = stdenv.lib.platforms.linux; + }; +} diff --git a/nixpkgs/pkgs/applications/networking/p2p/vuze/default.nix b/nixpkgs/pkgs/applications/networking/p2p/vuze/default.nix new file mode 100644 index 000000000000..8725d5263fe3 --- /dev/null +++ b/nixpkgs/pkgs/applications/networking/p2p/vuze/default.nix @@ -0,0 +1,29 @@ +{ stdenv, fetchsvn, jdk, jre, ant, swt, makeWrapper }: + +stdenv.mkDerivation rec { + name = "vuze-${version}"; + version = "5750"; + + src = fetchsvn { + url = "http://svn.vuze.com/public/client/tags/RELEASE_${version}"; + sha256 = "07w6ipyiy8hi88d6yxbbf3vkv26mj7dcz9yr8141hb2ig03v0h0p"; + }; + + buildInputs = [ makeWrapper jdk ant ]; + + buildPhase = "ant"; + + installPhase = '' + install -D dist/Vuze_0000-00.jar $out/share/java/Vuze_${version}-00.jar + makeWrapper ${jre}/bin/java $out/bin/vuze \ + --add-flags "-Xmx256m -Djava.library.path=${swt}/lib -cp $out/share/java/Vuze_${version}-00.jar:${swt}/jars/swt.jar org.gudy.azureus2.ui.swt.Main" + ''; + + meta = with stdenv.lib; { + description = "Torrent client"; + homepage = http://www.vuze.com; + license = licenses.unfree; + platforms = platforms.all; + maintainers = with maintainers; [ volth ]; + }; +} diff --git a/nixpkgs/pkgs/applications/networking/p2p/zeronet/default.nix b/nixpkgs/pkgs/applications/networking/p2p/zeronet/default.nix new file mode 100644 index 000000000000..88f07f0a8a50 --- /dev/null +++ b/nixpkgs/pkgs/applications/networking/p2p/zeronet/default.nix @@ -0,0 +1,35 @@ +{ stdenv, fetchFromGitHub, python2Packages }: + +python2Packages.buildPythonApplication rec { + pname = "zeronet"; + version = "0.6.5"; + format = "other"; + + src = fetchFromGitHub { + owner = "HelloZeroNet"; + repo = "ZeroNet"; + rev = "v${version}"; + sha256 = "1b9jg525jq40czyw9xh9ck90fl9rzrdmzl2mzhqqhz23idb60j4a"; + }; + + propagatedBuildInputs = with python2Packages; [ msgpack gevent ]; + buildPhase = "${python2Packages.python.interpreter} -O -m compileall ."; + + installPhase = '' + mkdir -p $out/share + cp -r plugins src tools *.py $out/share/ + ''; + + postFixup = '' + makeWrapper "$out/share/zeronet.py" "$out/bin/zeronet" \ + --set PYTHONPATH "$PYTHONPATH" \ + --set PATH ${python2Packages.python}/bin + ''; + + meta = with stdenv.lib; { + description = "Decentralized websites using Bitcoin crypto and BitTorrent network"; + homepage = "https://zeronet.io/"; + license = licenses.gpl2; + maintainers = with maintainers; [ fgaz ]; + }; +} |