yubioath-flutter: init at 6.0.2

This commit is contained in:
Luke Granger-Brown 2022-11-30 13:05:16 +00:00
parent 8a4ef88653
commit e4f139a78e
4 changed files with 104 additions and 1 deletions

View File

@ -0,0 +1,57 @@
{ lib
, flutter
, python3
, fetchFromGitHub
, stdenv
, pcre2
}:
let
vendorHashes = {
x86_64-linux = "sha256-BwhWA8N0S55XkljDKPNkDhsj0QSpmJJ5MwEnrPjymS8=";
aarch64-linux = "sha256-T1aGz3+2Sls+rkUVDUo39Ky2igg+dxGSUaf3qpV7ovQ=";
};
version = "6.0.2";
src = fetchFromGitHub {
owner = "Yubico";
repo = "yubioath-flutter";
rev = version;
sha256 = "13nh5qpq02c6azfdh4cbzhlrq0hs9is45q5z5cnxg84hrx26hd4k";
};
meta = with lib; {
description = "Yubico Authenticator for Desktop";
homepage = "https://github.com/Yubico/yubioath-flutter";
license = licenses.asl20;
maintainers = with maintainers; [ lukegb ];
platforms = builtins.attrNames vendorHashes;
};
helper = python3.pkgs.callPackage ./helper.nix { inherit src version meta; };
in
flutter.mkFlutterApp rec {
pname = "yubioath-flutter";
inherit src version meta;
passthru.helper = helper;
vendorHash = vendorHashes."${stdenv.system}";
postPatch = ''
substituteInPlace linux/CMakeLists.txt \
--replace "../build/linux/helper" "${helper}/libexec/helper"
'';
preInstall = ''
# Make sure we have permission to delete things CMake has copied in to our build directory from elsewhere.
chmod -R +w build/
'';
postInstall = ''
# Swap the authenticator-helper symlink with the correct symlink.
ln -fs "${helper}/bin/authenticator-helper" "$out/app/helper/authenticator-helper"
'';
buildInputs = [
pcre2
];
}

View File

@ -0,0 +1,44 @@
{ buildPythonApplication
, poetry-core
, yubikey-manager
, fido2
, mss
, zxing_cpp
, pillow
, cryptography
, src
, version
, meta
}:
buildPythonApplication rec {
pname = "yubioath-flutter-helper";
inherit src version meta;
sourceRoot = "source/helper";
format = "pyproject";
postPatch = ''
sed -i \
-e 's,zxing-cpp = .*,zxing-cpp = "*",g' \
-e 's,mss = .*,mss = "*",g' \
pyproject.toml
'';
postInstall = ''
install -Dm 0755 authenticator-helper.py $out/bin/authenticator-helper
install -d $out/libexec/helper
ln -fs $out/bin/authenticator-helper $out/libexec/helper/authenticator-helper
'';
propagatedBuildInputs = [
poetry-core
yubikey-manager
fido2
mss
zxing_cpp
pillow
cryptography
];
}

View File

@ -1638,7 +1638,7 @@ mapAliases ({
youtubeDL = throw "'youtubeDL' has been renamed to/replaced by 'youtube-dl'"; # Converted to throw 2022-02-22
ytop = throw "ytop has been abandoned by upstream. Consider switching to bottom instead";
yubikey-neo-manager = throw "yubikey-neo-manager has been removed because it was broken. Use yubikey-manager-qt instead"; # Added 2021-03-08
yubioath-desktop = throw "yubioath-desktop has been deprecated by upstream in favor of https://github.com/Yubico/yubioath-flutter"; # Added 2022-11-22
yubioath-desktop = throw "yubioath-desktop has been deprecated by upstream in favor of yubioath-flutter"; # Added 2022-11-22
yuzu-ea = yuzu-early-access; # Added 2022-08-18
yuzu = yuzu-mainline; # Added 2021-01-25

View File

@ -23177,6 +23177,8 @@ with pkgs;
yubihsm-shell = callPackage ../tools/security/yubihsm-shell { };
yubioath-flutter = callPackage ../applications/misc/yubioath-flutter { };
zchunk = callPackage ../development/libraries/zchunk { };
zeitgeist = callPackage ../development/libraries/zeitgeist { };