Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 5 additions & 12 deletions pkgs/tools/security/bitwarden/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
, dbus
, electron_24
, fetchFromGitHub
, fetchpatch
, glib
, gnome
, gtk3
Expand All @@ -27,29 +26,23 @@ let
buildNpmPackage' = buildNpmPackage.override { nodejs = nodejs_18; };
electron = electron_24;

version = "2023.4.0";
version = "2023.5.0";
src = applyPatches {
src = fetchFromGitHub {
owner = "bitwarden";
repo = "clients";
rev = "desktop-v${version}";
sha256 = "sha256-TTKDl6Py3k+fAy/kcyiMbAAKQdhVnZTyRXV8D/VpKBE=";
sha256 = "sha256-ELKpGSY4ZbgSk4vJnTiB+IOa8RQU8Ahy3A1mYsKtthU=";
};

patches = [
# Bump electron to 24 and node to 18
(fetchpatch {
url = "https://github.com/bitwarden/clients/pull/5205.patch";
hash = "sha256-sKSrh8RHXtxGczyZScjTeiGZgTZCQ7f45ULj/j9cp6M=";
})
];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can remove the fetchpatch param to the fn now.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could get rid of the whole applyPatches layer too, right?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, though I almost prefer to keep it so it’s a bit easier and more obvious how to add patches in the future. I did open #236370 with the aim of reducing the unnecessary intermediate drv in scenarios like this.

patches = [ ];
};

desktop-native = rustPlatform.buildRustPackage {
pname = "bitwarden-desktop-native";
inherit src version;
sourceRoot = "source-patched/apps/desktop/desktop_native";
cargoSha256 = "sha256-VW9DmSh9jvqFCZjH1SAYkydSGjXSVEbv4CmtoJBiw5Y=";
cargoSha256 = "sha256-SeK8Nbgenof9vXI2v7tJ5oHiX60kBoR+UNOSJTRHdzk=";

nativeBuildInputs = [
pkg-config
Expand Down Expand Up @@ -102,7 +95,7 @@ buildNpmPackage' {
npmBuildFlags = [
"--workspace apps/desktop"
];
npmDepsHash = "sha256-UXDn09qyM8GwfUiWLDhhyrGFZeKtTRmQArstw+tm5iE=";
npmDepsHash = "sha256-G8DEYPjEP3L4s0pr5n2ZTj8kkT0E7Po1BKhZ2hUdJuY=";

ELECTRON_SKIP_BINARY_DOWNLOAD = "1";

Expand Down