diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-07-14 17:04:55 +0200 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-07-14 17:04:55 +0200 |
commit | ff97b7dbe6aef98b105c8af34f19232aa7d49d80 (patch) | |
tree | b44b52b9a17a84c84d179c1cafd3a3425c62751a /pkgs/applications/networking/p2p | |
parent | 0b82b9532229a28758df482218222d90d910c494 (diff) | |
parent | b57bc220cc04e3d8f931b604e5acc44544b8c1c0 (diff) |
Merge remote-tracking branch 'origin/master' into staging
Diffstat (limited to 'pkgs/applications/networking/p2p')
-rw-r--r-- | pkgs/applications/networking/p2p/retroshare/0.6.nix | 58 | ||||
-rw-r--r-- | pkgs/applications/networking/p2p/twister/default.nix | 62 |
2 files changed, 120 insertions, 0 deletions
diff --git a/pkgs/applications/networking/p2p/retroshare/0.6.nix b/pkgs/applications/networking/p2p/retroshare/0.6.nix new file mode 100644 index 0000000000000..6ea7089b3fb0a --- /dev/null +++ b/pkgs/applications/networking/p2p/retroshare/0.6.nix @@ -0,0 +1,58 @@ +{ stdenv, fetchsvn, cmake, qt, libupnp, gpgme, gnome3, glib, libssh, pkgconfig, protobuf, bzip2 +, libXScrnSaver, speex, curl, libxml2, libxslt, sqlcipher }: + +stdenv.mkDerivation { + name = "retroshare-0.6-svn-7445"; + + src = fetchsvn { + url = svn://svn.code.sf.net/p/retroshare/code/trunk; + rev = 7445; + sha256 = "1dqh65bn21g7ix752ddrr10kijjdwjgjipgysyxnm90zjmdlx3cc"; + }; + + NIX_CFLAGS_COMPILE = "-I${glib}/include/glib-2.0 -I${glib}/lib/glib-2.0/include -I${libxml2}/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 + # Extensions get installed + sed -i "s,/usr/lib/retroshare/extensions6/,$out/share/retroshare," \ + libretroshare/src/rsserver/rsinit.cc + # Where to find the bootstrap DHT bdboot.txt + sed -i "s,/usr/share/RetroShare,$out/share/retroshare," \ + libretroshare/src/rsserver/rsaccounts.cc + ''; + + # sed -i "s,LIBS +=.*sqlcipher.*,LIBS += -lsqlcipher," \ + # retroshare-gui/src/retroshare-gui.pro \ + # retroshare-nogui/src/retroshare-nogui.pro + + buildInputs = [ speex qt libupnp gpgme gnome3.libgnome_keyring glib libssh pkgconfig + protobuf bzip2 libXScrnSaver curl libxml2 libxslt sqlcipher ]; + + configurePhase = '' + qmake PREFIX=$out DESTDIR=$out RetroShare.pro + ''; + + postInstall = '' + mkdir -p $out/bin + mv $out/retroshare-nogui $out/bin + mv $out/RetroShare $out/bin + + # 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.bsd2; + platforms = platforms.linux; + maintainers = [ maintainers.iElectric ]; + }; +} diff --git a/pkgs/applications/networking/p2p/twister/default.nix b/pkgs/applications/networking/p2p/twister/default.nix new file mode 100644 index 0000000000000..36f83a0611bf3 --- /dev/null +++ b/pkgs/applications/networking/p2p/twister/default.nix @@ -0,0 +1,62 @@ +{ stdenv, fetchurl, autoconf, automake, libtool, pkgconfig, python +, 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 = "891f7bf24e1c3df7ec5e1db23c765df2d7c2d5a9"; + sha256 = "0d96rfkpwxyiz32k2pd6a64r2kr3600qgp9v73ddcpq593wf11qb"; + }; + }; + +in stdenv.mkDerivation rec { + name = "twister-${version}"; + version = "0.9.22"; + + src = fetchurl { + url = "https://github.com/miguelfreitas/twister-core/" + + "archive/v${version}.tar.gz"; + sha256 = "1haq0d7ypnazs599g4kcq1x914fslc04wazqj54rlvjdp7yx4j3f"; + }; + + configureFlags = [ + "--with-libgeoip" + "--with-libiconv" + "--with-boost=${boost}" + "--disable-deprecated-functions" + "--enable-tests" + "--enable-python-binding" + ]; + + buildInputs = [ + autoconf automake libtool pkgconfig python + boost db openssl geoip libiconv miniupnpc + ]; + + 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; + }; +} |