yubikey-manager-qt: 1.1.5 -> 1.2.2 (#123118)

This commit is contained in:
Robert Schütz 2021-05-16 20:36:16 +02:00 committed by GitHub
parent 805825cc52
commit de9e2ce42d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 31 additions and 25 deletions

View File

@ -1,53 +1,61 @@
{ lib
, stdenv
, mkDerivation
, fetchurl
, wrapQtAppsHook
, pcsclite
, pyotherside
, pythonPackages
, python3
, qmake
, qtbase
, qtgraphicaleffects
, qtquickcontrols
, qtquickcontrols2
, yubikey-manager
, yubikey-personalization
}:
stdenv.mkDerivation rec {
mkDerivation rec {
pname = "yubikey-manager-qt";
version = "1.1.5";
version = "1.2.2";
src = fetchurl {
url = "https://developers.yubico.com/${pname}/Releases/${pname}-${version}.tar.gz";
sha256 = "1yimlaqvhq34gw6wkqgil0qq8x9zbfzh4psqihjr2d9jaa2wygwy";
sha256 = "1jqibv7na9h2r8nxgzp40j9qpyiwx97c65krivkcqjwdjk5lrahl";
};
nativeBuildInputs = [ wrapQtAppsHook python3.pkgs.wrapPython qmake ];
nativeBuildInputs = [
python3.pkgs.wrapPython
qmake
];
postPatch = ''
substituteInPlace ykman-gui/deployment.pri --replace '/usr/bin' "$out/bin"
'';
buildInputs = [ pythonPackages.python qtbase qtgraphicaleffects qtquickcontrols qtquickcontrols2 pyotherside ];
buildInputs = [
pyotherside
python3
qtbase
qtgraphicaleffects
qtquickcontrols2
];
pythonPath = [ yubikey-manager ];
pythonPath = [
(yubikey-manager.override { python3Packages = python3.pkgs; })
];
dontWrapQtApps = true;
postInstall = ''
buildPythonPath "$pythonPath"
wrapQtApp $out/bin/ykman-gui \
--prefix LD_LIBRARY_PATH : "${lib.getLib pcsclite}/lib:${yubikey-personalization}/lib" \
--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 -Dt $out/share/applications resources/ykman-gui.desktop
install -Dt $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" \
--replace 'Exec=ykman-gui' "Exec=$out/bin/ykman-gui"
'';
qtWrapperArgs = [
"--prefix" "LD_LIBRARY_PATH" ":" (lib.makeLibraryPath [ pcsclite yubikey-personalization ])
];
preFixup = ''
buildPythonPath "$pythonPath"
qtWrapperArgs+=(--prefix PYTHONPATH : "$program_PYTHONPATH")
'';
meta = with lib; {

View File

@ -18289,9 +18289,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-personalization = callPackage ../tools/misc/yubikey-personalization { };