Merge pull request #21983 from jonmeredith/master

Add yubioath-desktop application and required pyscard module

authored by Michael Raskin and committed by GitHub 7f2769ff 553ef5d3

+72
+41
pkgs/applications/misc/yubioath-desktop/default.nix
···
··· 1 + { stdenv, fetchurl, python27Packages, swig, gettext, pcsclite, qt48Full, yubikey-personalization }: 2 + 3 + python27Packages.buildPythonApplication rec { 4 + namePrefix = ""; 5 + name = "yubioath-desktop-${version}"; 6 + version = "3.1.0"; 7 + 8 + src = fetchurl { 9 + url = "http://developers.yubico.com/yubioath-desktop/Releases/yubioath-desktop-${version}.tar.gz"; 10 + sha256 = "0jfvllgh88g2vwd8sg6willlnn2hq05nd9d3xmv98lhl7gyy1akw"; 11 + }; 12 + 13 + doCheck = false; 14 + 15 + buildInputs = [ stdenv ]; 16 + 17 + propagatedBuildInputs = [ python27Packages.pycrypto python27Packages.click python27Packages.pyscard python27Packages.pyside ]; 18 + 19 + # Need LD_PRELOAD for libykpers as the Nix cpython disables ctypes.cdll.LoadLibrary 20 + # support that the yubicommon library uses to load libykpers 21 + makeWrapperArgs = ''--prefix LD_LIBRARY_PATH : "${pcsclite}/lib:${yubikey-personalization}/lib" --prefix LD_PRELOAD : "${yubikey-personalization}/lib/libykpers-1.so"''; 22 + 23 + postInstall = '' 24 + mkdir -p $out/share/applications 25 + cp resources/yubioath.desktop $out/share/applications/yubioath.desktop 26 + mkdir -p $out/share/yubioath/icons 27 + cp resources/yubioath*.{icns,ico,png,xpm} $out/share/yubioath/icons 28 + substituteInPlace $out/share/applications/yubioath.desktop \ 29 + --replace 'Exec=yubioath-gui' "Exec=$out/bin/yubioath-gui" \ 30 + --replace 'Icon=yubioath' "Icon=$out/share/yubioath/icons" 31 + 32 + ''; 33 + 34 + meta = { 35 + description = "Yubikey Desktop Authenticator"; 36 + 37 + homepage = https://www.yubico.com/support/knowledge-base/categories/articles/yubico-authenticator-download/; 38 + 39 + license = stdenv.lib.licenses.gpl3; 40 + }; 41 + }
+27
pkgs/development/python-modules/pyscard/default.nix
···
··· 1 + { stdenv, fetchurl, fetchpatch, python, buildPythonPackage, swig, pcsclite }: 2 + 3 + buildPythonPackage rec { 4 + name = "pyscard-1.9.4"; 5 + namePrefix = ""; 6 + 7 + src = fetchurl { 8 + url = "mirror://pypi/p/pyscard/${name}.tar.gz"; 9 + sha256 = "0gn0p4p8dhk99g8vald0dcnh45jbf82bj72n4djyr8b4hawkck4v"; 10 + }; 11 + 12 + configurePhase = ""; 13 + 14 + 15 + LDFLAGS="-L${pcsclite}/lib"; 16 + CFLAGS="-I${pcsclite}/include/PCSC"; 17 + 18 + propagatedBuildInputs = [ swig pcsclite ]; 19 + 20 + #doCheck = !(python.isPypy or stdenv.isDarwin); # error: AF_UNIX path too long 21 + 22 + meta = { 23 + homepage = "https://pyscard.sourceforge.io/"; 24 + description = "Smartcard library for python"; 25 + license = stdenv.lib.licenses.lgpl21; 26 + }; 27 + }
+2
pkgs/top-level/all-packages.nix
··· 9879 9880 yajl = callPackage ../development/libraries/yajl { }; 9881 9882 yubico-piv-tool = callPackage ../tools/misc/yubico-piv-tool { }; 9883 9884 yubikey-neo-manager = callPackage ../tools/misc/yubikey-neo-manager { };
··· 9879 9880 yajl = callPackage ../development/libraries/yajl { }; 9881 9882 + yubioath-desktop = callPackage ../applications/misc/yubioath-desktop { }; 9883 + 9884 yubico-piv-tool = callPackage ../tools/misc/yubico-piv-tool { }; 9885 9886 yubikey-neo-manager = callPackage ../tools/misc/yubikey-neo-manager { };
+2
pkgs/top-level/python-packages.nix
··· 281 pythonPackages = self; 282 }; 283 284 pyside = callPackage ../development/python-modules/pyside { }; 285 286 pysideApiextractor = callPackage ../development/python-modules/pyside/apiextractor.nix { };
··· 281 pythonPackages = self; 282 }; 283 284 + pyscard = callPackage ../development/python-modules/pyscard { }; 285 + 286 pyside = callPackage ../development/python-modules/pyside { }; 287 288 pysideApiextractor = callPackage ../development/python-modules/pyside/apiextractor.nix { };