nixpkgs/pkgs/tools/security/bitwarden/cli.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

53 lines
1.1 KiB
Nix
Raw Normal View History

2023-03-01 03:10:57 +00:00
{ lib
, stdenv
, buildNpmPackage
, nodejs_18
, fetchFromGitHub
, python3
, darwin
2023-07-25 18:20:13 +00:00
, nixosTests
2023-03-01 03:10:57 +00:00
}:
let
buildNpmPackage' = buildNpmPackage.override { nodejs = nodejs_18; };
in buildNpmPackage' rec {
pname = "bitwarden-cli";
version = "2023.8.2";
2023-03-01 03:10:57 +00:00
src = fetchFromGitHub {
owner = "bitwarden";
repo = "clients";
rev = "cli-v${version}";
hash = "sha256-v9ql01dwWf9kBxw75n9svQousrnbUi8NY1wkJx06teg=";
2023-03-01 03:10:57 +00:00
};
npmDepsHash = "sha256-RvkauNvt6MZxWMssEtaCjXP1z/3NsReywUgCefV/jjM=";
2023-03-01 03:10:57 +00:00
nativeBuildInputs = [
python3
] ++ lib.optionals stdenv.isDarwin [
darwin.cctools
];
makeCacheWritable = true;
env.ELECTRON_SKIP_BINARY_DOWNLOAD = "1";
npmBuildScript = "build:prod";
npmWorkspace = "apps/cli";
2023-07-25 18:20:13 +00:00
passthru.tests = {
vaultwarden = nixosTests.vaultwarden.sqlite;
};
2023-03-01 03:10:57 +00:00
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 ];
};
}