2021-01-19 06:50:56 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, fetchpatch, autoconf, automake, libtool, pkg-config, python2
|
2014-11-26 23:16:50 +00:00
|
|
|
, boost, db, openssl, geoip, libiconv, miniupnpc
|
2014-07-13 21:56:11 +00:00
|
|
|
, srcOnly, fetchgit
|
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
twisterHTML = srcOnly {
|
|
|
|
name = "twister-html";
|
|
|
|
src = fetchgit {
|
|
|
|
url = "git://github.com/miguelfreitas/twister-html.git";
|
2015-10-06 09:28:01 +00:00
|
|
|
rev = "01e7f7ca9b7e42ed90f91bc42da2c909ca5c0b9b";
|
|
|
|
sha256 = "0scjbin6s1kmi0bqq0dx0qyjw4n5xgmj567n0156i39f9h0dabqy";
|
2014-07-13 21:56:11 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2018-07-01 17:38:06 +00:00
|
|
|
boostPython = boost.override { enablePython = true; };
|
|
|
|
|
2014-07-13 21:56:11 +00:00
|
|
|
in stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "twister";
|
2019-09-14 11:34:48 +00:00
|
|
|
version = "2019-08-19";
|
2014-07-13 21:56:11 +00:00
|
|
|
|
2019-09-14 11:34:48 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "miguelfreitas";
|
|
|
|
repo = "twister-core";
|
|
|
|
rev = "31faf3f63e461ea0a9b23081567a4a552cf06873";
|
|
|
|
sha256 = "0xh1lgnl9nd86jr0mp7m8bkd7r5j4d6chd0y73h2xv4aq5sld0sp";
|
2014-07-13 21:56:11 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
configureFlags = [
|
|
|
|
"--with-libgeoip"
|
|
|
|
"--with-libiconv"
|
|
|
|
"--disable-deprecated-functions"
|
|
|
|
"--enable-tests"
|
|
|
|
"--enable-python-binding"
|
2018-07-01 17:38:06 +00:00
|
|
|
"--with-boost-libdir=${boostPython.out}/lib"
|
2014-07-13 21:56:11 +00:00
|
|
|
];
|
|
|
|
|
2021-01-19 06:50:56 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2014-07-13 21:56:11 +00:00
|
|
|
buildInputs = [
|
2017-09-14 19:24:37 +00:00
|
|
|
autoconf automake libtool python2
|
2018-07-01 17:38:06 +00:00
|
|
|
boostPython db openssl geoip miniupnpc libiconv
|
2014-11-26 23:16:50 +00:00
|
|
|
];
|
2014-07-13 21:56:11 +00: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 = {
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "http://www.twister.net.co/";
|
2014-07-13 21:56:11 +00:00
|
|
|
description = "Peer-to-peer microblogging";
|
2021-01-15 13:21:58 +00:00
|
|
|
license = lib.licenses.mit;
|
|
|
|
platforms = lib.platforms.linux;
|
2014-07-13 21:56:11 +00:00
|
|
|
};
|
|
|
|
}
|