wrapQtAppsHook: Remove ad hoc Qt wrappers
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{ stdenv
|
||||
, fetchurl
|
||||
, makeWrapper
|
||||
, wrapQtAppsHook
|
||||
, pcsclite
|
||||
, pyotherside
|
||||
, pythonPackages
|
||||
@@ -16,16 +16,9 @@
|
||||
, yubikey-personalization
|
||||
}:
|
||||
|
||||
let
|
||||
qmlPath = qmlLib: "${qmlLib}/${qtbase.qtQmlPrefix}";
|
||||
let inherit (stdenv) lib; in
|
||||
|
||||
inherit (stdenv) lib;
|
||||
|
||||
qml2ImportPath = lib.concatMapStringsSep ":" qmlPath [
|
||||
qtbase.bin qtdeclarative.bin pyotherside qtquickcontrols qtquickcontrols2.bin qtgraphicaleffects
|
||||
];
|
||||
|
||||
in stdenv.mkDerivation rec {
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "yubikey-manager-qt";
|
||||
version = "1.1.1";
|
||||
|
||||
@@ -34,7 +27,7 @@ in stdenv.mkDerivation rec {
|
||||
sha256 = "0hcfl0mh4gqy9c8ghmi58asqr8v009n6li0mgcy3r8fyjr7qryvy";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ makeWrapper python3.pkgs.wrapPython qmake ];
|
||||
nativeBuildInputs = [ wrapQtAppsHook python3.pkgs.wrapPython qmake ];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace ykman-gui/deployment.pri --replace '/usr/bin' "$out/bin"
|
||||
@@ -46,22 +39,20 @@ in stdenv.mkDerivation rec {
|
||||
|
||||
pythonPath = [ yubikey-manager ];
|
||||
|
||||
dontWrapQtApps = true;
|
||||
postInstall = ''
|
||||
buildPythonPath "$pythonPath"
|
||||
|
||||
wrapProgram $out/bin/ykman-gui \
|
||||
wrapQtApp $out/bin/ykman-gui \
|
||||
--prefix LD_LIBRARY_PATH : "${stdenv.lib.getLib pcsclite}/lib:${yubikey-personalization}/lib" \
|
||||
--prefix PYTHONPATH : "$program_PYTHONPATH" \
|
||||
--set QML2_IMPORT_PATH "${qml2ImportPath}" \
|
||||
--set QT_QPA_PLATFORM_PLUGIN_PATH ${qtbase.bin}/lib/qt-*/plugins/platforms \
|
||||
--prefix QT_PLUGIN_PATH : "${qtsvg.bin}/${qtbase.qtPluginPrefix}"
|
||||
--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
|
||||
substituteInPlace $out/share/applications/ykman-gui.desktop \
|
||||
--replace 'Exec=ykman-gui' "Exec=$out/bin/ykman-gui" \
|
||||
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
|
||||
substituteInPlace $out/share/applications/ykman-gui.desktop \
|
||||
--replace 'Exec=ykman-gui' "Exec=$out/bin/ykman-gui" \
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
|
||||
Reference in New Issue
Block a user