nixpkgs/pkgs/servers/syncstorage-rs/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

71 lines
1.4 KiB
Nix
Raw Normal View History

2022-06-08 04:26:03 +02:00
{ 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";
2023-03-08 19:48:30 +01:00
version = "0.13.6";
2022-06-08 04:26:03 +02:00
src = fetchFromGitHub {
owner = "mozilla-services";
repo = pname;
2023-03-04 22:55:40 +01:00
rev = "refs/tags/${version}";
2023-03-08 19:48:30 +01:00
hash = "sha256-LCMbhFoxi/fYaivW5gNyDhfytW/avhrrd29fXobSxJU=";
2022-06-08 04:26:03 +02:00
};
nativeBuildInputs = [
cmake
makeBinaryWrapper
pkg-config
python3
];
buildInputs = [
libmysqlclient
openssl
];
preFixup = ''
wrapProgram $out/bin/syncserver \
2022-06-08 04:26:03 +02:00
--prefix PATH : ${lib.makeBinPath [ pyFxADeps ]}
'';
cargoLock = {
lockFile = ./Cargo.lock;
outputHashes = {
"deadpool-0.5.2" = "sha256-V3v03t8XWA6rA8RaNunq2kh2U+6Lc2C2moKdaF2bmEc=";
};
};
2022-06-08 04:26:03 +02:00
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";
2023-03-04 22:55:40 +01:00
changelog = "https://github.com/mozilla-services/syncstorage-rs/releases/tag/${version}";
2022-06-08 04:26:03 +02:00
license = lib.licenses.mpl20;
maintainers = with lib.maintainers; [ pennae ];
platforms = lib.platforms.linux;
2022-06-08 04:26:03 +02:00
};
}