summary refs log tree commit diff
path: root/pkgs/tools/security/bitwarden
diff options
context:
space:
mode:
authorAndrew Marshall <andrew@johnandrewmarshall.com>2023-11-14 13:48:35 -0500
committerAndrew Marshall <andrew@johnandrewmarshall.com>2023-11-14 13:49:47 -0500
commit1032d6b8214341649c01888bc7103824441d4397 (patch)
treef778fffa7b6ab954331777ac3741e96d574b011a /pkgs/tools/security/bitwarden
parentdaed31a57d1794ccf3821846debab3b4e0bd3038 (diff)
downloadnixpkgs-1032d6b8214341649c01888bc7103824441d4397.tar
nixpkgs-1032d6b8214341649c01888bc7103824441d4397.tar.gz
nixpkgs-1032d6b8214341649c01888bc7103824441d4397.tar.bz2
nixpkgs-1032d6b8214341649c01888bc7103824441d4397.tar.lz
nixpkgs-1032d6b8214341649c01888bc7103824441d4397.tar.xz
nixpkgs-1032d6b8214341649c01888bc7103824441d4397.tar.zst
nixpkgs-1032d6b8214341649c01888bc7103824441d4397.zip
bitwarden: fix copying on Wayland
Broken since 2023.10.0

https://github.com/bitwarden/clients/issues/6812#issuecomment-1806830091
Diffstat (limited to 'pkgs/tools/security/bitwarden')
-rw-r--r--pkgs/tools/security/bitwarden/default.nix14
1 files changed, 12 insertions, 2 deletions
diff --git a/pkgs/tools/security/bitwarden/default.nix b/pkgs/tools/security/bitwarden/default.nix
index d2068241a19..2add249ed82 100644
--- a/pkgs/tools/security/bitwarden/default.nix
+++ b/pkgs/tools/security/bitwarden/default.nix
@@ -5,6 +5,7 @@
 , dbus
 , electron_25
 , fetchFromGitHub
+, fetchpatch2
 , glib
 , gnome
 , gtk3
@@ -36,6 +37,14 @@ in buildNpmPackage rec {
     hash = "sha256-cwSIMN40d1ySUSxBl8jXLVndnJJvPnLiTxkYnA3Pqws=";
   };
 
+  patches = [
+    (fetchpatch2 {
+      # https://github.com/bitwarden/clients/issues/6812#issuecomment-1806830091
+      url = "https://github.com/solopasha/bitwarden_flatpak/raw/daec07b067b9cec5e260b44a53216fc65866ba1d/wayland-clipboard.patch";
+      hash = "sha256-hcaRa9Nl7MYaTNwmB5Qdm65Mtufv3z+IPwLDPiO3pcw=";
+    })
+  ];
+
   nodejs = nodejs_18;
 
   makeCacheWritable = true;
@@ -44,9 +53,10 @@ in buildNpmPackage rec {
 
   cargoDeps = rustPlatform.fetchCargoTarball {
     name = "${pname}-${version}";
-    inherit src;
+    inherit patches src;
+    patchFlags = [ "-p4" ];
     sourceRoot = "${src.name}/${cargoRoot}";
-    hash = "sha256-Qv4Tq0s+Pmr+ZEqbmbPfaPn/4qKVdzsHoI4wC8x6O48=";
+    hash = "sha256-AmtdmOR3aZJTZiFbkwRXjeTOJdcN40bTmWx4Ss3JNJ8=";
   };
   cargoRoot = "apps/desktop/desktop_native";