summary refs log tree commit diff
path: root/pkgs/servers/syncserver/default.nix
blob: 24c093fde50500b8c98f11dfd8bc8bfacc21b7a8 (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
{ 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 ];
  };
}