2022-12-17 10:02:37 +00:00
|
|
|
{ buildPythonApplication
|
2023-08-22 20:05:09 +00:00
|
|
|
, python3
|
2022-12-17 10:02:37 +00:00
|
|
|
, poetry-core
|
|
|
|
, yubikey-manager
|
|
|
|
, fido2
|
|
|
|
, mss
|
2023-11-16 04:20:00 +00:00
|
|
|
, zxing-cpp
|
2022-12-17 10:02:37 +00:00
|
|
|
, pillow
|
|
|
|
, cryptography
|
|
|
|
|
|
|
|
, src
|
|
|
|
, version
|
|
|
|
, meta
|
|
|
|
}:
|
|
|
|
|
2023-01-11 07:51:40 +00:00
|
|
|
buildPythonApplication {
|
2022-12-17 10:02:37 +00:00
|
|
|
pname = "yubioath-flutter-helper";
|
|
|
|
inherit src version meta;
|
|
|
|
|
2023-08-04 22:07:22 +00:00
|
|
|
sourceRoot = "${src.name}/helper";
|
2022-12-17 10:02:37 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
python3.pkgs.pythonRelaxDepsHook
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonRelaxDeps = true;
|
|
|
|
|
2022-12-17 10:02:37 +00:00
|
|
|
postPatch = ''
|
2023-08-22 20:05:09 +00:00
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace "authenticator-helper" "yubioath-flutter-helper" \
|
|
|
|
--replace "0.1.0" "${version}"
|
2022-12-17 10:02:37 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
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
|
2023-11-16 04:20:00 +00:00
|
|
|
zxing-cpp
|
2022-12-17 10:02:37 +00:00
|
|
|
pillow
|
|
|
|
cryptography
|
|
|
|
];
|
|
|
|
}
|