2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
2020-04-24 23:36:52 +00:00
|
|
|
, fetchurl
|
|
|
|
, wrapQtAppsHook
|
|
|
|
, pcsclite
|
|
|
|
, pyotherside
|
|
|
|
, pythonPackages
|
|
|
|
, python3
|
|
|
|
, qmake
|
|
|
|
, qtbase
|
|
|
|
, qtgraphicaleffects
|
|
|
|
, qtquickcontrols
|
|
|
|
, qtquickcontrols2
|
|
|
|
, yubikey-manager
|
|
|
|
, yubikey-personalization
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "yubikey-manager-qt";
|
2020-09-25 04:45:31 +00:00
|
|
|
version = "1.1.5";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://developers.yubico.com/${pname}/Releases/${pname}-${version}.tar.gz";
|
2020-09-25 04:45:31 +00:00
|
|
|
sha256 = "1yimlaqvhq34gw6wkqgil0qq8x9zbfzh4psqihjr2d9jaa2wygwy";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ wrapQtAppsHook python3.pkgs.wrapPython qmake ];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace ykman-gui/deployment.pri --replace '/usr/bin' "$out/bin"
|
|
|
|
'';
|
|
|
|
|
|
|
|
buildInputs = [ pythonPackages.python qtbase qtgraphicaleffects qtquickcontrols qtquickcontrols2 pyotherside ];
|
|
|
|
|
|
|
|
pythonPath = [ yubikey-manager ];
|
|
|
|
|
|
|
|
dontWrapQtApps = true;
|
|
|
|
postInstall = ''
|
|
|
|
buildPythonPath "$pythonPath"
|
|
|
|
|
|
|
|
wrapQtApp $out/bin/ykman-gui \
|
2021-01-15 22:18:51 +00:00
|
|
|
--prefix LD_LIBRARY_PATH : "${lib.getLib pcsclite}/lib:${yubikey-personalization}/lib" \
|
2020-04-24 23:36:52 +00:00
|
|
|
--prefix PYTHONPATH : "$program_PYTHONPATH"
|
|
|
|
|
|
|
|
mkdir -p $out/share/applications
|
|
|
|
cp resources/ykman-gui.desktop $out/share/applications/ykman-gui.desktop
|
|
|
|
mkdir -p $out/share/ykman-gui/icons
|
|
|
|
cp resources/icons/*.{icns,ico,png,xpm} $out/share/ykman-gui/icons
|
|
|
|
substituteInPlace $out/share/applications/ykman-gui.desktop \
|
|
|
|
--replace 'Exec=ykman-gui' "Exec=$out/bin/ykman-gui" \
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
inherit version;
|
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;
|
|
|
|
};
|
|
|
|
}
|