about summary refs log tree commit diff
path: root/pkgs/tools
diff options
context:
space:
mode:
authorMaximilian Bosch <maximilian@mbosch.me>2019-02-15 22:19:35 +0100
committerMaximilian Bosch <maximilian@mbosch.me>2019-02-15 22:19:35 +0100
commit703e8763d5d0eca99e0d86c22f4d863b903fbb0f (patch)
tree07218998a66fd09bdcc88b064888cc7e9e0c383c /pkgs/tools
parentd89634ad55f96316ae0b8d6b7f6a1db929dce975 (diff)
downloadnixlib-703e8763d5d0eca99e0d86c22f4d863b903fbb0f.tar
nixlib-703e8763d5d0eca99e0d86c22f4d863b903fbb0f.tar.gz
nixlib-703e8763d5d0eca99e0d86c22f4d863b903fbb0f.tar.bz2
nixlib-703e8763d5d0eca99e0d86c22f4d863b903fbb0f.tar.lz
nixlib-703e8763d5d0eca99e0d86c22f4d863b903fbb0f.tar.xz
nixlib-703e8763d5d0eca99e0d86c22f4d863b903fbb0f.tar.zst
nixlib-703e8763d5d0eca99e0d86c22f4d863b903fbb0f.zip
yubikey-manager-qt: cleanup
* Explicitly specify all QT dependencies rather than import from the
  `qt5` attr set. This makes overrides of a single library easier.

* Drop the superfluous `with stdenv` expression and reference lib or
  stdenv itself where possible.

* Don't manually configure shared libraries to load. This is mostly done
  automatically during the build steps.
Diffstat (limited to 'pkgs/tools')
-rw-r--r--pkgs/tools/misc/yubikey-manager-qt/default.nix25
1 files changed, 14 insertions, 11 deletions
diff --git a/pkgs/tools/misc/yubikey-manager-qt/default.nix b/pkgs/tools/misc/yubikey-manager-qt/default.nix
index a463faa43503..c8521efb28d6 100644
--- a/pkgs/tools/misc/yubikey-manager-qt/default.nix
+++ b/pkgs/tools/misc/yubikey-manager-qt/default.nix
@@ -6,18 +6,23 @@
 , pythonPackages
 , python3
 , qmake
-, qt5
+, qtbase
+, qtgraphicaleffects
+, qtquickcontrols
+, qtquickcontrols2
+, qtdeclarative
+, qtsvg
 , yubikey-manager
 , yubikey-personalization
 }:
 
-with stdenv;
-
 let
-  qmlPath = qmlLib: "${qmlLib}/${qt5.qtbase.qtQmlPrefix}";
+  qmlPath = qmlLib: "${qmlLib}/${qtbase.qtQmlPrefix}";
+
+  inherit (stdenv) lib;
 
   qml2ImportPath = lib.concatMapStringsSep ":" qmlPath [
-    qt5.qtbase.bin qt5.qtdeclarative.bin pyotherside qt5.qtquickcontrols qt5.qtquickcontrols2.bin qt5.qtgraphicaleffects
+    qtbase.bin qtdeclarative.bin pyotherside qtquickcontrols qtquickcontrols2.bin qtgraphicaleffects
   ];
 
 in stdenv.mkDerivation rec {
@@ -37,7 +42,7 @@ in stdenv.mkDerivation rec {
     substituteInPlace ykman-gui/deployment.pri --replace '/usr/bin' "$out/bin"
   '';
 
-  buildInputs = [ pythonPackages.python qt5.qtbase qt5.qtgraphicaleffects qt5.qtquickcontrols qt5.qtquickcontrols2 pyotherside ];
+  buildInputs = [ pythonPackages.python qtbase qtgraphicaleffects qtquickcontrols qtquickcontrols2 pyotherside ];
 
   enableParallelBuilding = true;
 
@@ -50,11 +55,9 @@ in stdenv.mkDerivation rec {
 
     wrapProgram $out/bin/ykman-gui \
       --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" \
       --set QML2_IMPORT_PATH "${qml2ImportPath}" \
-      --set QT_QPA_PLATFORM_PLUGIN_PATH ${qt5.qtbase.bin}/lib/qt-*/plugins/platforms \
-      --prefix QT_PLUGIN_PATH : "${qt5.qtsvg.bin}/${qt5.qtbase.qtPluginPrefix}"
+      --set QT_QPA_PLATFORM_PLUGIN_PATH ${qtbase.bin}/lib/qt-*/plugins/platforms \
+      --prefix QT_PLUGIN_PATH : "${qtsvg.bin}/${qtbase.qtPluginPrefix}"
 
       mkdir -p $out/share/applications
       cp resources/ykman-gui.desktop $out/share/applications/ykman-gui.desktop
@@ -64,7 +67,7 @@ in stdenv.mkDerivation rec {
         --replace 'Exec=ykman-gui' "Exec=$out/bin/ykman-gui" \
   '';
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     inherit version;
     description = "Cross-platform application for configuring any YubiKey over all USB interfaces.";
     homepage = https://developers.yubico.com/yubikey-manager-qt/;