1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 cmake,
6 qtbase,
7 qtsvg,
8 lxqt-build-tools,
9 wrapQtAppsHook,
10 gitUpdater,
11 version ? "4.2.0",
12}:
13
14stdenv.mkDerivation rec {
15 pname = "libqtxdg";
16 inherit version;
17
18 src = fetchFromGitHub {
19 owner = "lxqt";
20 repo = pname;
21 rev = version;
22 hash =
23 {
24 "3.12.0" = "sha256-y+3noaHubZnwUUs8vbMVvZPk+6Fhv37QXUb//reedCU=";
25 "4.2.0" = "sha256-TSyVYlWsmB/6gxJo+CjROBQaWsmYZAwkM8BwiWP+XBI=";
26 }
27 ."${version}";
28 };
29
30 nativeBuildInputs = [
31 cmake
32 lxqt-build-tools
33 wrapQtAppsHook
34 ];
35
36 buildInputs = [
37 qtbase
38 qtsvg
39 ];
40
41 preConfigure = ''
42 cmakeFlagsArray+=(
43 "-DQTXDGX_ICONENGINEPLUGIN_INSTALL_PATH=$out/$qtPluginPrefix/iconengines"
44 "-DCMAKE_INSTALL_INCLUDEDIR=include"
45 "-DCMAKE_INSTALL_LIBDIR=lib"
46 )
47 '';
48
49 passthru.updateScript = gitUpdater { };
50
51 meta = with lib; {
52 homepage = "https://github.com/lxqt/libqtxdg";
53 description = "Qt implementation of freedesktop.org xdg specs";
54 license = licenses.lgpl21Plus;
55 platforms = platforms.linux;
56 teams = [ teams.lxqt ];
57 };
58}