From bfc75c749141bd8272b9c68ca1d678dfe789f3cb Mon Sep 17 00:00:00 2001 From: Christoph Neidahl Date: Sat, 15 Apr 2023 00:42:03 +0200 Subject: [PATCH] libsForQt5.qtsystems: init at unstable-2019-01-03 (#214179) --- .../libraries/qt-5/5.15/default.nix | 8 +++ pkgs/development/libraries/qt-5/5.15/srcs.nix | 11 ++++ .../libraries/qt-5/modules/qtsystems.nix | 54 +++++++++++++++++++ 3 files changed, 73 insertions(+) create mode 100644 pkgs/development/libraries/qt-5/modules/qtsystems.nix diff --git a/pkgs/development/libraries/qt-5/5.15/default.nix b/pkgs/development/libraries/qt-5/5.15/default.nix index 3b2979d3abc..70083fe56f4 100644 --- a/pkgs/development/libraries/qt-5/5.15/default.nix +++ b/pkgs/development/libraries/qt-5/5.15/default.nix @@ -54,6 +54,13 @@ let ]; qtscript = [ ./qtscript.patch ]; qtserialport = [ ./qtserialport.patch ]; + qtsystems = [ + # Enable building with udisks support + (fetchpatch { + url = "https://salsa.debian.org/qt-kde-team/qt/qtsystems/-/raw/a23fd92222c33479d7f3b59e48116def6b46894c/debian/patches/2001_build_with_udisk.patch"; + hash = "sha256-B/z/+tai01RU/bAJSCp5a0/dGI8g36nwso8MiJv27YM="; + }) + ]; qtwebengine = [ (fetchpatch { url = "https://raw.githubusercontent.com/Homebrew/formula-patches/a6f16c6daea3b5a1f7bc9f175d1645922c131563/qt5/qt5-webengine-python3.patch"; @@ -166,6 +173,7 @@ let qtserialport = callPackage ../modules/qtserialport.nix {}; qtspeech = callPackage ../modules/qtspeech.nix {}; qtsvg = callPackage ../modules/qtsvg.nix {}; + qtsystems = callPackage ../modules/qtsystems.nix {}; qtscxml = callPackage ../modules/qtscxml.nix {}; qttools = callPackage ../modules/qttools.nix {}; qttranslations = callPackage ../modules/qttranslations.nix {}; diff --git a/pkgs/development/libraries/qt-5/5.15/srcs.nix b/pkgs/development/libraries/qt-5/5.15/srcs.nix index 0603ae077e4..a650955795a 100644 --- a/pkgs/development/libraries/qt-5/5.15/srcs.nix +++ b/pkgs/development/libraries/qt-5/5.15/srcs.nix @@ -34,6 +34,17 @@ lib.mapAttrs mk (lib.importJSON ./srcs-generated.json) version = "5.212.0-alpha4"; }; + # qtsystems has no official releases + qtsystems = { + version = "unstable-2019-01-03"; + src = fetchFromGitHub { + owner = "qt"; + repo = "qtsystems"; + rev = "e3332ee38d27a134cef6621fdaf36687af1b6f4a"; + hash = "sha256-P8MJgWiDDBCYo+icbNva0LODy0W+bmQTS87ggacuMP0="; + }; + }; + catapult = fetchgit { url = "https://chromium.googlesource.com/catapult"; rev = "5eedfe23148a234211ba477f76fc2ea2e8529189"; diff --git a/pkgs/development/libraries/qt-5/modules/qtsystems.nix b/pkgs/development/libraries/qt-5/modules/qtsystems.nix new file mode 100644 index 00000000000..32974bdecc6 --- /dev/null +++ b/pkgs/development/libraries/qt-5/modules/qtsystems.nix @@ -0,0 +1,54 @@ +{ qtModule +, stdenv +, lib +, bluez +, libevdev +, libX11 +, pkg-config +, qtbase +, udev +, wrapQtAppsHook +}: + +qtModule { + pname = "qtsystems"; + + outputs = [ + "out" + "dev" + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ + "bin" + ]; + + qtInputs = [ + qtbase + ]; + + nativeBuildInputs = [ + pkg-config + wrapQtAppsHook + ]; + + buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ + bluez + libevdev + libX11 + udev + ]; + + qmakeFlags = [ + "CONFIG+=git_build" + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ + "CONFIG+=ofono" + "CONFIG+=udisks" + "CONFIG+=upower" + ]; + + postFixup = lib.optionalString stdenv.hostPlatform.isLinux '' + wrapQtApp $bin/bin/servicefw + ''; + + meta = { + maintainers = with lib.maintainers; [ OPNA2608 ]; + }; +}