2016-11-09 13:52:11 +01:00
|
|
|
{ stdenv, fetchurl, autoconf, automake, libtool, pkgconfig, python2
|
2014-11-27 00:16:50 +01:00
|
|
|
, boost, db, openssl, geoip, libiconv, miniupnpc
|
2014-07-13 23:56:11 +02:00
|
|
|
, srcOnly, fetchgit
|
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
twisterHTML = srcOnly {
|
|
|
|
name = "twister-html";
|
|
|
|
src = fetchgit {
|
|
|
|
url = "git://github.com/miguelfreitas/twister-html.git";
|
2015-10-06 11:28:01 +02:00
|
|
|
rev = "01e7f7ca9b7e42ed90f91bc42da2c909ca5c0b9b";
|
|
|
|
sha256 = "0scjbin6s1kmi0bqq0dx0qyjw4n5xgmj567n0156i39f9h0dabqy";
|
2014-07-13 23:56:11 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
in stdenv.mkDerivation rec {
|
|
|
|
name = "twister-${version}";
|
2015-10-06 11:28:01 +02:00
|
|
|
version = "0.9.30";
|
2014-07-13 23:56:11 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/miguelfreitas/twister-core/"
|
|
|
|
+ "archive/v${version}.tar.gz";
|
2015-10-06 11:28:01 +02:00
|
|
|
sha256 = "1i39iqq6z25rh869vi5k76g84rmyh30p05xid7z9sqjrqdfpyyzk";
|
2014-07-13 23:56:11 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
configureFlags = [
|
|
|
|
"--with-libgeoip"
|
|
|
|
"--with-libiconv"
|
|
|
|
"--disable-deprecated-functions"
|
|
|
|
"--enable-tests"
|
|
|
|
"--enable-python-binding"
|
2016-04-27 23:41:28 +02:00
|
|
|
"--with-boost-libdir=${boost.out}/lib"
|
2014-07-13 23:56:11 +02:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
2016-11-09 13:52:11 +01:00
|
|
|
autoconf automake libtool pkgconfig python2
|
2014-11-27 00:16:50 +01:00
|
|
|
boost db openssl geoip miniupnpc libiconv
|
|
|
|
];
|
2014-07-13 23:56:11 +02:00
|
|
|
|
|
|
|
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;
|
2016-08-02 19:50:55 +02:00
|
|
|
platforms = stdenv.lib.platforms.linux;
|
2014-07-13 23:56:11 +02:00
|
|
|
};
|
|
|
|
}
|