nixpkgs-suyu/pkgs/tools/misc/yubikey-manager-qt/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

69 lines
1.6 KiB
Nix
Raw Normal View History

2021-01-27 06:44:43 +01:00
{ lib
, mkDerivation
2019-02-11 23:21:53 +01:00
, fetchurl
, pcsclite
2019-02-11 23:21:53 +01:00
, pyotherside
, python3
, qmake
, qtbase
, qtgraphicaleffects
, qtquickcontrols2
2019-02-11 23:21:53 +01:00
, yubikey-manager
, yubikey-personalization
}:
mkDerivation rec {
2019-02-11 23:21:53 +01:00
pname = "yubikey-manager-qt";
2021-10-28 03:01:48 +02:00
version = "1.2.4";
2019-02-11 23:21:53 +01:00
src = fetchurl {
url = "https://developers.yubico.com/${pname}/Releases/${pname}-${version}.tar.gz";
2021-10-28 03:01:48 +02:00
sha256 = "sha256-PxHc7IeRsO+CPrNTofGypLLW8fSHDkcBqr75NwdlUyc=";
2019-02-11 23:21:53 +01:00
};
nativeBuildInputs = [
python3.pkgs.wrapPython
qmake
];
2019-02-11 23:21:53 +01:00
postPatch = ''
substituteInPlace ykman-gui/deployment.pri --replace '/usr/bin' "$out/bin"
'';
buildInputs = [
pyotherside
python3
qtbase
qtgraphicaleffects
qtquickcontrols2
];
2019-02-11 23:21:53 +01:00
pythonPath = [
(yubikey-manager.override { python3Packages = python3.pkgs; })
];
2019-02-11 23:21:53 +01:00
postInstall = ''
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"
'';
2019-02-11 23:21:53 +01:00
qtWrapperArgs = [
"--prefix" "LD_LIBRARY_PATH" ":" (lib.makeLibraryPath [ pcsclite yubikey-personalization ])
];
2019-02-11 23:21:53 +01:00
preFixup = ''
buildPythonPath "$pythonPath"
qtWrapperArgs+=(--prefix PYTHONPATH : "$program_PYTHONPATH")
2019-02-11 23:21:53 +01:00
'';
meta = with lib; {
description = "Cross-platform application for configuring any YubiKey over all USB interfaces";
homepage = "https://developers.yubico.com/yubikey-manager-qt/";
2019-02-11 23:21:53 +01:00
license = licenses.bsd2;
maintainers = [ maintainers.cbley ];
platforms = platforms.linux;
};
}