-
-
Notifications
You must be signed in to change notification settings - Fork 14.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #54215 from Mic92/yubikey
yubioath-desktop: 3.1.0 -> 4.3.4; yubikey-manager: 1.0.1 -> 2.0.0
- Loading branch information
Showing
5 changed files
with
93 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 { | ||
namePrefix = ""; | ||
name = "yubioath-desktop-${version}"; | ||
version = "3.1.0"; | ||
stdenv.mkDerivation rec { | ||
pname = "yubioath-desktop"; | ||
version = "4.3.4"; | ||
|
||
src = fetchurl { | ||
url = "https://developers.yubico.com/yubioath-desktop/Releases/yubioath-desktop-${version}.tar.gz"; | ||
sha256 = "0jfvllgh88g2vwd8sg6willlnn2hq05nd9d3xmv98lhl7gyy1akw"; | ||
}; | ||
src = fetchurl { | ||
url = "https://developers.yubico.com/yubioath-desktop/Releases/yubioath-desktop-${version}.tar.gz"; | ||
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 | ||
# support that the yubicommon library uses to load libykpers | ||
makeWrapperArgs = ''--prefix LD_LIBRARY_PATH : "${stdenv.lib.getLib pcsclite}/lib:${yubikey-personalization}/lib" --prefix LD_PRELOAD : "${yubikey-personalization}/lib/libykpers-1.so"''; | ||
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" \ | ||
--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 | ||
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 | ||
cp resources/yubioath*.{icns,ico,png,xpm} $out/share/yubioath/icons | ||
substituteInPlace $out/share/applications/yubioath.desktop \ | ||
--replace 'Exec=yubioath-gui' "Exec=$out/bin/yubioath-gui" \ | ||
--replace 'Icon=yubioath' "Icon=$out/share/yubioath/icons" | ||
''; | ||
cp resources/icons/*.{icns,ico,png,xpm} $out/share/yubioath/icons | ||
substituteInPlace $out/share/applications/yubioath-desktop.desktop \ | ||
--replace 'Exec=yubioath-desktop' "Exec=$out/bin/yubioath-desktop" \ | ||
''; | ||
|
||
meta = { | ||
description = "Yubikey Desktop Authenticator"; | ||
meta = with stdenv.lib; { | ||
description = "Yubikey Desktop Authenticator"; | ||
|
||
homepage = https://www.yubico.com/support/knowledge-base/categories/articles/yubico-authenticator-download/; | ||
homepage = https://www.yubico.com/support/knowledge-base/categories/articles/yubico-authenticator-download/; | ||
|
||
license = stdenv.lib.licenses.gpl3; | ||
}; | ||
license = stdenv.lib.licenses.gpl3; | ||
maintainers = with maintainers; [ mic92 ]; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 ]; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters