diff options
author | Mostly Void <7rat13@gmail.com> | 2023-08-07 16:06:31 +0300 |
---|---|---|
committer | Mostly Void <7rat13@gmail.com> | 2023-08-08 01:15:32 +0300 |
commit | 92f91323661546184f11b1492c2fb8e714cd62b4 (patch) | |
tree | 07d5ba97bc4430009a273138ed7c7475ba049f50 /pkgs/tools/security/bws | |
parent | 0546c70849185664031cd6bb3f6b57e477fe1487 (diff) |
bws: init at 0.3.0
Diffstat (limited to 'pkgs/tools/security/bws')
-rw-r--r-- | pkgs/tools/security/bws/default.nix | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/pkgs/tools/security/bws/default.nix b/pkgs/tools/security/bws/default.nix new file mode 100644 index 0000000000000..5c3987319109b --- /dev/null +++ b/pkgs/tools/security/bws/default.nix @@ -0,0 +1,53 @@ +{ lib +, rustPlatform +, fetchFromGitHub +, pkg-config +, oniguruma +, openssl +, stdenv +, darwin +, python3 +}: + +rustPlatform.buildRustPackage rec { + pname = "bws"; + version = "0.3.0"; + + src = fetchFromGitHub { + owner = "bitwarden"; + repo = "sdk"; + rev = "bws-v${version}"; + hash = "sha256-o+tmO9E881futhA/fN6+EX2yEBKnKUmKk/KilIt5vYY="; + }; + + cargoHash = "sha256-nmsAfXNn1nqmqHzGD7jl2JNrif/nJycCJZWZYjv7G4c="; + + nativeBuildInputs = [ + pkg-config + ]; + + buildInputs = + [ + oniguruma + openssl + ] + ++ lib.optionals stdenv.isDarwin [ + darwin.apple_sdk.frameworks.Security + ]; + + env = { + PYO3_PYTHON = "${python3}/bin/python3"; + RUSTONIG_SYSTEM_LIBONIG = true; + }; + + buildAndTestSubdir = "crates/bws"; + + meta = { + changelog = "https://github.com/bitwarden/sdk/blob/${src.rev}/CHANGELOG.md"; + description = "Bitwarden Secrets Manager CLI"; + homepage = "https://github.com/bitwarden/sdk"; + license = lib.licenses.unfree; # BITWARDEN SOFTWARE DEVELOPMENT KIT LICENSE AGREEMENT + mainProgram = "bws"; + maintainers = with lib.maintainers; [ dit7ya ]; + }; +} |