diff --git a/nixos/modules/misc/ids.nix b/nixos/modules/misc/ids.nix index dc5d1b7a6d23..d28624c4326f 100644 --- a/nixos/modules/misc/ids.nix +++ b/nixos/modules/misc/ids.nix @@ -155,6 +155,7 @@ consul = 145; mailpile = 146; redmine = 147; + seeks = 148; prosody = 148; @@ -279,6 +280,7 @@ uhub = 142; mailpile = 146; redmine = 147; + seeks = 148; prosody = 148; diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 35706f874ce0..17d3140b087f 100755 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -259,6 +259,7 @@ ./services/networking/rpcbind.nix ./services/networking/sabnzbd.nix ./services/networking/searx.nix + ./services/networking/seeks.nix ./services/networking/spiped.nix ./services/networking/ssh/lshd.nix ./services/networking/ssh/sshd.nix diff --git a/nixos/modules/services/networking/seeks.nix b/nixos/modules/services/networking/seeks.nix new file mode 100644 index 000000000000..155ecbb98ef3 --- /dev/null +++ b/nixos/modules/services/networking/seeks.nix @@ -0,0 +1,75 @@ +{ config, lib, pkgs, ... }: + +with lib; + +let + + cfg = config.services.seeks; + + confDir = cfg.confDir; + + seeks = pkgs.seeks.override { seeks_confDir = confDir; }; + +in + +{ + + ###### interface + + options = { + + services.seeks = { + + enable = mkOption { + default = false; + type = types.bool; + description = " + Whether to enable the Seeks server. + "; + }; + + confDir = mkOption { + default = ""; + type = types.str; + description = " + The Seeks server configuration. If it is not specified, + a default configuration is used (${seeks}/etc/seeks). + "; + }; + + }; + + }; + + + ###### implementation + + config = mkIf config.services.seeks.enable { + + users.extraUsers.seeks = + { uid = config.ids.uids.seeks; + description = "Seeks user"; + createHome = true; + home = "/var/lib/seeks"; + }; + + users.extraGroups.seeks = + { gid = config.ids.gids.seeks; + }; + + systemd.services.seeks = + { + description = "Seeks server, the p2p search engine."; + after = [ "network.target" ]; + wantedBy = [ "multi-user.target" ]; + serviceConfig = { + User = "seeks"; + ExecStart = "${seeks}/bin/seeks"; + }; + }; + + environment.systemPackages = [ seeks ]; + + }; + +} diff --git a/pkgs/tools/networking/p2p/seeks/default.nix b/pkgs/tools/networking/p2p/seeks/default.nix index 8c707e2fcc72..91dcf1bbd007 100644 --- a/pkgs/tools/networking/p2p/seeks/default.nix +++ b/pkgs/tools/networking/p2p/seeks/default.nix @@ -1,28 +1,44 @@ -{ fetchurl, stdenv, zlib, docbook2x, pcre, curl, libxml2, libevent, perl -, pkgconfig, protobuf, tokyocabinet, tokyotyrant, opencv +{ fetchgit, stdenv, zlib, docbook2x, pcre, curl, libxml2, libevent, perl +, pkgconfig, protobuf, tokyocabinet, tokyotyrant, opencv, autoconf, automake +, libtool, seeks_confDir ? "" }: -let version = "0.4.1"; in stdenv.mkDerivation { - name = "seeks-${version}"; + name = "seeks-0.4.1"; - src = fetchurl { - url = "mirror://sourceforge/seeks/hippy/seeks-${version}.tar.gz"; - sha256 = "1ppbbjw1zffxxhyvy64xwsff9xlw9wigqb7qwq5iw5mhbblz545q"; + 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 + protobuf tokyocabinet tokyotyrant opencv autoconf automake libtool ]; configureFlags = [ # Enable the built-in web server providing a web search interface. - # See . "--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 . doCheck = false; @@ -44,8 +60,10 @@ stdenv.mkDerivation { homepage = http://www.seeks-project.info/; - maintainers = [ stdenv.lib.maintainers.ludo ]; + maintainers = [ + stdenv.lib.maintainers.ludo + stdenv.lib.maintainers.matejc + ]; platforms = stdenv.lib.platforms.gnu; # arbitrary choice - hydraPlatforms = []; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index fd93c5f0eb14..4a427b2fc23b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -10195,9 +10195,7 @@ let seafile-client = callPackage ../applications/networking/seafile-client { }; - seeks = callPackage ../tools/networking/p2p/seeks { - opencv = opencv_2_1; - }; + seeks = callPackage ../tools/networking/p2p/seeks { }; seg3d = callPackage ../applications/graphics/seg3d { wxGTK = wxGTK28.override { unicode = false; };