2019-02-11 22:21:53 +00:00
|
|
|
{ stdenv
|
|
|
|
, fetchurl
|
2019-07-05 15:42:08 +00:00
|
|
|
, wrapQtAppsHook
|
2019-02-12 06:17:59 +00:00
|
|
|
, pcsclite
|
2019-02-11 22:21:53 +00:00
|
|
|
, pyotherside
|
|
|
|
, pythonPackages
|
|
|
|
, python3
|
|
|
|
, qmake
|
2019-02-15 21:19:35 +00:00
|
|
|
, qtbase
|
|
|
|
, qtgraphicaleffects
|
|
|
|
, qtquickcontrols
|
|
|
|
, qtquickcontrols2
|
|
|
|
, qtdeclarative
|
|
|
|
, qtsvg
|
2019-02-11 22:21:53 +00:00
|
|
|
, yubikey-manager
|
|
|
|
, yubikey-personalization
|
|
|
|
}:
|
|
|
|
|
2019-07-05 15:42:08 +00:00
|
|
|
let inherit (stdenv) lib; in
|
2019-02-15 21:19:35 +00:00
|
|
|
|
2019-07-05 15:42:08 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2019-02-11 22:21:53 +00:00
|
|
|
pname = "yubikey-manager-qt";
|
2020-01-30 15:13:03 +00:00
|
|
|
version = "1.1.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";
|
2020-01-30 15:13:03 +00:00
|
|
|
sha256 = "0rbr72741q7fqkr9qmvgj2mi6192ayz7bl935q2bsnqils4wsa3f";
|
2019-02-11 22:21:53 +00:00
|
|
|
};
|
|
|
|
|
2019-07-05 15:42:08 +00:00
|
|
|
nativeBuildInputs = [ wrapQtAppsHook python3.pkgs.wrapPython qmake ];
|
2019-02-11 22:21:53 +00:00
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace ykman-gui/deployment.pri --replace '/usr/bin' "$out/bin"
|
|
|
|
'';
|
|
|
|
|
2019-02-15 21:19:35 +00:00
|
|
|
buildInputs = [ pythonPackages.python qtbase qtgraphicaleffects qtquickcontrols qtquickcontrols2 pyotherside ];
|
2019-02-11 22:21:53 +00:00
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
pythonPath = [ yubikey-manager ];
|
|
|
|
|
2019-07-05 15:42:08 +00:00
|
|
|
dontWrapQtApps = true;
|
2019-02-11 22:21:53 +00:00
|
|
|
postInstall = ''
|
|
|
|
buildPythonPath "$pythonPath"
|
|
|
|
|
2019-07-05 15:42:08 +00:00
|
|
|
wrapQtApp $out/bin/ykman-gui \
|
2019-05-29 22:30:50 +00:00
|
|
|
--prefix LD_LIBRARY_PATH : "${stdenv.lib.getLib pcsclite}/lib:${yubikey-personalization}/lib" \
|
2019-07-05 15:42:08 +00:00
|
|
|
--prefix PYTHONPATH : "$program_PYTHONPATH"
|
2019-02-11 22:21:53 +00:00
|
|
|
|
2019-07-05 15:42:08 +00:00
|
|
|
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" \
|
2019-02-11 22:21:53 +00:00
|
|
|
'';
|
|
|
|
|
2019-02-15 21:19:35 +00:00
|
|
|
meta = with lib; {
|
2019-02-11 22:21:53 +00:00
|
|
|
inherit version;
|
2019-02-12 06:17:59 +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;
|
|
|
|
};
|
|
|
|
}
|