diff options
author | Andrew Marshall <andrew@johnandrewmarshall.com> | 2023-05-09 18:34:50 -0400 |
---|---|---|
committer | Andrew Marshall <andrew@johnandrewmarshall.com> | 2023-05-20 19:32:46 -0400 |
commit | b38795a22e1028127a9e2f2be1c8d9b11d31bd26 (patch) | |
tree | de70959408cda2efac383b24288bb968b629e33f /pkgs/tools/security/bitwarden | |
parent | baecc1d300981a61242e656118cee33ca141fe24 (diff) | |
download | nixpkgs-b38795a22e1028127a9e2f2be1c8d9b11d31bd26.tar nixpkgs-b38795a22e1028127a9e2f2be1c8d9b11d31bd26.tar.gz nixpkgs-b38795a22e1028127a9e2f2be1c8d9b11d31bd26.tar.bz2 nixpkgs-b38795a22e1028127a9e2f2be1c8d9b11d31bd26.tar.lz nixpkgs-b38795a22e1028127a9e2f2be1c8d9b11d31bd26.tar.xz nixpkgs-b38795a22e1028127a9e2f2be1c8d9b11d31bd26.tar.zst nixpkgs-b38795a22e1028127a9e2f2be1c8d9b11d31bd26.zip |
bitwarden: update to use Node 18
- Backport patch from Bitwarden master to achieve this as they have done (unreleased) upgrade 16→18, and have several other changes along with it. We want this now because Node 16 is being marked insecure soon for NixOS 23.05; see https://github.com/NixOS/nixpkgs/pull/229910. - These changes should be in the next release in a few weeks - `npm bin` no longer exists, use `npm exec` instead
Diffstat (limited to 'pkgs/tools/security/bitwarden')
-rw-r--r-- | pkgs/tools/security/bitwarden/default.nix | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/pkgs/tools/security/bitwarden/default.nix b/pkgs/tools/security/bitwarden/default.nix index f3a98cc6d55..2785a4d928a 100644 --- a/pkgs/tools/security/bitwarden/default.nix +++ b/pkgs/tools/security/bitwarden/default.nix @@ -4,6 +4,7 @@ , dbus , electron , fetchFromGitHub +, fetchpatch , glib , gnome , gtk3 @@ -12,7 +13,7 @@ , makeDesktopItem , makeWrapper , moreutils -, nodejs_16 +, nodejs_18 , pkg-config , python3 , rustPlatform @@ -23,7 +24,7 @@ let description = "A secure and free password manager for all of your devices"; icon = "bitwarden"; - buildNpmPackage' = buildNpmPackage.override { nodejs = nodejs_16; }; + buildNpmPackage' = buildNpmPackage.override { nodejs = nodejs_18; }; version = "2023.4.0"; src = applyPatches { @@ -34,7 +35,13 @@ let sha256 = "sha256-TTKDl6Py3k+fAy/kcyiMbAAKQdhVnZTyRXV8D/VpKBE="; }; - patches = [ ]; + patches = [ + # Bump electron to 24 and node to 18 + (fetchpatch { + url = "https://github.com/bitwarden/clients/pull/5205.patch"; + hash = "sha256-sKSrh8RHXtxGczyZScjTeiGZgTZCQ7f45ULj/j9cp6M="; + }) + ]; }; desktop-native = rustPlatform.buildRustPackage { @@ -94,7 +101,7 @@ buildNpmPackage' { npmBuildFlags = [ "--workspace apps/desktop" ]; - npmDepsHash = "sha256-Y7yGM1poNMALipa0mr/iiTLP1zk3K1BqVBdopy6f6fE="; + npmDepsHash = "sha256-UXDn09qyM8GwfUiWLDhhyrGFZeKtTRmQArstw+tm5iE="; ELECTRON_SKIP_BINARY_DOWNLOAD = "1"; @@ -114,7 +121,7 @@ buildNpmPackage' { postBuild = '' pushd apps/desktop - "$(npm bin)"/electron-builder \ + npm exec electron-builder -- \ --dir \ -c.electronDist=${electron}/lib/electron \ -c.electronVersion=${electron.version} |