about summary refs log tree commit diff
path: root/pkgs/applications
diff options
context:
space:
mode:
authorArtturi <Artturin@artturin.com>2023-01-04 16:36:02 +0200
committerGitHub <noreply@github.com>2023-01-04 16:36:02 +0200
commit63f3f76723c5982e719734f869b988a8e3fb92cd (patch)
tree02862c1392ac98f46a77404393b44a8b61a8844c /pkgs/applications
parentaa8ead30fd498e5127581db597100c65809b5331 (diff)
parent1a9d89fe38c58abe77bebbb114a39aaf16277b2b (diff)
Merge pull request #209038 from Kranzes/yubioath
Diffstat (limited to 'pkgs/applications')
-rw-r--r--pkgs/applications/misc/yubioath-flutter/default.nix10
1 files changed, 10 insertions, 0 deletions
diff --git a/pkgs/applications/misc/yubioath-flutter/default.nix b/pkgs/applications/misc/yubioath-flutter/default.nix
index 50bb48347ac64..6b58dd1caf5db 100644
--- a/pkgs/applications/misc/yubioath-flutter/default.nix
+++ b/pkgs/applications/misc/yubioath-flutter/default.nix
@@ -4,6 +4,8 @@
 , fetchFromGitHub
 , stdenv
 , pcre2
+, gnome
+, makeWrapper
 }:
 let
   vendorHashes = {
@@ -54,12 +56,20 @@ flutter.mkFlutterApp rec {
     # Symlink binary.
     ln -sf "$out/app/authenticator" "$out/bin/yubioath-flutter"
 
+    # Needed for QR scanning to work.
+    wrapProgram "$out/bin/yubioath-flutter" \
+      --prefix PATH : ${lib.makeBinPath [ gnome.gnome-screenshot ]}
+
     # Set the correct path to the binary in desktop file.
     substituteInPlace "$out/share/applications/com.yubico.authenticator.desktop" \
       --replace "@EXEC_PATH/authenticator" "$out/bin/yubioath-flutter" \
       --replace "@EXEC_PATH/linux_support/com.yubico.yubioath.png" "$out/share/icons/com.yubico.yubioath.png"
   '';
 
+  nativeBuildInputs = [
+    makeWrapper
+  ];
+
   buildInputs = [
     pcre2
   ];