From 1a9d89fe38c58abe77bebbb114a39aaf16277b2b Mon Sep 17 00:00:00 2001 From: Ilan Joselevich Date: Wed, 4 Jan 2023 16:09:20 +0200 Subject: [PATCH] yubioath-flutter: fix QR scanning --- pkgs/applications/misc/yubioath-flutter/default.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkgs/applications/misc/yubioath-flutter/default.nix b/pkgs/applications/misc/yubioath-flutter/default.nix index 50bb48347ac6..6b58dd1caf5d 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 ];