2023-08-10 07:59:29 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, python3Packages
|
|
|
|
, installShellFiles
|
|
|
|
, procps
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
python3Packages.buildPythonPackage rec {
|
|
|
|
pname = "yubikey-manager";
|
2023-10-19 13:55:26 +00:00
|
|
|
version = "5.2.1";
|
2022-01-13 20:06:32 +00:00
|
|
|
format = "pyproject";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-08-05 21:33:18 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Yubico";
|
2023-05-24 13:37:59 +00:00
|
|
|
repo = "yubikey-manager";
|
|
|
|
rev = version;
|
2023-10-19 13:55:26 +00:00
|
|
|
hash = "sha256-CUe/oB/+Hq9evnLwl8r0k5ObhI3vDt7oX79+20yMfjY=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-09-18 10:52:07 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace "ykman/pcsc/__init__.py" \
|
2024-01-25 14:12:00 +00:00
|
|
|
--replace 'pkill' '${if stdenv.isLinux then procps else "/usr"}/bin/pkill'
|
2021-09-18 10:52:07 +00:00
|
|
|
'';
|
|
|
|
|
2023-08-10 07:59:29 +00:00
|
|
|
nativeBuildInputs = with python3Packages; [
|
|
|
|
poetry-core
|
|
|
|
pythonRelaxDepsHook
|
|
|
|
installShellFiles
|
|
|
|
];
|
2021-08-05 21:33:18 +00:00
|
|
|
|
2023-08-10 07:59:29 +00:00
|
|
|
propagatedBuildInputs = with python3Packages; [
|
|
|
|
cryptography
|
|
|
|
pyscard
|
|
|
|
fido2
|
|
|
|
click
|
|
|
|
keyring
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-08-10 07:59:29 +00:00
|
|
|
pythonRelaxDeps = [
|
|
|
|
"keyring"
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
postInstall = ''
|
2023-08-10 07:59:29 +00:00
|
|
|
installManPage man/ykman.1
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-08-10 07:59:29 +00:00
|
|
|
installShellCompletion --cmd ykman \
|
|
|
|
--bash <(_YKMAN_COMPLETE=bash_source "$out/bin/ykman") \
|
|
|
|
--zsh <(_YKMAN_COMPLETE=zsh_source "$out/bin/ykman") \
|
|
|
|
--fish <(_YKMAN_COMPLETE=fish_source "$out/bin/ykman") \
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2023-08-10 07:59:29 +00:00
|
|
|
nativeCheckInputs = with python3Packages; [
|
|
|
|
pytestCheckHook
|
|
|
|
makefun
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://developers.yubico.com/yubikey-manager";
|
2023-08-10 07:59:29 +00:00
|
|
|
changelog = "https://github.com/Yubico/yubikey-manager/releases/tag/${version}";
|
2020-10-19 00:13:06 +00:00
|
|
|
description = "Command line tool for configuring any YubiKey over all USB transports";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
license = licenses.bsd2;
|
|
|
|
platforms = platforms.unix;
|
2023-08-10 07:59:29 +00:00
|
|
|
maintainers = with maintainers; [ benley lassulus pinpox nickcao ];
|
2022-09-22 12:36:57 +00:00
|
|
|
mainProgram = "ykman";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|