depot/third_party/nixpkgs/pkgs/tools/security/bitwarden/cli.nix
Default email 2c76a4cb41 Project import generated by Copybara.
GitOrigin-RevId: c757e9bd77b16ca2e03c89bf8bc9ecb28e0c06ad
2023-11-16 04:20:00 +00:00

52 lines
1.1 KiB
Nix

{ lib
, stdenv
, buildNpmPackage
, nodejs_18
, fetchFromGitHub
, python3
, darwin
, nixosTests
}:
buildNpmPackage rec {
pname = "bitwarden-cli";
version = "2023.10.0";
src = fetchFromGitHub {
owner = "bitwarden";
repo = "clients";
rev = "cli-v${version}";
hash = "sha256-egXToXWfb9XV7JuCRBYJO4p/e+WOwMncPKz0oBgeALQ=";
};
nodejs = nodejs_18;
npmDepsHash = "sha256-iO8ZozVl1vOOqowQARnRJWSFUFnau46+dKfcMSkyU3o=";
nativeBuildInputs = [
python3
] ++ lib.optionals stdenv.isDarwin [
darwin.cctools
];
makeCacheWritable = true;
env.ELECTRON_SKIP_BINARY_DOWNLOAD = "1";
npmBuildScript = "build:prod";
npmWorkspace = "apps/cli";
passthru.tests = {
vaultwarden = nixosTests.vaultwarden.sqlite;
};
meta = with lib; {
changelog = "https://github.com/bitwarden/clients/releases/tag/${src.rev}";
description = "A secure and free password manager for all of your devices";
homepage = "https://bitwarden.com";
license = lib.licenses.gpl3Only;
mainProgram = "bw";
maintainers = with maintainers; [ dotlambda ];
};
}