migrate to build against nixos-unstable

This commit is contained in:
Trolli Schmittlauch 2019-12-30 01:46:04 +01:00
parent b3d869e847
commit 62a1cd9cf5
2 changed files with 29 additions and 17 deletions

View file

@ -1,25 +1,37 @@
import (<nixos-unstable> + /nixos/tests/make-test-python.nix) { import (<nixos-unstable/nixos/tests/make-test-python.nix>) {
nodes = nodes =
{ {
server = server =
{ config, pkgs, ...}: { config, pkgs, ...}:
{ {
imports = [
<nixpkgs/nixos/modules/profiles/minimal.nix>
<nixpkgs/nixos/modules/profiles/qemu-guest.nix>
./mod-seafile-server.nix
];
nixpkgs.overlays = [ nixpkgs.overlays = [
(import /home/spiollinux/nixconfigs/home/ov/seafile-overlay) (import ./default.nix)
]; ];
i18n.consoleKeyMap = "de"; i18n.consoleKeyMap = "de";
users.mutableUsers = false; users.mutableUsers = false;
users.users.asdtest = { users.users.test = {
isNormalUser = true; isNormalUser = true;
extraGroups = [ "wheel" ]; extraGroups = [ "wheel" ];
#hashedPassword = "$6$SZCzE/xB$Hr9sfsJ7xAcBCoptG39cxxQk8RZfldDjjGpSngOvn9Ufex5dHBEbdncXRZnfrGATsGcYPvLi7m4wIu.f8tY9B.";
password = ""; password = "";
home = "/srv/test"; home = "/home/test";
createHome = false; createHome = true;
}; };
# Seafile
services.seafile-server = {
enable = true;
#autorun = false;
domainName = "localhost";
};
}; };
client = {}; client = {};
}; };
@ -27,6 +39,6 @@ import (<nixos-unstable> + /nixos/tests/make-test-python.nix) {
'' ''
print("foo") print("foo")
server.start() server.start()
server.wait_for_unit("seafile.service") server.wait_for_unit("seafile-server.service")
''; '';
} }

View file

@ -1,5 +1,5 @@
{ stdenv, lib, fetchFromGitHub, { 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 # for SeaHub
python3, python3Packages }: python3, python3Packages }:
@ -94,7 +94,7 @@
inherit version; inherit version;
buildInputs = [ seahub seafile-server-core ccnet-server libsearpc ] buildInputs = [ seahub seafile-server-core ccnet-server libsearpc ]
++ lib.optional withMysql libmysql; ++ lib.optional withMysql libmysqlclient;
phases = [ "installPhase" "fixupPhase" "distPhase" ]; phases = [ "installPhase" "fixupPhase" "distPhase" ];
# todo: create data directory in /srv in activation script # todo: create data directory in /srv in activation script
installPhase = '' installPhase = ''