Skip to content

Commit

Permalink
Merge pull request NixOS#272541 from dotlambda/bitwarden-2023.12.0
Browse files Browse the repository at this point in the history
bitwarden: 2023.10.1 -> 2023.12.0
  • Loading branch information
dotlambda authored Dec 10, 2023
2 parents d0e46f2 + 47a92aa commit 7eb0ff5
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
6 changes: 3 additions & 3 deletions pkgs/tools/security/bitwarden/cli.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,18 @@

buildNpmPackage rec {
pname = "bitwarden-cli";
version = "2023.10.0";
version = "2023.12.0";

src = fetchFromGitHub {
owner = "bitwarden";
repo = "clients";
rev = "cli-v${version}";
hash = "sha256-egXToXWfb9XV7JuCRBYJO4p/e+WOwMncPKz0oBgeALQ=";
hash = "sha256-WYhLKV3j3Ktite5u1H4fSku38hCCrMzKoxtjq6aT9yo=";
};

nodejs = nodejs_18;

npmDepsHash = "sha256-iO8ZozVl1vOOqowQARnRJWSFUFnau46+dKfcMSkyU3o=";
npmDepsHash = "sha256-bnYpvHO9Pnob+MbrSshv03mSwXCADH/2xw33nLVKMdg=";

nativeBuildInputs = [
python3
Expand Down
18 changes: 10 additions & 8 deletions pkgs/tools/security/bitwarden/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
, cargo
, copyDesktopItems
, dbus
, electron_25
, electron_26
, fetchFromGitHub
, fetchpatch2
, glib
Expand All @@ -25,16 +25,16 @@
let
description = "A secure and free password manager for all of your devices";
icon = "bitwarden";
electron = electron_25;
electron = electron_26;
in buildNpmPackage rec {
pname = "bitwarden";
version = "2023.10.1";
version = "2023.12.0"; # TODO add back Electron version check below

src = fetchFromGitHub {
owner = "bitwarden";
repo = "clients";
rev = "desktop-v${version}";
hash = "sha256-cwSIMN40d1ySUSxBl8jXLVndnJJvPnLiTxkYnA3Pqws=";
hash = "sha256-WYhLKV3j3Ktite5u1H4fSku38hCCrMzKoxtjq6aT9yo=";
};

patches = [
Expand All @@ -49,14 +49,14 @@ in buildNpmPackage rec {

makeCacheWritable = true;
npmWorkspace = "apps/desktop";
npmDepsHash = "sha256-KN8C9Y0tfhHVagk+CUMpI/bIRChhzxC9M27HkU4aTEc=";
npmDepsHash = "sha256-bnYpvHO9Pnob+MbrSshv03mSwXCADH/2xw33nLVKMdg=";

cargoDeps = rustPlatform.fetchCargoTarball {
name = "${pname}-${version}";
inherit patches src;
patchFlags = [ "-p4" ];
sourceRoot = "${src.name}/${cargoRoot}";
hash = "sha256-AmtdmOR3aZJTZiFbkwRXjeTOJdcN40bTmWx4Ss3JNJ8=";
hash = "sha256-pCy3hGhI3mXm4uTOaFMykOzJqK2PC0t0hE8MrJKtA/k=";
};
cargoRoot = "apps/desktop/desktop_native";

Expand All @@ -82,12 +82,14 @@ in buildNpmPackage rec {
libsecret
];

preBuild = ''
# FIXME add back once upstream moves to Electron >= 26
# we use electron_26 because electron_25 is EOL
/*preBuild = ''
if [[ $(jq --raw-output '.devDependencies.electron' < package.json | grep -E --only-matching '^[0-9]+') != ${lib.escapeShellArg (lib.versions.major electron.version)} ]]; then
echo 'ERROR: electron version mismatch'
exit 1
fi
'';
'';*/

postBuild = ''
pushd apps/desktop
Expand Down

0 comments on commit 7eb0ff5

Please sign in to comment.