summary refs log tree commit diff
path: root/pkgs/desktops
diff options
context:
space:
mode:
authorOPNA2608 <christoph.neidahl@gmail.com>2023-06-06 14:50:58 +0200
committerOPNA2608 <christoph.neidahl@gmail.com>2023-06-18 23:59:15 +0200
commit8b3e7893acb79a178eefcb03485e905ba1fd3a08 (patch)
treebc19dc295842bb358c46fc2de615f881505c81f3 /pkgs/desktops
parent089a24b2e37d9145e11fd669ec8fa6dd3c3d8be3 (diff)
downloadnixpkgs-8b3e7893acb79a178eefcb03485e905ba1fd3a08.tar
nixpkgs-8b3e7893acb79a178eefcb03485e905ba1fd3a08.tar.gz
nixpkgs-8b3e7893acb79a178eefcb03485e905ba1fd3a08.tar.bz2
nixpkgs-8b3e7893acb79a178eefcb03485e905ba1fd3a08.tar.lz
nixpkgs-8b3e7893acb79a178eefcb03485e905ba1fd3a08.tar.xz
nixpkgs-8b3e7893acb79a178eefcb03485e905ba1fd3a08.tar.zst
nixpkgs-8b3e7893acb79a178eefcb03485e905ba1fd3a08.zip
lomiri.cmake-extras: init at unstable-2022-11-21
Diffstat (limited to 'pkgs/desktops')
-rw-r--r--pkgs/desktops/lomiri/default.nix14
-rw-r--r--pkgs/desktops/lomiri/development/cmake-extras/default.nix49
2 files changed, 63 insertions, 0 deletions
diff --git a/pkgs/desktops/lomiri/default.nix b/pkgs/desktops/lomiri/default.nix
new file mode 100644
index 00000000000..bfeed045f9b
--- /dev/null
+++ b/pkgs/desktops/lomiri/default.nix
@@ -0,0 +1,14 @@
+{ lib
+, pkgs
+, libsForQt5
+}:
+
+let
+  packages = self: let
+    inherit (self) callPackage;
+  in {
+    #### Development tools / libraries
+    cmake-extras = callPackage ./development/cmake-extras { };
+  };
+in
+  lib.makeScope libsForQt5.newScope packages
diff --git a/pkgs/desktops/lomiri/development/cmake-extras/default.nix b/pkgs/desktops/lomiri/development/cmake-extras/default.nix
new file mode 100644
index 00000000000..ee5665cd668
--- /dev/null
+++ b/pkgs/desktops/lomiri/development/cmake-extras/default.nix
@@ -0,0 +1,49 @@
+{ stdenvNoCC
+, lib
+, fetchFromGitLab
+, cmake
+, qtbase
+}:
+
+stdenvNoCC.mkDerivation {
+  pname = "cmake-extras";
+  version = "unstable-2022-11-21";
+
+  src = fetchFromGitLab {
+    owner = "ubports";
+    repo = "development/core/cmake-extras";
+    rev = "99aab4514ee182cb7a94821b4b51e4d8cb9a82ef";
+    hash = "sha256-axj5QxgDrHy0HiZkfrbm22hVvSCKkWFoQC8MdQMm9tg=";
+  };
+
+  postPatch = ''
+    # We have nothing to build here, no need to depend on a C compiler
+    substituteInPlace CMakeLists.txt \
+      --replace 'project(cmake-extras)' 'project(cmake-extras NONE)'
+
+    # This is in a function that reverse dependencies use to determine where to install their files to
+    substituteInPlace src/QmlPlugins/QmlPluginsConfig.cmake \
+      --replace "\''${CMAKE_INSTALL_LIBDIR}/qt5/qml" "\''${CMAKE_INSTALL_PREFIX}/${qtbase.qtQmlPrefix}"
+  '';
+
+  strictDeps = true;
+
+  # Produces no binaries
+  dontWrapQtApps = true;
+
+  nativeBuildInputs = [
+    cmake
+  ];
+
+  buildInputs = [
+    qtbase
+  ];
+
+  meta = with lib; {
+    description = "A collection of add-ons for the CMake build tool";
+    homepage = "https://gitlab.com/ubports/development/core/cmake-extras/";
+    license = licenses.gpl3Only;
+    maintainers = teams.lomiri.members;
+    platforms = platforms.all;
+  };
+}