Merge pull request #54215 from Mic92/yubikey
yubioath-desktop: 3.1.0 -> 4.3.4; yubikey-manager: 1.0.1 -> 2.0.0
This commit is contained in:
commit
fdfd5ba352
@ -1,41 +1,56 @@
|
|||||||
{ stdenv, fetchurl, python27Packages, pcsclite, yubikey-personalization }:
|
{ stdenv, fetchurl, fetchFromGitHub
|
||||||
|
, qmake, qtbase, qtquickcontrols, qtsvg
|
||||||
|
, python3, pyotherside, ncurses
|
||||||
|
, pcsclite, yubikey-personalization
|
||||||
|
, yubikey-manager, makeWrapper }:
|
||||||
|
|
||||||
python27Packages.buildPythonApplication rec {
|
stdenv.mkDerivation rec {
|
||||||
namePrefix = "";
|
pname = "yubioath-desktop";
|
||||||
name = "yubioath-desktop-${version}";
|
version = "4.3.4";
|
||||||
version = "3.1.0";
|
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://developers.yubico.com/yubioath-desktop/Releases/yubioath-desktop-${version}.tar.gz";
|
url = "https://developers.yubico.com/yubioath-desktop/Releases/yubioath-desktop-${version}.tar.gz";
|
||||||
sha256 = "0jfvllgh88g2vwd8sg6willlnn2hq05nd9d3xmv98lhl7gyy1akw";
|
sha256 = "0hb7j71032sigs8zd5r8yr0m59sjkb24vhs2l4jarpvj8q7hv30d";
|
||||||
};
|
};
|
||||||
|
|
||||||
doCheck = false;
|
doCheck = false;
|
||||||
|
|
||||||
buildInputs = [ stdenv ];
|
buildInputs = [ stdenv qtbase qtquickcontrols pyotherside python3 ];
|
||||||
|
|
||||||
propagatedBuildInputs = [ python27Packages.pycrypto python27Packages.click python27Packages.pyscard python27Packages.pyside ];
|
nativeBuildInputs = [ qmake makeWrapper python3.pkgs.wrapPython ];
|
||||||
|
|
||||||
# Need LD_PRELOAD for libykpers as the Nix cpython disables ctypes.cdll.LoadLibrary
|
postPatch = ''
|
||||||
# support that the yubicommon library uses to load libykpers
|
substituteInPlace deployment.pri \
|
||||||
makeWrapperArgs = ''--prefix LD_LIBRARY_PATH : "${stdenv.lib.getLib pcsclite}/lib:${yubikey-personalization}/lib" --prefix LD_PRELOAD : "${yubikey-personalization}/lib/libykpers-1.so"'';
|
--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" \
|
||||||
|
--prefix LD_PRELOAD : "${yubikey-personalization}/lib/libykpers-1.so" \
|
||||||
|
--prefix LD_LIBRARY_PATH : "${stdenv.lib.getLib pcsclite}/lib:${yubikey-personalization}/lib"
|
||||||
|
|
||||||
postInstall = ''
|
|
||||||
mkdir -p $out/share/applications
|
mkdir -p $out/share/applications
|
||||||
cp resources/yubioath.desktop $out/share/applications/yubioath.desktop
|
cp resources/yubioath-desktop.desktop \
|
||||||
|
$out/share/applications/yubioath-desktop.desktop
|
||||||
mkdir -p $out/share/yubioath/icons
|
mkdir -p $out/share/yubioath/icons
|
||||||
cp resources/yubioath*.{icns,ico,png,xpm} $out/share/yubioath/icons
|
cp resources/icons/*.{icns,ico,png,xpm} $out/share/yubioath/icons
|
||||||
substituteInPlace $out/share/applications/yubioath.desktop \
|
substituteInPlace $out/share/applications/yubioath-desktop.desktop \
|
||||||
--replace 'Exec=yubioath-gui' "Exec=$out/bin/yubioath-gui" \
|
--replace 'Exec=yubioath-desktop' "Exec=$out/bin/yubioath-desktop" \
|
||||||
--replace 'Icon=yubioath' "Icon=$out/share/yubioath/icons"
|
'';
|
||||||
|
|
||||||
'';
|
meta = with stdenv.lib; {
|
||||||
|
description = "Yubikey Desktop Authenticator";
|
||||||
|
|
||||||
meta = {
|
homepage = https://www.yubico.com/support/knowledge-base/categories/articles/yubico-authenticator-download/;
|
||||||
description = "Yubikey Desktop Authenticator";
|
|
||||||
|
|
||||||
homepage = https://www.yubico.com/support/knowledge-base/categories/articles/yubico-authenticator-download/;
|
license = stdenv.lib.licenses.gpl3;
|
||||||
|
maintainers = with maintainers; [ mic92 ];
|
||||||
license = stdenv.lib.licenses.gpl3;
|
};
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
29
pkgs/development/libraries/pyotherside/default.nix
Normal file
29
pkgs/development/libraries/pyotherside/default.nix
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
{ stdenv, fetchFromGitHub
|
||||||
|
, python3, qmake, qtbase, qtquickcontrols, qtsvg, ncurses }:
|
||||||
|
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
pname = "pyotherside";
|
||||||
|
version = "1.5.3";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "thp";
|
||||||
|
repo = "pyotherside";
|
||||||
|
rev = version;
|
||||||
|
sha256 = "1xaw1aarj8gpgpm4z3lk8klbssadrsf3xdyzqx10zcwy16amka7k";
|
||||||
|
};
|
||||||
|
|
||||||
|
nativeBuildInputs = [ qmake ];
|
||||||
|
buildInputs = [
|
||||||
|
python3 qtbase qtquickcontrols qtsvg ncurses
|
||||||
|
];
|
||||||
|
|
||||||
|
patches = [ ./qml-path.patch ];
|
||||||
|
installTargets = [ "sub-src-install_subtargets" ];
|
||||||
|
|
||||||
|
meta = with stdenv.lib; {
|
||||||
|
description = "Asynchronous Python 3 Bindings for Qt 5";
|
||||||
|
homepage = https://thp.io/2011/pyotherside/;
|
||||||
|
license = licenses.isc;
|
||||||
|
maintainers = [ maintainers.mic92 ];
|
||||||
|
};
|
||||||
|
}
|
12
pkgs/development/libraries/pyotherside/qml-path.patch
Normal file
12
pkgs/development/libraries/pyotherside/qml-path.patch
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
diff -Naur --strip-trailing-cr source.org/src/src.pro source/src/src.pro
|
||||||
|
--- source.org/src/src.pro 1970-01-01 01:00:01.000000000 +0100
|
||||||
|
+++ source/src/src.pro 2019-01-17 19:14:46.256821852 +0000
|
||||||
|
@@ -10,7 +10,7 @@
|
||||||
|
CONFIG += qt plugin
|
||||||
|
QT += qml quick svg
|
||||||
|
|
||||||
|
-target.path = $$[QT_INSTALL_QML]/$$PLUGIN_IMPORT_PATH
|
||||||
|
+target.path = $$NIX_OUTPUT_QML/$$PLUGIN_IMPORT_PATH
|
||||||
|
INSTALLS += target
|
||||||
|
|
||||||
|
qmldir.files += $$_PRO_FILE_PWD_/qmldir $$_PRO_FILE_PWD_/pyotherside.qmltypes
|
@ -1,17 +1,16 @@
|
|||||||
{ pythonPackages, fetchurl, lib,
|
{ python3Packages, fetchurl, lib,
|
||||||
yubikey-personalization, libu2f-host, libusb1 }:
|
yubikey-personalization, libu2f-host, libusb1 }:
|
||||||
|
|
||||||
pythonPackages.buildPythonPackage rec {
|
python3Packages.buildPythonPackage rec {
|
||||||
name = "yubikey-manager-1.0.1";
|
name = "yubikey-manager-2.0.0";
|
||||||
|
|
||||||
srcs = fetchurl {
|
srcs = fetchurl {
|
||||||
url = "https://developers.yubico.com/yubikey-manager/Releases/${name}.tar.gz";
|
url = "https://developers.yubico.com/yubikey-manager/Releases/${name}.tar.gz";
|
||||||
sha256 = "0i7w1f89hqlw7g800fjhbb6yvq9wjmj5d7w7p6v8bkyvk645v48z";
|
sha256 = "1x36pyg9g3by2pa11j6d73d79sdlb7qy98lwwn05f43fjm74qnz9";
|
||||||
};
|
};
|
||||||
|
|
||||||
propagatedBuildInputs =
|
propagatedBuildInputs =
|
||||||
with pythonPackages;
|
with python3Packages; [
|
||||||
lib.optional (!pythonPackages.pythonAtLeast "3.4") enum34 ++ [
|
|
||||||
click
|
click
|
||||||
cryptography
|
cryptography
|
||||||
pyscard
|
pyscard
|
||||||
@ -44,6 +43,6 @@ pythonPackages.buildPythonPackage rec {
|
|||||||
|
|
||||||
license = licenses.bsd2;
|
license = licenses.bsd2;
|
||||||
platforms = platforms.unix;
|
platforms = platforms.unix;
|
||||||
maintainers = with maintainers; [ benley ];
|
maintainers = with maintainers; [ benley mic92 ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -12096,6 +12096,8 @@ in
|
|||||||
qtxmlpatterns = qt59.qtxmlpatterns;
|
qtxmlpatterns = qt59.qtxmlpatterns;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
pyotherside = libsForQt5.callPackage ../development/libraries/pyotherside {};
|
||||||
|
|
||||||
re2 = callPackage ../development/libraries/re2 { };
|
re2 = callPackage ../development/libraries/re2 { };
|
||||||
|
|
||||||
qbs = libsForQt5.callPackage ../development/tools/build-managers/qbs { };
|
qbs = libsForQt5.callPackage ../development/tools/build-managers/qbs { };
|
||||||
@ -13115,7 +13117,7 @@ in
|
|||||||
|
|
||||||
yojimbo = callPackage ../development/libraries/yojimbo { };
|
yojimbo = callPackage ../development/libraries/yojimbo { };
|
||||||
|
|
||||||
yubioath-desktop = callPackage ../applications/misc/yubioath-desktop { };
|
yubioath-desktop = libsForQt5.callPackage ../applications/misc/yubioath-desktop { };
|
||||||
|
|
||||||
yubico-piv-tool = callPackage ../tools/misc/yubico-piv-tool { };
|
yubico-piv-tool = callPackage ../tools/misc/yubico-piv-tool { };
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user