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 , fetchFromGitHub
, stdenv , stdenv
, pcre2 , pcre2
, gnome
, makeWrapper
}: }:
let let
vendorHashes = { vendorHashes = {
@ -54,12 +56,20 @@ flutter.mkFlutterApp rec {
# Symlink binary. # Symlink binary.
ln -sf "$out/app/authenticator" "$out/bin/yubioath-flutter" 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. # Set the correct path to the binary in desktop file.
substituteInPlace "$out/share/applications/com.yubico.authenticator.desktop" \ substituteInPlace "$out/share/applications/com.yubico.authenticator.desktop" \
--replace "@EXEC_PATH/authenticator" "$out/bin/yubioath-flutter" \ --replace "@EXEC_PATH/authenticator" "$out/bin/yubioath-flutter" \
--replace "@EXEC_PATH/linux_support/com.yubico.yubioath.png" "$out/share/icons/com.yubico.yubioath.png" --replace "@EXEC_PATH/linux_support/com.yubico.yubioath.png" "$out/share/icons/com.yubico.yubioath.png"
''; '';
nativeBuildInputs = [
makeWrapper
];
buildInputs = [ buildInputs = [
pcre2 pcre2
]; ];