about summary refs log tree commit diff
path: root/pkgs/applications/misc/yubioath-flutter
diff options
context:
space:
mode:
authorIlan Joselevich <personal@ilanjoselevich.com>2023-01-04 16:09:20 +0200
committerIlan Joselevich <personal@ilanjoselevich.com>2023-01-04 16:09:20 +0200
commit1a9d89fe38c58abe77bebbb114a39aaf16277b2b (patch)
tree226b8a4b5f1d7fcf13cf6b6e260858bca7e4cb6d /pkgs/applications/misc/yubioath-flutter
parent88d6c7c7a7a25a4025d99f7800ee6bbc18c418b3 (diff)
yubioath-flutter: fix QR scanning
Diffstat (limited to 'pkgs/applications/misc/yubioath-flutter')
-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
   ];