diff options
author | pennae <github@quasiparticle.net> | 2022-06-08 04:26:03 +0200 |
---|---|---|
committer | pennae <github@quasiparticle.net> | 2022-07-27 14:54:35 +0200 |
commit | fd184d63e92958f3ec4d9472d52d079fc800c153 (patch) | |
tree | 59da4112d8a94d4c7f921a26e9276434a38bc2ce /pkgs/servers/syncstorage-rs | |
parent | 97bdf4893d643e47d2bd62e9a2ec77c16ead6b9f (diff) |
syncstorage-rs: init at 0.11.0
Diffstat (limited to 'pkgs/servers/syncstorage-rs')
-rw-r--r-- | pkgs/servers/syncstorage-rs/default.nix | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/pkgs/servers/syncstorage-rs/default.nix b/pkgs/servers/syncstorage-rs/default.nix new file mode 100644 index 0000000000000..17a7bb799fdf1 --- /dev/null +++ b/pkgs/servers/syncstorage-rs/default.nix @@ -0,0 +1,63 @@ +{ fetchFromGitHub +, rustPlatform +, pkg-config +, python3 +, openssl +, cmake +, libmysqlclient +, makeBinaryWrapper +, lib +}: + +let + pyFxADeps = python3.withPackages (p: [ + p.setuptools # imports pkg_resources + # remainder taken from requirements.txt + p.pyfxa + p.tokenlib + p.cryptography + ]); +in + +rustPlatform.buildRustPackage rec { + pname = "syncstorage-rs"; + version = "0.12.0"; + + src = fetchFromGitHub { + owner = "mozilla-services"; + repo = pname; + rev = version; + hash = "sha256-VfIpjpBS7LXe32fxIFp7xmbm40VwxUdHIEm5PnMpd4s="; + }; + + nativeBuildInputs = [ + cmake + makeBinaryWrapper + pkg-config + python3 + ]; + + buildInputs = [ + libmysqlclient + openssl + ]; + + preFixup = '' + wrapProgram $out/bin/syncstorage \ + --prefix PATH : ${lib.makeBinPath [ pyFxADeps ]} + ''; + + cargoSha256 = "sha256-JXxArKA/2SIYJvjNA1yZHR9xDKt3N2U7HVMP/6M3BxE="; + + buildFeatures = [ "grpcio/openssl" ]; + + # almost all tests need a DB to test against + doCheck = false; + + meta = { + description = "Mozilla Sync Storage built with Rust"; + homepage = "https://github.com/mozilla-services/syncstorage-rs"; + license = lib.licenses.mpl20; + maintainers = with lib.maintainers; [ pennae ]; + }; +} |