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.
This commit is contained in:
parent
d89634ad55
commit
703e8763d5
@ -6,18 +6,23 @@
|
|||||||
, pythonPackages
|
, pythonPackages
|
||||||
, python3
|
, python3
|
||||||
, qmake
|
, qmake
|
||||||
, qt5
|
, qtbase
|
||||||
|
, qtgraphicaleffects
|
||||||
|
, qtquickcontrols
|
||||||
|
, qtquickcontrols2
|
||||||
|
, qtdeclarative
|
||||||
|
, qtsvg
|
||||||
, yubikey-manager
|
, yubikey-manager
|
||||||
, yubikey-personalization
|
, yubikey-personalization
|
||||||
}:
|
}:
|
||||||
|
|
||||||
with stdenv;
|
|
||||||
|
|
||||||
let
|
let
|
||||||
qmlPath = qmlLib: "${qmlLib}/${qt5.qtbase.qtQmlPrefix}";
|
qmlPath = qmlLib: "${qmlLib}/${qtbase.qtQmlPrefix}";
|
||||||
|
|
||||||
|
inherit (stdenv) lib;
|
||||||
|
|
||||||
qml2ImportPath = lib.concatMapStringsSep ":" qmlPath [
|
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 {
|
in stdenv.mkDerivation rec {
|
||||||
@ -37,7 +42,7 @@ in stdenv.mkDerivation rec {
|
|||||||
substituteInPlace ykman-gui/deployment.pri --replace '/usr/bin' "$out/bin"
|
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;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
@ -50,11 +55,9 @@ in stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
wrapProgram $out/bin/ykman-gui \
|
wrapProgram $out/bin/ykman-gui \
|
||||||
--prefix PYTHONPATH : "$program_PYTHONPATH" \
|
--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 QML2_IMPORT_PATH "${qml2ImportPath}" \
|
||||||
--set QT_QPA_PLATFORM_PLUGIN_PATH ${qt5.qtbase.bin}/lib/qt-*/plugins/platforms \
|
--set QT_QPA_PLATFORM_PLUGIN_PATH ${qtbase.bin}/lib/qt-*/plugins/platforms \
|
||||||
--prefix QT_PLUGIN_PATH : "${qt5.qtsvg.bin}/${qt5.qtbase.qtPluginPrefix}"
|
--prefix QT_PLUGIN_PATH : "${qtsvg.bin}/${qtbase.qtPluginPrefix}"
|
||||||
|
|
||||||
mkdir -p $out/share/applications
|
mkdir -p $out/share/applications
|
||||||
cp resources/ykman-gui.desktop $out/share/applications/ykman-gui.desktop
|
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" \
|
--replace 'Exec=ykman-gui' "Exec=$out/bin/ykman-gui" \
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with lib; {
|
||||||
inherit version;
|
inherit version;
|
||||||
description = "Cross-platform application for configuring any YubiKey over all USB interfaces.";
|
description = "Cross-platform application for configuring any YubiKey over all USB interfaces.";
|
||||||
homepage = https://developers.yubico.com/yubikey-manager-qt/;
|
homepage = https://developers.yubico.com/yubikey-manager-qt/;
|
||||||
|
Loading…
Reference in New Issue
Block a user