2019-05-12 15:54:30 +01:00
|
|
|
{ stdenv, rustPlatform, fetchFromGitHub, pkgconfig, openssl, Security, CoreServices }:
|
2019-04-23 20:25:46 +01:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "bitwarden_rs";
|
2019-07-30 22:37:55 +01:00
|
|
|
version = "1.9.1";
|
2019-04-23 20:25:46 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "dani-garcia";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2019-07-30 22:37:55 +01:00
|
|
|
sha256 = "0jfb4b2lp2v01aw615lx0qj1qh73hyrbjn9kva7zqp74wcfw12gp";
|
2019-04-23 20:25:46 +01:00
|
|
|
};
|
|
|
|
|
2019-07-30 22:37:55 +01:00
|
|
|
cargoPatches = [
|
|
|
|
# type annotations required: cannot resolve `std::string::String: std::convert::AsRef<_>`
|
|
|
|
./cargo-lock-lettre.patch
|
|
|
|
];
|
|
|
|
|
2019-05-12 10:26:11 +01:00
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
2019-05-12 15:54:30 +01:00
|
|
|
buildInputs = [ openssl ] ++ stdenv.lib.optionals stdenv.isDarwin [ Security CoreServices ];
|
2019-04-23 20:25:46 +01:00
|
|
|
|
|
|
|
RUSTC_BOOTSTRAP = 1;
|
|
|
|
|
2019-07-30 22:37:55 +01:00
|
|
|
cargoSha256 = "0p39gqrqdmgqhngp1qyh6jl0sp0ifj5n3bxfqafjbspb4zph3ls4";
|
2019-04-23 20:25:46 +01:00
|
|
|
|
2019-05-12 15:54:30 +01:00
|
|
|
meta = with stdenv.lib; {
|
2019-04-23 20:25:46 +01: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;
|
|
|
|
};
|
|
|
|
}
|