summary refs log tree commit diff
path: root/pkgs/tools/networking/p2p/seeks/default.nix
blob: 91dcf1bbd007d9f018d1d2323380e3ef2aa448d6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
{ fetchgit, stdenv, zlib, docbook2x, pcre, curl, libxml2, libevent, perl
, pkgconfig, protobuf, tokyocabinet, tokyotyrant, opencv, autoconf, automake
, libtool, seeks_confDir ? ""
}:

stdenv.mkDerivation {
  name = "seeks-0.4.1";

  src = fetchgit {
    url = "git://github.com/beniz/seeks.git";
    rev = "1168b3a2f3111c3fca31dd961135194c3e8df5fd";
    sha256 = "159k9fk1ry8cybrq38jxm1qyxks9hlkfz624hzwxlzah6xb2j8a4";
  };

  buildInputs =
    [ zlib docbook2x pcre curl libxml2 libevent perl pkgconfig
      protobuf tokyocabinet tokyotyrant opencv autoconf automake libtool
    ];

  configureFlags =
    [ # Enable the built-in web server providing a web search interface.
      "--enable-httpserv-plugin=yes"
      "--with-libevent=${libevent}"
    ];

  preConfigure = ''
    ./autogen.sh
  '';

  postInstall = stdenv.lib.optionalString (seeks_confDir != "") ''
    ln -svf ${seeks_confDir}/config $out/etc/seeks/config
    ln -svf ${seeks_confDir}/cf-config $out/etc/seeks/cf-config
    ln -svf ${seeks_confDir}/httpserv-config $out/etc/seeks/httpserv-config
    ln -svf ${seeks_confDir}/img-websearch-config $out/etc/seeks/img-websearch-config
    ln -svf ${seeks_confDir}/lsh-config $out/etc/seeks/lsh-config
    ln -svf ${seeks_confDir}/query-capture-config $out/etc/seeks/query-capture-config
    ln -svf ${seeks_confDir}/udb-service-config $out/etc/seeks/udb-service-config
    ln -svf ${seeks_confDir}/uri-capture-config $out/etc/seeks/uri-capture-config
    ln -svf ${seeks_confDir}/websearch-config $out/etc/seeks/websearch-config
  '';

  # FIXME: Test suite needs <https://code.google.com/p/googletest/>.
  doCheck = false;

  meta = {
    description = "Seeks, a social web search engine";

    longDescription =
      '' Seeks is a free and open technical design and application for
         enabling social websearch.  Its specific purpose is to regroup users
         whose queries are similar so they can share both the query results
         and their experience on these results.  On this basis, Seeks allows
         for true real-time, decentralized, websearch to emerge.

         In the long term, there is no need for web crawlers and third-party
         web indexes as users can push content directly to search groups.
      '';

    license = stdenv.lib.licenses.agpl3Plus;

    homepage = http://www.seeks-project.info/;

    maintainers = [
      stdenv.lib.maintainers.ludo
      stdenv.lib.maintainers.matejc
    ];
    platforms = stdenv.lib.platforms.gnu;  # arbitrary choice
  };
}