nixpkgs/pkgs/applications/networking/p2p/twister/default.nix
aszlig 4086f7c978
twister: Add new package, version 0.9.22.
This includes another source-only derivation for the web interface (and
patches the path into the twister binary), so there shouldn't be a need
to move it into ~/.twister/html separately.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2014-07-13 23:56:11 +02:00

62 lines
1.5 KiB
Nix

{ 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;
};
}