2019-08-03 11:56:26 +01:00
|
|
|
{ stdenv, fetchurl, mkDerivation
|
2020-02-27 06:27:04 +00:00
|
|
|
, qmake, qtbase, qtquickcontrols2, qtgraphicaleffects
|
2019-06-16 20:59:06 +01:00
|
|
|
, python3, pyotherside
|
2019-01-17 21:18:09 +00:00
|
|
|
, pcsclite, yubikey-personalization
|
|
|
|
, yubikey-manager, makeWrapper }:
|
2017-01-17 01:18:27 +00:00
|
|
|
|
2019-08-03 11:56:26 +01:00
|
|
|
mkDerivation rec {
|
2019-01-17 21:18:09 +00:00
|
|
|
pname = "yubioath-desktop";
|
2020-05-27 23:08:45 +01:00
|
|
|
version = "5.0.4";
|
2017-01-17 01:18:27 +00:00
|
|
|
|
2019-01-17 21:18:09 +00:00
|
|
|
src = fetchurl {
|
|
|
|
url = "https://developers.yubico.com/yubioath-desktop/Releases/yubioath-desktop-${version}.tar.gz";
|
2020-05-27 23:08:45 +01:00
|
|
|
sha256 = "1aw88xvg6gjsfwmmlcrdcgyycn2cp7b8vxjzj14h7igcj02xh84h";
|
2019-01-17 21:18:09 +00:00
|
|
|
};
|
2017-01-17 01:18:27 +00:00
|
|
|
|
2019-01-17 21:18:09 +00:00
|
|
|
doCheck = false;
|
2017-01-17 01:18:27 +00:00
|
|
|
|
2020-02-27 06:27:04 +00:00
|
|
|
buildInputs = [ stdenv qtbase qtquickcontrols2 qtgraphicaleffects python3 ];
|
2017-01-17 01:18:27 +00:00
|
|
|
|
2019-01-17 21:18:09 +00:00
|
|
|
nativeBuildInputs = [ qmake makeWrapper python3.pkgs.wrapPython ];
|
2017-01-17 01:18:27 +00:00
|
|
|
|
2019-01-17 21:18:09 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace deployment.pri \
|
|
|
|
--replace '/usr/bin' "$out/bin"
|
|
|
|
'';
|
|
|
|
|
|
|
|
pythonPath = [ yubikey-manager ];
|
|
|
|
|
|
|
|
# Need LD_PRELOAD for libykpers as the Nix cpython disables ctypes.cdll.LoadLibrary
|
|
|
|
# support that the yubicommon library uses to load libykpers
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
buildPythonPath "$out $pythonPath"
|
|
|
|
wrapProgram $out/bin/yubioath-desktop \
|
|
|
|
--prefix PYTHONPATH : "$program_PYTHONPATH" \
|
2019-03-09 14:29:56 +00:00
|
|
|
--prefix QML2_IMPORT_PATH : "${pyotherside}/${qtbase.qtQmlPrefix}" \
|
2019-01-17 21:18:09 +00:00
|
|
|
--prefix LD_PRELOAD : "${yubikey-personalization}/lib/libykpers-1.so" \
|
|
|
|
--prefix LD_LIBRARY_PATH : "${stdenv.lib.getLib pcsclite}/lib:${yubikey-personalization}/lib"
|
2017-01-17 01:18:27 +00:00
|
|
|
|
|
|
|
mkdir -p $out/share/applications
|
2020-04-15 15:13:43 +01:00
|
|
|
cp resources/com.yubico.yubioath.desktop \
|
|
|
|
$out/share/applications/com.yubico.yubioath.desktop
|
2017-01-17 01:18:27 +00:00
|
|
|
mkdir -p $out/share/yubioath/icons
|
2020-04-15 15:13:43 +01:00
|
|
|
cp resources/icons/*.{icns,ico,png,svg} $out/share/yubioath/icons
|
|
|
|
substituteInPlace $out/share/applications/com.yubico.yubioath.desktop \
|
2019-01-17 21:18:09 +00:00
|
|
|
--replace 'Exec=yubioath-desktop' "Exec=$out/bin/yubioath-desktop" \
|
2020-04-15 15:13:43 +01:00
|
|
|
--replace 'Icon=yubioath' "Icon=$out/share/yubioath/icons/com.yubico.yubioath.png"
|
2019-01-17 21:18:09 +00:00
|
|
|
'';
|
2017-01-17 01:18:27 +00:00
|
|
|
|
2019-01-17 21:20:51 +00:00
|
|
|
meta = with stdenv.lib; {
|
2020-02-27 06:27:04 +00:00
|
|
|
description = "Yubico Authenticator";
|
|
|
|
longDescription = ''
|
|
|
|
Application for generating Open Authentication (OATH) time-based TOTP and
|
|
|
|
event-based HOTP one-time password codes, with the help of a YubiKey that
|
|
|
|
protects the shared secrets.
|
|
|
|
'';
|
2017-01-17 01:18:27 +00:00
|
|
|
|
2020-02-27 06:27:04 +00:00
|
|
|
homepage = "https://developers.yubico.com/yubioath-desktop";
|
|
|
|
downloadPage = "https://developers.yubico.com/yubioath-desktop/Releases/";
|
|
|
|
changelog = "https://developers.yubico.com/yubioath-desktop/Release_Notes.html";
|
2017-01-17 01:18:27 +00:00
|
|
|
|
2020-02-27 06:27:04 +00:00
|
|
|
license = stdenv.lib.licenses.bsd2;
|
|
|
|
maintainers = with maintainers; [ mic92 risson ];
|
2019-01-17 21:18:09 +00:00
|
|
|
};
|
2017-01-17 01:18:27 +00:00
|
|
|
}
|