2021-01-27 05:44:43 +00:00
|
|
|
{ lib
|
2021-05-16 18:36:16 +00:00
|
|
|
, mkDerivation
|
2019-02-11 22:21:53 +00:00
|
|
|
, fetchurl
|
2019-02-12 06:17:59 +00:00
|
|
|
, pcsclite
|
2019-02-11 22:21:53 +00:00
|
|
|
, pyotherside
|
|
|
|
, python3
|
|
|
|
, qmake
|
2019-02-15 21:19:35 +00:00
|
|
|
, qtbase
|
|
|
|
, qtgraphicaleffects
|
|
|
|
, qtquickcontrols2
|
2019-02-11 22:21:53 +00:00
|
|
|
, yubikey-manager
|
|
|
|
, yubikey-personalization
|
|
|
|
}:
|
|
|
|
|
2021-05-16 18:36:16 +00:00
|
|
|
mkDerivation rec {
|
2019-02-11 22:21:53 +00:00
|
|
|
pname = "yubikey-manager-qt";
|
2021-10-28 01:01:48 +00:00
|
|
|
version = "1.2.4";
|
2019-02-11 22:21:53 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2019-03-12 21:40:29 +00:00
|
|
|
url = "https://developers.yubico.com/${pname}/Releases/${pname}-${version}.tar.gz";
|
2021-10-28 01:01:48 +00:00
|
|
|
sha256 = "sha256-PxHc7IeRsO+CPrNTofGypLLW8fSHDkcBqr75NwdlUyc=";
|
2019-02-11 22:21:53 +00:00
|
|
|
};
|
|
|
|
|
2021-05-16 18:36:16 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
python3.pkgs.wrapPython
|
|
|
|
qmake
|
|
|
|
];
|
2019-02-11 22:21:53 +00:00
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace ykman-gui/deployment.pri --replace '/usr/bin' "$out/bin"
|
|
|
|
'';
|
|
|
|
|
2021-05-16 18:36:16 +00:00
|
|
|
buildInputs = [
|
|
|
|
pyotherside
|
|
|
|
python3
|
|
|
|
qtbase
|
|
|
|
qtgraphicaleffects
|
|
|
|
qtquickcontrols2
|
|
|
|
];
|
2019-02-11 22:21:53 +00:00
|
|
|
|
2021-05-16 18:36:16 +00:00
|
|
|
pythonPath = [
|
|
|
|
(yubikey-manager.override { python3Packages = python3.pkgs; })
|
|
|
|
];
|
2019-02-11 22:21:53 +00:00
|
|
|
|
|
|
|
postInstall = ''
|
2021-05-16 18:36:16 +00:00
|
|
|
install -Dt $out/share/applications resources/ykman-gui.desktop
|
|
|
|
install -Dt $out/share/ykman-gui/icons resources/icons/*.{icns,ico,png,xpm}
|
|
|
|
substituteInPlace $out/share/applications/ykman-gui.desktop \
|
|
|
|
--replace 'Exec=ykman-gui' "Exec=$out/bin/ykman-gui"
|
|
|
|
'';
|
2019-02-11 22:21:53 +00:00
|
|
|
|
2021-05-16 18:36:16 +00:00
|
|
|
qtWrapperArgs = [
|
|
|
|
"--prefix" "LD_LIBRARY_PATH" ":" (lib.makeLibraryPath [ pcsclite yubikey-personalization ])
|
|
|
|
];
|
2019-02-11 22:21:53 +00:00
|
|
|
|
2021-05-16 18:36:16 +00:00
|
|
|
preFixup = ''
|
|
|
|
buildPythonPath "$pythonPath"
|
|
|
|
qtWrapperArgs+=(--prefix PYTHONPATH : "$program_PYTHONPATH")
|
2019-02-11 22:21:53 +00:00
|
|
|
'';
|
|
|
|
|
2019-02-15 21:19:35 +00:00
|
|
|
meta = with lib; {
|
2020-10-11 05:55:05 +00:00
|
|
|
description = "Cross-platform application for configuring any YubiKey over all USB interfaces";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://developers.yubico.com/yubikey-manager-qt/";
|
2019-02-11 22:21:53 +00:00
|
|
|
license = licenses.bsd2;
|
|
|
|
maintainers = [ maintainers.cbley ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|