2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2021-05-20 23:08:51 +00:00
|
|
|
, mkDerivation
|
2020-04-24 23:36:52 +00:00
|
|
|
, fetchurl
|
|
|
|
, pcsclite
|
|
|
|
, pyotherside
|
|
|
|
, python3
|
|
|
|
, qmake
|
|
|
|
, qtbase
|
|
|
|
, qtgraphicaleffects
|
|
|
|
, qtquickcontrols2
|
|
|
|
, yubikey-manager
|
|
|
|
, yubikey-personalization
|
|
|
|
}:
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
mkDerivation rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "yubikey-manager-qt";
|
2021-05-20 23:08:51 +00:00
|
|
|
version = "1.2.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://developers.yubico.com/${pname}/Releases/${pname}-${version}.tar.gz";
|
2021-05-20 23:08:51 +00:00
|
|
|
sha256 = "1jqibv7na9h2r8nxgzp40j9qpyiwx97c65krivkcqjwdjk5lrahl";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
python3.pkgs.wrapPython
|
|
|
|
qmake
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace ykman-gui/deployment.pri --replace '/usr/bin' "$out/bin"
|
|
|
|
'';
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
buildInputs = [
|
|
|
|
pyotherside
|
|
|
|
python3
|
|
|
|
qtbase
|
|
|
|
qtgraphicaleffects
|
|
|
|
qtquickcontrols2
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
pythonPath = [
|
|
|
|
(yubikey-manager.override { python3Packages = python3.pkgs; })
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
postInstall = ''
|
2021-05-20 23:08:51 +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"
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
qtWrapperArgs = [
|
|
|
|
"--prefix" "LD_LIBRARY_PATH" ":" (lib.makeLibraryPath [ pcsclite yubikey-personalization ])
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
preFixup = ''
|
|
|
|
buildPythonPath "$pythonPath"
|
|
|
|
qtWrapperArgs+=(--prefix PYTHONPATH : "$program_PYTHONPATH")
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
2020-10-19 00:13:06 +00:00
|
|
|
description = "Cross-platform application for configuring any YubiKey over all USB interfaces";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://developers.yubico.com/yubikey-manager-qt/";
|
|
|
|
license = licenses.bsd2;
|
|
|
|
maintainers = [ maintainers.cbley ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|