evcc: 0.131.4 -> 0.131.5
[NixPkgs.git] / pkgs / by-name / sy / syncstorage-rs / package.nix
blob51dc44b14e344ebaf37f5835e3397f3a283d2495
1 { fetchFromGitHub
2 , rustPlatform
3 , pkg-config
4 , python3
5 , cmake
6 , libmysqlclient
7 , makeBinaryWrapper
8 , lib
9 , nix-update-script
12 let
13   pyFxADeps = python3.withPackages (p: [
14     p.setuptools # imports pkg_resources
15     # remainder taken from requirements.txt
16     p.pyfxa
17     p.tokenlib
18     p.cryptography
19   ]);
22 rustPlatform.buildRustPackage rec {
23   pname = "syncstorage-rs";
24   version = "0.17.12";
26   src = fetchFromGitHub {
27     owner = "mozilla-services";
28     repo = pname;
29     rev = "refs/tags/${version}";
30     hash = "sha256-hvKbKbRa5zk+80xmKWeMRjshaS6uybFzb5KdBY19Sl8=";
31   };
33   nativeBuildInputs = [
34     cmake
35     makeBinaryWrapper
36     pkg-config
37     python3
38   ];
40   buildInputs = [
41     libmysqlclient
42   ];
44   preFixup = ''
45     wrapProgram $out/bin/syncserver \
46       --prefix PATH : ${lib.makeBinPath [ pyFxADeps ]}
47   '';
49   cargoLock = {
50     lockFile = ./Cargo.lock;
51     outputHashes = {
52       "deadpool-0.7.0" = "sha256-yQwn45EuzmPBwuT+iLJ/LLWAkBkW2vF+GLswdbpFVAY=";
53       "sentry-0.34.0" = "sha256-BdWz6EIEm2YU3DG3ODkuXCVCMV6srdyx2gXkOxINjHc=";
54     };
55   };
57   # almost all tests need a DB to test against
58   doCheck = false;
60   passthru.updateScript = nix-update-script {};
62   meta = {
63     description = "Mozilla Sync Storage built with Rust";
64     homepage = "https://github.com/mozilla-services/syncstorage-rs";
65     changelog = "https://github.com/mozilla-services/syncstorage-rs/releases/tag/${version}";
66     license = lib.licenses.mpl20;
67     maintainers = [ ];
68     platforms = lib.platforms.linux;
69     mainProgram = "syncserver";
70   };