@@ -0,0 +1,45 @@
1+{ lib
2+, mkDerivation
3+, makeWrapper
4+, fetchFromGitHub
5+, cmake
6+, extra-cmake-modules
7+, qtbase
8+, qtquickcontrols2
9+, qtdeclarative
10+, qtgraphicaleffects
11+, kirigami2
12+, oathToolkit
13+}:
14+mkDerivation rec {
15+
16+ pname = "keysmith";
17+ version = "0.1";
18+
19+ src = fetchFromGitHub {
20+ owner = "KDE";
21+ repo = "keysmith";
22+ rev = "v${version}";
23+ sha256 = "15fzf0bvarivm32zqa5w71mscpxdac64ykiawc5hx6kplz93bsgx";
24+ };
25+
26+ nativeBuildInputs = [ cmake extra-cmake-modules makeWrapper ];
27+
28+ buildInputs = [ oathToolkit kirigami2 qtquickcontrols2 qtbase ];
29+
30+ postInstall = ''
31+ mv $out/bin/org.kde.keysmith $out/bin/.org.kde.keysmith-wrapped
32+ makeWrapper $out/bin/.org.kde.keysmith-wrapped $out/bin/org.kde.keysmith \
33+ --set QML2_IMPORT_PATH "${lib.getLib kirigami2}/lib/qt-5.12.7/qml:${lib.getBin qtquickcontrols2}/lib/qt-5.12.7/qml:${lib.getBin qtdeclarative}/lib/qt-5.12.7/qml:${qtgraphicaleffects}/lib/qt-5.12.7/qml" \
34+ --set QT_PLUGIN_PATH "${lib.getBin qtbase}/lib/qt-5.12.7/plugins"
35+ ln -s $out/bin/org.kde.keysmith $out/bin/keysmith
36+ '';
37+
38+ meta = with lib; {
39+ description = "OTP client for Plasma Mobile and Desktop";
40+ license = licenses.gpl3;
41+ homepage = "https://github.com/KDE/keysmith";
42+ maintainers = with maintainers; [ shamilton ];
43+ platforms = platforms.linux;
44+ };
45+}