15 pname = "bitwarden-cli";
16 version = "2024.12.0";
18 src = fetchFromGitHub {
21 rev = "cli-v${version}";
22 hash = "sha256-3aN2t8/qhN0sjACvtip45efHQJl8nEMNre0+oBL1/go=";
26 # remove code under unfree license
27 rm -r bitwarden_license
32 npmDepsHash = "sha256-EtIcqbubAYN9I9wbw17oHiVshd3GtQayFtdgqWP7Pgg=";
34 nativeBuildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
40 makeCacheWritable = true;
43 ELECTRON_SKIP_BINARY_DOWNLOAD = "1";
44 npm_config_build_from_source = "true";
47 npmBuildScript = "build:oss:prod";
49 npmWorkspace = "apps/cli";
51 npmFlags = [ "--legacy-peer-deps" ];
54 # we want to build everything from source
56 rm -r node_modules/**/prebuilds
61 # remove build artifacts that bloat the closure
63 rm -r node_modules/**/{*.target.mk,binding.Makefile,config.gypi,Makefile,Release/.deps}
69 vaultwarden = nixosTests.vaultwarden.sqlite;
71 updateScript = nix-update-script {
75 "--version-regex=^cli-v(.*)$"
81 changelog = "https://github.com/bitwarden/clients/releases/tag/${src.rev}";
82 description = "Secure and free password manager for all of your devices";
83 homepage = "https://bitwarden.com";
84 license = lib.licenses.gpl3Only;
86 maintainers = with maintainers; [ dotlambda ];