diff options
author | Alyssa Ross <hi@alyssa.is> | 2024-03-24 11:04:41 +0100 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2024-03-24 11:04:41 +0100 |
commit | 5423cabbbf2b6dec5568f1ecabd288d5d9a642ec (patch) | |
tree | f316a6a921bfefd3a63bd4502c2eb50ff1644f67 /nixpkgs/pkgs/by-name/sy/syncstorage-rs/package.nix | |
parent | 46a88117a05c3469af5d99433af140c3de8ca088 (diff) | |
parent | 8aa81f34981add12aecada6c702ddbbd0375ca36 (diff) | |
download | nixlib-5423cabbbf2b6dec5568f1ecabd288d5d9a642ec.tar nixlib-5423cabbbf2b6dec5568f1ecabd288d5d9a642ec.tar.gz nixlib-5423cabbbf2b6dec5568f1ecabd288d5d9a642ec.tar.bz2 nixlib-5423cabbbf2b6dec5568f1ecabd288d5d9a642ec.tar.lz nixlib-5423cabbbf2b6dec5568f1ecabd288d5d9a642ec.tar.xz nixlib-5423cabbbf2b6dec5568f1ecabd288d5d9a642ec.tar.zst nixlib-5423cabbbf2b6dec5568f1ecabd288d5d9a642ec.zip |
Merge branch 'nixos-unstable-small' of https://github.com/NixOS/nixpkgs
Diffstat (limited to 'nixpkgs/pkgs/by-name/sy/syncstorage-rs/package.nix')
-rw-r--r-- | nixpkgs/pkgs/by-name/sy/syncstorage-rs/package.nix | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/by-name/sy/syncstorage-rs/package.nix b/nixpkgs/pkgs/by-name/sy/syncstorage-rs/package.nix new file mode 100644 index 000000000000..097ada49f33c --- /dev/null +++ b/nixpkgs/pkgs/by-name/sy/syncstorage-rs/package.nix @@ -0,0 +1,67 @@ +{ 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.1"; + + src = fetchFromGitHub { + owner = "mozilla-services"; + repo = pname; + rev = "refs/tags/${version}"; + hash = "sha256-uQaiBxK+dV/AgMlKbFUvHV7bUUGX6gpypImCat7H4S8="; + }; + + 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"; + }; +} |