nixpkgs/pkgs/tools/security/bitwarden_rs/default.nix

34 lines
1 KiB
Nix
Raw Normal View History

2019-05-12 16:54:30 +02:00
{ stdenv, rustPlatform, fetchFromGitHub, pkgconfig, openssl, Security, CoreServices }:
2019-04-23 21:25:46 +02:00
rustPlatform.buildRustPackage rec {
pname = "bitwarden_rs";
2019-07-30 23:37:55 +02:00
version = "1.9.1";
2019-04-23 21:25:46 +02:00
src = fetchFromGitHub {
owner = "dani-garcia";
repo = pname;
rev = version;
2019-07-30 23:37:55 +02:00
sha256 = "0jfb4b2lp2v01aw615lx0qj1qh73hyrbjn9kva7zqp74wcfw12gp";
2019-04-23 21:25:46 +02:00
};
2019-07-30 23:37:55 +02:00
cargoPatches = [
# type annotations required: cannot resolve `std::string::String: std::convert::AsRef<_>`
./cargo-lock-lettre.patch
];
nativeBuildInputs = [ pkgconfig ];
2019-05-12 16:54:30 +02:00
buildInputs = [ openssl ] ++ stdenv.lib.optionals stdenv.isDarwin [ Security CoreServices ];
2019-04-23 21:25:46 +02:00
RUSTC_BOOTSTRAP = 1;
2019-07-30 23:37:55 +02:00
cargoSha256 = "0p39gqrqdmgqhngp1qyh6jl0sp0ifj5n3bxfqafjbspb4zph3ls4";
2019-04-23 21:25:46 +02:00
2019-05-12 16:54:30 +02:00
meta = with stdenv.lib; {
2019-04-23 21:25:46 +02:00
description = "An unofficial lightweight implementation of the Bitwarden server API using Rust and SQLite";
homepage = https://github.com/dani-garcia/bitwarden_rs;
license = licenses.gpl3;
maintainers = with maintainers; [ msteen ];
platforms = platforms.all;
};
}