From 8b5675da37769b9d70e45635a531f8f6ac3f4f87 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Sat, 16 Apr 2016 12:24:53 +0100 Subject: [PATCH] yubikey-neo-manager: init at 1.4.0 --- .../misc/yubikey-neo-manager/default.nix | 28 +++++++++++++++++++ .../fix-pyside-requirement.diff | 17 +++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 3 files changed, 47 insertions(+) create mode 100644 pkgs/tools/misc/yubikey-neo-manager/default.nix create mode 100644 pkgs/tools/misc/yubikey-neo-manager/fix-pyside-requirement.diff diff --git a/pkgs/tools/misc/yubikey-neo-manager/default.nix b/pkgs/tools/misc/yubikey-neo-manager/default.nix new file mode 100644 index 000000000000..528f9aecb54f --- /dev/null +++ b/pkgs/tools/misc/yubikey-neo-manager/default.nix @@ -0,0 +1,28 @@ +{ stdenv, fetchurl, makeWrapper, python27Packages +, libykneomgr, yubikey-personalization, libu2f-host }: + +python27Packages.buildPythonPackage rec { + namePrefix = ""; + name = "yubikey-neo-manager-${version}"; + version = "1.4.0"; + src = fetchurl { + url = "https://developers.yubico.com/yubikey-neo-manager/Releases/${name}.tar.gz"; + sha256 = "1isxvx27hk0avxwgwcwys2z8ickfs816ii1aklvmi09ak1rgrf1g"; + }; + + propagatedBuildInputs = with python27Packages; [ pyside pycrypto ]; + patches = [ ./fix-pyside-requirement.diff ]; + + # aid ctypes load_libary() + makeWrapperArgs = [ + "--set LD_PRELOAD '${libykneomgr}/lib/libykneomgr.so ${yubikey-personalization}/lib/libykpers-1.so ${libu2f-host}/lib/libu2f-host.so'" + ]; + + meta = with stdenv.lib; { + homepage = https://developers.yubico.com/yubikey-neo-manager; + description = "Cross platform personalization tool for the YubiKey NEO"; + license = licenses.bsd2; + platforms = platforms.unix; + maintainers = with maintainers; [ mbakke ]; + }; +} diff --git a/pkgs/tools/misc/yubikey-neo-manager/fix-pyside-requirement.diff b/pkgs/tools/misc/yubikey-neo-manager/fix-pyside-requirement.diff new file mode 100644 index 000000000000..d11a3a1cc6d9 --- /dev/null +++ b/pkgs/tools/misc/yubikey-neo-manager/fix-pyside-requirement.diff @@ -0,0 +1,17 @@ +Description: Remove PySide requirement, since python-pyside does not register itself correctly +Author: Dain Nilsson +Forwarded: no +--- a/setup.py ++++ b/setup.py +@@ -44,8 +44,9 @@ + entry_points={ + 'gui_scripts': ['neoman=neoman.__main__:main'] + }, +- install_requires=['PySide', 'pycrypto'], +- yc_requires=['ctypes', 'qt'], ++ install_requires=['pycrypto'], ++ yc_requires=['ctypes'], ++ packages=['neoman', 'neoman.model', 'neoman.view', 'neoman.yubicommon', 'neoman.yubicommon.setup', 'neoman.yubicommon.ctypes', 'neoman.yubicommon.qt'], + cmdclass={'executable': executable, 'qt_resources': qt_resources('neoman')}, + classifiers=[ + 'License :: OSI Approved :: BSD License', diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index cb12890512a3..3742ba622578 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -9478,6 +9478,8 @@ in yubico-piv-tool = callPackage ../tools/misc/yubico-piv-tool { }; + yubikey-neo-manager = callPackage ../tools/misc/yubikey-neo-manager { }; + yubikey-personalization = callPackage ../tools/misc/yubikey-personalization { libusb = libusb1; };