about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/networking/p2p/twister
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2019-01-07 02:18:36 +0000
committerAlyssa Ross <hi@alyssa.is>2019-01-07 02:18:47 +0000
commit36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2 (patch)
treeb3faaf573407b32aa645237a4d16b82778a39a92 /nixpkgs/pkgs/applications/networking/p2p/twister
parent4e31070265257dc67d120c27e0f75c2344fdfa9a (diff)
parentabf060725d7614bd3b9f96764262dfbc2f9c2199 (diff)
downloadnixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.gz
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.bz2
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.lz
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.xz
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.zst
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.zip
Add 'nixpkgs/' from commit 'abf060725d7614bd3b9f96764262dfbc2f9c2199'
git-subtree-dir: nixpkgs
git-subtree-mainline: 4e31070265257dc67d120c27e0f75c2344fdfa9a
git-subtree-split: abf060725d7614bd3b9f96764262dfbc2f9c2199
Diffstat (limited to 'nixpkgs/pkgs/applications/networking/p2p/twister')
-rw-r--r--nixpkgs/pkgs/applications/networking/p2p/twister/default.nix72
1 files changed, 72 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/applications/networking/p2p/twister/default.nix b/nixpkgs/pkgs/applications/networking/p2p/twister/default.nix
new file mode 100644
index 000000000000..cce44521a620
--- /dev/null
+++ b/nixpkgs/pkgs/applications/networking/p2p/twister/default.nix
@@ -0,0 +1,72 @@
+{ stdenv, fetchurl, fetchpatch, autoconf, automake, libtool, pkgconfig, python2
+, 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 = "01e7f7ca9b7e42ed90f91bc42da2c909ca5c0b9b";
+      sha256 = "0scjbin6s1kmi0bqq0dx0qyjw4n5xgmj567n0156i39f9h0dabqy";
+    };
+  };
+
+  boostPython = boost.override { enablePython = true; };
+
+in stdenv.mkDerivation rec {
+  name = "twister-${version}";
+  version = "0.9.34";
+
+  src = fetchurl {
+    url = "https://github.com/miguelfreitas/twister-core/"
+        + "archive/v${version}.tar.gz";
+    sha256 = "1bi8libivd9y2bn9fc7vbc5q0jnal0pykpzgri6anqaww22y58jq";
+  };
+
+  configureFlags = [
+    "--with-libgeoip"
+    "--with-libiconv"
+    "--disable-deprecated-functions"
+    "--enable-tests"
+    "--enable-python-binding"
+    "--with-boost-libdir=${boostPython.out}/lib"
+  ];
+
+  nativeBuildInputs = [ pkgconfig ];
+  buildInputs = [
+    autoconf automake libtool python2
+    boostPython db openssl geoip miniupnpc libiconv
+  ];
+
+  patches = stdenv.lib.singleton (fetchpatch {
+    url = "https://github.com/miguelfreitas/twister-core/commit/"
+        + "dd4f5a176958ea6ed855dc3fcef79680c1c0c92c.patch";
+    sha256 = "06fgmqnjyl83civ3ixiq673k8zjgm8n2w4w46nsh810nprqim8s6";
+  });
+
+  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;
+    platforms = stdenv.lib.platforms.linux;
+  };
+}