Merge pull request #209038 from Kranzes/yubioath

This commit is contained in:
Artturi 2023-01-04 16:36:02 +02:00 committed by GitHub
commit 63f3f76723
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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