diff --git a/seafile-nixos-tests.nix b/seafile-nixos-tests.nix index 223b8af..d1e404a 100644 --- a/seafile-nixos-tests.nix +++ b/seafile-nixos-tests.nix @@ -1,32 +1,44 @@ -import ( + /nixos/tests/make-test-python.nix) { +import () { nodes = { server = { config, pkgs, ...}: { + imports = [ + + + ./mod-seafile-server.nix + ]; nixpkgs.overlays = [ - (import /home/spiollinux/nixconfigs/home/ov/seafile-overlay) + (import ./default.nix) ]; i18n.consoleKeyMap = "de"; users.mutableUsers = false; - users.users.asdtest = { + users.users.test = { isNormalUser = true; extraGroups = [ "wheel" ]; - #hashedPassword = "$6$SZCzE/xB$Hr9sfsJ7xAcBCoptG39cxxQk8RZfldDjjGpSngOvn9Ufex5dHBEbdncXRZnfrGATsGcYPvLi7m4wIu.f8tY9B."; - password = ""; - home = "/srv/test"; - createHome = false; - }; + password = ""; + home = "/home/test"; + createHome = true; }; - client = {}; + + # Seafile + services.seafile-server = { + enable = true; + #autorun = false; + domainName = "localhost"; + }; + }; + client = {}; + }; testScript = - '' - print("foo") - server.start() - server.wait_for_unit("seafile.service") - ''; -} + '' + print("foo") + server.start() + server.wait_for_unit("seafile-server.service") + ''; + } diff --git a/seafile-server/default.nix b/seafile-server/default.nix index 169d7be..9874d41 100644 --- a/seafile-server/default.nix +++ b/seafile-server/default.nix @@ -1,5 +1,5 @@ { stdenv, lib, fetchFromGitHub, - autoconf, automake, autoreconfHook, pkgconfig, curl, libevent, glib, libuuid, intltool, sqlite, withMysql ? true, libmysql, libarchive, libtool, jansson, vala, fuse, openssl, libevhtp, libsearpc, which, + autoconf, automake, autoreconfHook, pkgconfig, curl, libevent, glib, libuuid, intltool, sqlite, withMysql ? true, libmysqlclient, libarchive, libtool, jansson, vala, fuse, openssl, libevhtp, libsearpc, which, # for SeaHub python3, python3Packages }: @@ -94,7 +94,7 @@ inherit version; buildInputs = [ seahub seafile-server-core ccnet-server libsearpc ] - ++ lib.optional withMysql libmysql; + ++ lib.optional withMysql libmysqlclient; phases = [ "installPhase" "fixupPhase" "distPhase" ]; # todo: create data directory in /srv in activation script installPhase = ''