From 55b53ee558f3c54f5c9ca494d1996365dd585580 Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Thu, 5 Oct 2023 20:36:21 +0200 Subject: [PATCH] lomiri.lomiri-settings-components: init at 1.0.1 --- pkgs/desktops/lomiri/default.nix | 3 + .../lomiri-settings-components/default.nix | 65 +++++++++++++++++++ 2 files changed, 68 insertions(+) create mode 100644 pkgs/desktops/lomiri/qml/lomiri-settings-components/default.nix diff --git a/pkgs/desktops/lomiri/default.nix b/pkgs/desktops/lomiri/default.nix index bcaa19ab27df..3af148919630 100644 --- a/pkgs/desktops/lomiri/default.nix +++ b/pkgs/desktops/lomiri/default.nix @@ -18,6 +18,9 @@ let libusermetrics = callPackage ./development/libusermetrics { }; lomiri-api = callPackage ./development/lomiri-api { }; + #### QML / QML-related + lomiri-settings-components = callPackage ./qml/lomiri-settings-components { }; + #### Services biometryd = callPackage ./services/biometryd { }; }; diff --git a/pkgs/desktops/lomiri/qml/lomiri-settings-components/default.nix b/pkgs/desktops/lomiri/qml/lomiri-settings-components/default.nix new file mode 100644 index 000000000000..b18fcfa49856 --- /dev/null +++ b/pkgs/desktops/lomiri/qml/lomiri-settings-components/default.nix @@ -0,0 +1,65 @@ +{ stdenv +, lib +, fetchFromGitLab +, gitUpdater +, cmake +, cmake-extras +, pkg-config +, python3 +, qtbase +, qtdeclarative +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "lomiri-settings-components"; + version = "1.0.1"; + + src = fetchFromGitLab { + owner = "ubports"; + repo = "development/core/lomiri-settings-components"; + rev = finalAttrs.version; + hash = "sha256-Ybg+qyecvhPUDoIoq+0194u57imx7SxDMEmufGN22jM="; + }; + + postPatch = '' + patchShebangs tests/imports/check_imports.py + + substituteInPlace CMakeLists.txt \ + --replace "\''${CMAKE_INSTALL_LIBDIR}/qt5/qml" '${placeholder "out"}/${qtbase.qtQmlPrefix}' + '' + lib.optionalString (!finalAttrs.doCheck) '' + sed -i CMakeLists.txt \ + -e '/add_subdirectory(tests)/d' + ''; + + strictDeps = true; + + nativeBuildInputs = [ + cmake + pkg-config + ]; + + buildInputs = [ + cmake-extras + qtbase + qtdeclarative + ]; + + nativeCheckInputs = [ + python3 + ]; + + # No apps, just QML components + dontWrapQtApps = true; + + doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform; + + passthru.updateScript = gitUpdater { }; + + meta = with lib; { + description = "QML settings components for the Lomiri Desktop Environment"; + homepage = "https://gitlab.com/ubports/development/core/lomiri-settings-components"; + license = licenses.lgpl3Only; + maintainers = teams.lomiri.members; + platforms = platforms.linux; + }; +})