3
0
Fork 0
forked from mirrors/nixpkgs

yubioath-flutter: fix QR scanning

This commit is contained in:
Ilan Joselevich 2023-01-04 16:09:20 +02:00
parent 88d6c7c7a7
commit 1a9d89fe38
No known key found for this signature in database

View file

@ -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
];