nixpkgs/pkgs/by-name/sy/syncstorage-rs/package.nix
pennae 9b8fb7115d syncstorage-rs: 0.15.1 -> 0.15.2
changlog: https://github.com/mozilla-services/syncstorage-rs/releases/tag/0.15.2

not sure how relevant these are for nixos-centric use; the security fix
definitely is not (as it affects only windows).
2024-04-17 16:25:31 +02:00

67 lines
1.4 KiB
Nix

{ fetchFromGitHub
, rustPlatform
, pkg-config
, python3
, 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.15.2";
src = fetchFromGitHub {
owner = "mozilla-services";
repo = pname;
rev = "refs/tags/${version}";
hash = "sha256-YKWXr10cVOqQm6XvugwarE3I1gtAyLOlUqPGbLDhHxY=";
};
nativeBuildInputs = [
cmake
makeBinaryWrapper
pkg-config
python3
];
buildInputs = [
libmysqlclient
];
preFixup = ''
wrapProgram $out/bin/syncserver \
--prefix PATH : ${lib.makeBinPath [ pyFxADeps ]}
'';
cargoLock = {
lockFile = ./Cargo.lock;
outputHashes = {
"deadpool-0.7.0" = "sha256-yQwn45EuzmPBwuT+iLJ/LLWAkBkW2vF+GLswdbpFVAY=";
};
};
# 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";
changelog = "https://github.com/mozilla-services/syncstorage-rs/releases/tag/${version}";
license = lib.licenses.mpl20;
maintainers = with lib.maintainers; [ pennae ];
platforms = lib.platforms.linux;
mainProgram = "syncserver";
};
}