From 9218434c94ff5d5d23607e00428c94a475681801 Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Fri, 28 Jul 2023 18:39:19 +0200 Subject: [PATCH 1/2] qmenumodel: init at 0.9.1 --- .../libraries/qmenumodel/default.nix | 99 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 4 + 2 files changed, 103 insertions(+) create mode 100644 pkgs/development/libraries/qmenumodel/default.nix diff --git a/pkgs/development/libraries/qmenumodel/default.nix b/pkgs/development/libraries/qmenumodel/default.nix new file mode 100644 index 0000000000000..101fb1eeaaaeb --- /dev/null +++ b/pkgs/development/libraries/qmenumodel/default.nix @@ -0,0 +1,99 @@ +{ stdenv +, lib +, fetchFromGitHub +, gitUpdater +, testers +, cmake +, cmake-extras +, dbus +, dbus-test-runner +, glib +, pkg-config +, python3 +, qtbase +, qtdeclarative +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "qmenumodel"; + version = "0.9.1"; + + src = fetchFromGitHub { + owner = "AyatanaIndicators"; + repo = "qmenumodel"; + rev = finalAttrs.version; + hash = "sha256-cKolDRMamLWV8ASFLp1k0xslNAqVRCuM3/xvvBG98RI="; + }; + + outputs = [ "out" "dev" ]; + + postPatch = '' + substituteInPlace libqmenumodel/src/qmenumodel.pc.in \ + --replace "\''${exec_prefix}/@CMAKE_INSTALL_LIBDIR@" "\''${prefix}/lib" \ + --replace "\''${prefix}/@CMAKE_INSTALL_INCLUDEDIR@" "\''${prefix}/include" + + substituteInPlace libqmenumodel/QMenuModel/CMakeLists.txt \ + --replace "\''${CMAKE_INSTALL_LIBDIR}/qt5/qml" "\''${CMAKE_INSTALL_PREFIX}/${qtbase.qtQmlPrefix}" + '' + lib.optionalString finalAttrs.doCheck '' + patchShebangs tests/{client,script}/*.py + ''; + + strictDeps = true; + + nativeBuildInputs = [ + cmake + pkg-config + ]; + + buildInputs = [ + cmake-extras + glib + qtbase + qtdeclarative + ]; + + nativeCheckInputs = [ + dbus + dbus-test-runner + (python3.withPackages (ps: with ps; [ + dbus-python + pygobject3 + ])) + ]; + + dontWrapQtApps = true; + + cmakeFlags = [ + "-DENABLE_TESTS=${lib.boolToString finalAttrs.doCheck}" + ]; + + doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform; + + # Tests have been flaky sometimes, hoping that not running in parallel helps + enableParallelChecking = false; + + preCheck = '' + # Tests all need some Qt stuff + export QT_PLUGIN_PATH=${lib.getBin qtbase}/${qtbase.qtPluginPrefix} + ''; + + passthru = { + tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage; + updateScript = gitUpdater { }; + }; + + meta = with lib; { + description = "Qt5 renderer for Ayatana Indicators"; + longDescription = '' + QMenuModel - a Qt/QML binding for GMenuModel + (see http://developer.gnome.org/gio/unstable/GMenuModel.html) + ''; + homepage = "https://github.com/AyatanaIndicators/qmenumodel"; + license = licenses.lgpl3Only; + maintainers = teams.lomiri.members; + platforms = platforms.linux; + pkgConfigModules = [ + "qmenumodel" + ]; + }; +}) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 7d405fcd27401..2bf9d0bb0ce21 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -24801,6 +24801,10 @@ with pkgs; qdjango = libsForQt5.callPackage ../development/libraries/qdjango { }; + qmenumodel = libsForQt5.callPackage ../development/libraries/qmenumodel { + inherit (lomiri) cmake-extras; + }; + qoi = callPackage ../development/libraries/qoi { }; qolibri = libsForQt5.callPackage ../applications/misc/qolibri { }; From 8838eb98b55f27fdf1470ed43ba8ae7feee89b4d Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Sat, 30 Sep 2023 09:15:27 +0200 Subject: [PATCH 2/2] qmenumodel: 0.9.1 -> 0.9.2 --- pkgs/development/libraries/qmenumodel/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/qmenumodel/default.nix b/pkgs/development/libraries/qmenumodel/default.nix index 101fb1eeaaaeb..a8d11529808fe 100644 --- a/pkgs/development/libraries/qmenumodel/default.nix +++ b/pkgs/development/libraries/qmenumodel/default.nix @@ -16,13 +16,13 @@ stdenv.mkDerivation (finalAttrs: { pname = "qmenumodel"; - version = "0.9.1"; + version = "0.9.2"; src = fetchFromGitHub { owner = "AyatanaIndicators"; repo = "qmenumodel"; rev = finalAttrs.version; - hash = "sha256-cKolDRMamLWV8ASFLp1k0xslNAqVRCuM3/xvvBG98RI="; + hash = "sha256-zbKAfq9R5fD2IqVYOAhy903QX1TDom9m6Ib2qpkFMak="; }; outputs = [ "out" "dev" ];