Skip to content
Permalink
Browse files

yubikey-manager-qt: build using Qt mkDerivation

  • Loading branch information
peterhoeg committed Aug 28, 2019
1 parent 3f4144c commit 08d3c59d20849be3818e74d5b05ca1d21e40f06e
Showing with 18 additions and 24 deletions.
  1. +17 −21 pkgs/tools/misc/yubikey-manager-qt/default.nix
  2. +1 −3 pkgs/top-level/all-packages.nix
@@ -1,24 +1,21 @@
{ stdenv
, fetchurl
, wrapQtAppsHook
{ fetchurl
, lib
, mkDerivation
, pcsclite
, pyotherside
, pythonPackages
, python3
, python3Packages
, qmake
, qtbase
, qtdeclarative
, qtgraphicaleffects
, qtquickcontrols
, qtquickcontrols2
, qtdeclarative
, qtsvg
, yubikey-manager
, yubikey-personalization
}:

let inherit (stdenv) lib; in

stdenv.mkDerivation rec {
mkDerivation rec {
pname = "yubikey-manager-qt";
version = "1.1.3";

@@ -27,30 +24,29 @@ stdenv.mkDerivation rec {
sha256 = "087ms9i0n3rm8a0hvc4a2dk3rffbm6rmgz0m8gbjk6g37iml6nb7";
};

nativeBuildInputs = [ wrapQtAppsHook python3.pkgs.wrapPython qmake ];

postPatch = ''
substituteInPlace ykman-gui/deployment.pri --replace '/usr/bin' "$out/bin"
substituteInPlace ykman-gui/deployment.pri \
--replace /usr/bin $out/bin
'';

buildInputs = [ pythonPackages.python qtbase qtgraphicaleffects qtquickcontrols qtquickcontrols2 pyotherside ];
buildInputs = [ python3Packages.python qtbase qtgraphicaleffects qtquickcontrols qtquickcontrols2 pyotherside ];

nativeBuildInputs = [ python3Packages.wrapPython qmake ];

enableParallelBuilding = true;

pythonPath = [ yubikey-manager ];

dontWrapQtApps = true;
postInstall = ''
buildPythonPath "$pythonPath"
wrapQtApp $out/bin/ykman-gui \
--prefix LD_LIBRARY_PATH : "${stdenv.lib.getLib pcsclite}/lib:${yubikey-personalization}/lib" \
qtWrapperArgs+=(
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ pcsclite yubikey-personalization]}"
--prefix PYTHONPATH : "$program_PYTHONPATH"
)
mkdir -p $out/share/applications
cp resources/ykman-gui.desktop $out/share/applications/ykman-gui.desktop
mkdir -p $out/share/ykman-gui/icons
cp resources/icons/*.{icns,ico,png,xpm} $out/share/ykman-gui/icons
install -Dm444 -t $out/share/applications resources/ykman-gui.desktop
install -Dm444 -t $out/share/ykman-gui/icons resources/icons/*.{icns,ico,png,xpm}
substituteInPlace $out/share/applications/ykman-gui.desktop \
--replace 'Exec=ykman-gui' "Exec=$out/bin/ykman-gui" \
'';
@@ -60,7 +56,7 @@ stdenv.mkDerivation rec {
description = "Cross-platform application for configuring any YubiKey over all USB interfaces.";
homepage = https://developers.yubico.com/yubikey-manager-qt/;
license = licenses.bsd2;
maintainers = [ maintainers.cbley ];
maintainers = with maintainers; [ cbley ];
platforms = platforms.linux;
};
}
@@ -14150,9 +14150,7 @@ in

yubikey-manager = callPackage ../tools/misc/yubikey-manager { };

yubikey-manager-qt = libsForQt5.callPackage ../tools/misc/yubikey-manager-qt {
pythonPackages = python3Packages;
};
yubikey-manager-qt = libsForQt5.callPackage ../tools/misc/yubikey-manager-qt { };

yubikey-neo-manager = callPackage ../tools/misc/yubikey-neo-manager { };

0 comments on commit 08d3c59

Please sign in to comment.
You can’t perform that action at this time.