2023-08-04 22:07:22 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, buildNpmPackage
|
|
|
|
, nodejs_18
|
|
|
|
, fetchFromGitHub
|
|
|
|
, python3
|
|
|
|
, darwin
|
|
|
|
, nixosTests
|
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
buildNpmPackage' = buildNpmPackage.override { nodejs = nodejs_18; };
|
|
|
|
in buildNpmPackage' rec {
|
|
|
|
pname = "bitwarden-cli";
|
2023-10-19 13:55:26 +00:00
|
|
|
version = "2023.9.1";
|
2023-08-04 22:07:22 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "bitwarden";
|
|
|
|
repo = "clients";
|
|
|
|
rev = "cli-v${version}";
|
2023-10-19 13:55:26 +00:00
|
|
|
hash = "sha256-1dyrjEhcZDrA89rEvGg16f/MI8oNPPF4lwgGQQF9huE=";
|
2023-08-04 22:07:22 +00:00
|
|
|
};
|
|
|
|
|
2023-10-19 13:55:26 +00:00
|
|
|
npmDepsHash = "sha256-7GgjrH5s09zwGhWPOYHLTIMSKYndq+cAG06jZ0IySOQ=";
|
2023-08-04 22:07:22 +00:00
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|