2017-08-25 17:27:41 +01:00
|
|
|
{ stdenv, fetchurl, fetchpatch, autoconf, automake, libtool, pkgconfig, python2
|
2014-11-26 23:16:50 +00:00
|
|
|
, boost, db, openssl, geoip, libiconv, miniupnpc
|
2014-07-13 22:56:11 +01:00
|
|
|
, srcOnly, fetchgit
|
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
twisterHTML = srcOnly {
|
|
|
|
name = "twister-html";
|
|
|
|
src = fetchgit {
|
|
|
|
url = "git://github.com/miguelfreitas/twister-html.git";
|
2015-10-06 10:28:01 +01:00
|
|
|
rev = "01e7f7ca9b7e42ed90f91bc42da2c909ca5c0b9b";
|
|
|
|
sha256 = "0scjbin6s1kmi0bqq0dx0qyjw4n5xgmj567n0156i39f9h0dabqy";
|
2014-07-13 22:56:11 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
in stdenv.mkDerivation rec {
|
|
|
|
name = "twister-${version}";
|
2017-08-25 17:23:07 +01:00
|
|
|
version = "0.9.34";
|
2014-07-13 22:56:11 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/miguelfreitas/twister-core/"
|
|
|
|
+ "archive/v${version}.tar.gz";
|
2017-08-25 17:23:07 +01:00
|
|
|
sha256 = "1bi8libivd9y2bn9fc7vbc5q0jnal0pykpzgri6anqaww22y58jq";
|
2014-07-13 22:56:11 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
configureFlags = [
|
|
|
|
"--with-libgeoip"
|
|
|
|
"--with-libiconv"
|
|
|
|
"--disable-deprecated-functions"
|
|
|
|
"--enable-tests"
|
|
|
|
"--enable-python-binding"
|
2016-04-27 22:41:28 +01:00
|
|
|
"--with-boost-libdir=${boost.out}/lib"
|
2014-07-13 22:56:11 +01:00
|
|
|
];
|
|
|
|
|
2017-09-14 20:24:37 +01:00
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
2014-07-13 22:56:11 +01:00
|
|
|
buildInputs = [
|
2017-09-14 20:24:37 +01:00
|
|
|
autoconf automake libtool python2
|
2014-11-26 23:16:50 +00:00
|
|
|
boost db openssl geoip miniupnpc libiconv
|
|
|
|
];
|
2014-07-13 22:56:11 +01:00
|
|
|
|
2017-08-25 17:27:41 +01:00
|
|
|
patches = stdenv.lib.singleton (fetchpatch {
|
|
|
|
url = "https://github.com/miguelfreitas/twister-core/commit/"
|
|
|
|
+ "dd4f5a176958ea6ed855dc3fcef79680c1c0c92c.patch";
|
|
|
|
sha256 = "06fgmqnjyl83civ3ixiq673k8zjgm8n2w4w46nsh810nprqim8s6";
|
|
|
|
});
|
|
|
|
|
2014-07-13 22:56:11 +01: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 = {
|
2017-08-01 21:03:30 +01:00
|
|
|
homepage = http://www.twister.net.co/;
|
2014-07-13 22:56:11 +01:00
|
|
|
description = "Peer-to-peer microblogging";
|
|
|
|
license = stdenv.lib.licenses.mit;
|
2016-08-02 18:50:55 +01:00
|
|
|
platforms = stdenv.lib.platforms.linux;
|
2014-07-13 22:56:11 +01:00
|
|
|
};
|
|
|
|
}
|