mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-20 00:53:12 +03:00
pythonPackages.syncserver: move to all-packages.nix and fix dependencies
This commit is contained in:
parent
08aa3e7f2e
commit
957d0589ad
@ -127,14 +127,16 @@ in
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
systemd.services.syncserver = let
|
||||
syncServerEnv = pkgs.python.withPackages(ps: with ps; [ syncserver pasteScript requests ]);
|
||||
user = "syncserver";
|
||||
group = "syncserver";
|
||||
in {
|
||||
after = [ "network.target" ];
|
||||
description = "Firefox Sync Server";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
path = [ pkgs.coreutils syncServerEnv ];
|
||||
path = [
|
||||
pkgs.coreutils
|
||||
(pkgs.python.withPackages (ps: [ pkgs.syncserver ps.pasteScript ps.requests ]))
|
||||
];
|
||||
|
||||
serviceConfig = {
|
||||
User = user;
|
||||
@ -166,7 +168,9 @@ in
|
||||
chown ${user}:${group} ${defaultDbLocation}
|
||||
fi
|
||||
'';
|
||||
serviceConfig.ExecStart = "${syncServerEnv}/bin/paster serve ${syncServerIni}";
|
||||
script = ''
|
||||
paster serve ${syncServerIni}
|
||||
'';
|
||||
};
|
||||
|
||||
users.users.syncserver = {
|
||||
|
@ -1,42 +0,0 @@
|
||||
{ stdenv
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
, isPy27
|
||||
, unittest2
|
||||
, cornice
|
||||
, gunicorn
|
||||
, pyramid
|
||||
, requests
|
||||
, simplejson
|
||||
, sqlalchemy
|
||||
, mozsvc
|
||||
, tokenserver
|
||||
, serversyncstorage
|
||||
, configparser
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "syncserver";
|
||||
version = "1.8.0";
|
||||
disabled = ! isPy27;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "mozilla-services";
|
||||
repo = "syncserver";
|
||||
rev = version;
|
||||
sha256 = "0hxjns9hz7a8r87iqr1yfvny4vwj1rlhwcf8bh7j6lsf92mkmgy8";
|
||||
};
|
||||
|
||||
buildInputs = [ unittest2 ];
|
||||
propagatedBuildInputs = [
|
||||
cornice gunicorn pyramid requests simplejson sqlalchemy mozsvc tokenserver
|
||||
serversyncstorage configparser
|
||||
];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Run-Your-Own Firefox Sync Server";
|
||||
homepage = "https://github.com/mozilla-services/syncserver";
|
||||
platforms = platforms.unix;
|
||||
license = licenses.mpl20;
|
||||
};
|
||||
}
|
47
pkgs/servers/syncserver/default.nix
Normal file
47
pkgs/servers/syncserver/default.nix
Normal file
@ -0,0 +1,47 @@
|
||||
{ lib
|
||||
, python2
|
||||
, fetchFromGitHub
|
||||
}:
|
||||
|
||||
let
|
||||
python = python2.override {
|
||||
packageOverrides = self: super: {
|
||||
# Older version, used by syncserver, tokenserver and serversyncstorage
|
||||
cornice = super.cornice.overridePythonAttrs (oldAttrs: rec {
|
||||
version = "0.17";
|
||||
src = oldAttrs.src.override {
|
||||
inherit version;
|
||||
sha256 = "1vvymhf6ydc885ygqiqpa39xr9v302i1l6nzirjnczqy9llyqvpj";
|
||||
};
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
# buildPythonPackage is necessary for syncserver to work with gunicorn or paster scripts
|
||||
in python.pkgs.buildPythonPackage rec {
|
||||
pname = "syncserver";
|
||||
version = "1.8.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "mozilla-services";
|
||||
repo = "syncserver";
|
||||
rev = version;
|
||||
sha256 = "0hxjns9hz7a8r87iqr1yfvny4vwj1rlhwcf8bh7j6lsf92mkmgy8";
|
||||
};
|
||||
|
||||
# There are no tests
|
||||
doCheck = false;
|
||||
|
||||
propagatedBuildInputs = with python.pkgs; [
|
||||
cornice gunicorn pyramid requests simplejson sqlalchemy mozsvc tokenserver
|
||||
serversyncstorage configparser
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Run-Your-Own Firefox Sync Server";
|
||||
homepage = https://github.com/mozilla-services/syncserver;
|
||||
platforms = platforms.unix;
|
||||
license = licenses.mpl20;
|
||||
maintainers = with maintainers; [ nadrieril ];
|
||||
};
|
||||
}
|
@ -14138,6 +14138,8 @@ in
|
||||
|
||||
systemd-journal2gelf = callPackage ../tools/system/systemd-journal2gelf { };
|
||||
|
||||
syncserver = callPackage ../servers/syncserver { };
|
||||
|
||||
inherit (callPackages ../servers/http/tomcat { })
|
||||
tomcat7
|
||||
tomcat8
|
||||
|
@ -774,8 +774,6 @@ in {
|
||||
|
||||
supervise_api = callPackage ../development/python-modules/supervise_api { };
|
||||
|
||||
syncserver = callPackage ../development/python-modules/syncserver {};
|
||||
|
||||
tables = callPackage ../development/python-modules/tables {
|
||||
hdf5 = pkgs.hdf5.override { zlib = pkgs.zlib; };
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user