summary refs log tree commit diff
diff options
context:
space:
mode:
authorDaniel Poelzleithner <poelzleithner@b1-systems.de>2023-05-03 15:36:42 +0200
committerAnderson Torres <torres.anderson.85@protonmail.com>2023-05-15 12:15:28 -0300
commit532b383f4387304cc0109226475c73e48396d3df (patch)
treef9c9a84c61495b5c9d78ed3ed031d8ff41178eac
parentf5281f01da47e35cb182935f3572d1e0668e9e0c (diff)
downloadnixpkgs-532b383f4387304cc0109226475c73e48396d3df.tar
nixpkgs-532b383f4387304cc0109226475c73e48396d3df.tar.gz
nixpkgs-532b383f4387304cc0109226475c73e48396d3df.tar.bz2
nixpkgs-532b383f4387304cc0109226475c73e48396d3df.tar.lz
nixpkgs-532b383f4387304cc0109226475c73e48396d3df.tar.xz
nixpkgs-532b383f4387304cc0109226475c73e48396d3df.tar.zst
nixpkgs-532b383f4387304cc0109226475c73e48396d3df.zip
kemai: init at 0.9.2
Co-authored-by: Anderson Torres <torres.anderson.85@protonmail.com>
-rw-r--r--pkgs/applications/misc/kemai/000-cmake-disable-conan.diff38
-rw-r--r--pkgs/applications/misc/kemai/default.nix52
-rw-r--r--pkgs/top-level/all-packages.nix2
3 files changed, 92 insertions, 0 deletions
diff --git a/pkgs/applications/misc/kemai/000-cmake-disable-conan.diff b/pkgs/applications/misc/kemai/000-cmake-disable-conan.diff
new file mode 100644
index 00000000000..3a438e2519a
--- /dev/null
+++ b/pkgs/applications/misc/kemai/000-cmake-disable-conan.diff
@@ -0,0 +1,38 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index ce78a9d..3cd51e0 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -8,18 +8,21 @@ list(APPEND CMAKE_PREFIX_PATH ${CMAKE_BINARY_DIR})
+ # Common configuration
+ set(CMAKE_CXX_STANDARD 20)
+ set(CMAKE_CXX_STANDARD_REQUIRED ON)
+-
+-# Setup Conan
+-if(NOT EXISTS "${CMAKE_BINARY_DIR}/conan.cmake")
+-    message(STATUS "Downloading conan.cmake from https://github.com/conan-io/cmake-conan")
+-    file(DOWNLOAD "https://raw.githubusercontent.com/conan-io/cmake-conan/0.18.1/conan.cmake"
+-            "${CMAKE_BINARY_DIR}/conan.cmake"
+-            TLS_VERIFY ON)
+-endif()
+-include(${CMAKE_BINARY_DIR}/conan.cmake)
+-
+-conan_cmake_autodetect(settings)
+-conan_cmake_install(PATH_OR_REFERENCE ${CMAKE_SOURCE_DIR} BUILD missing SETTINGS ${settings})
++set(USE_CONAN ON CACHE BOOL "Use conan for dependency managment")
++
++if(USE_CONAN)
++    # Setup Conan
++    if(NOT EXISTS "${CMAKE_BINARY_DIR}/conan.cmake")
++        message(STATUS "Downloading conan.cmake from https://github.com/conan-io/cmake-conan")
++        file(DOWNLOAD "https://raw.githubusercontent.com/conan-io/cmake-conan/0.18.1/conan.cmake"
++                "${CMAKE_BINARY_DIR}/conan.cmake"
++                TLS_VERIFY ON)
++    endif()
++    include(${CMAKE_BINARY_DIR}/conan.cmake)
++
++    conan_cmake_autodetect(settings)
++    conan_cmake_install(PATH_OR_REFERENCE ${CMAKE_SOURCE_DIR} BUILD missing SETTINGS ${settings})
++endif ()
+ 
+ # Setup Qt
+ set(CMAKE_AUTOMOC ON)
diff --git a/pkgs/applications/misc/kemai/default.nix b/pkgs/applications/misc/kemai/default.nix
new file mode 100644
index 00000000000..1e358299f5f
--- /dev/null
+++ b/pkgs/applications/misc/kemai/default.nix
@@ -0,0 +1,52 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, magic-enum
+, spdlog
+, qtbase
+, qtconnectivity
+, qttools
+, qtlanguageserver
+, wrapQtAppsHook
+, libXScrnSaver
+, nix-update-script
+}:
+
+stdenv.mkDerivation rec {
+  pname = "kemai";
+  version = "0.9.2";
+
+  src = fetchFromGitHub {
+    owner = "AlexandrePTJ";
+    repo = "kemai";
+    rev = version;
+    hash = "sha256-PDjNO2iMPK0J3TSHVZ/DW3W0GkdB8yNZYoTGEd2snac=";
+  };
+
+  buildInputs = [
+    qtbase
+    qtconnectivity
+    qttools
+    qtlanguageserver
+    libXScrnSaver
+    magic-enum
+    spdlog
+  ];
+  cmakeFlags = [ "-DUSE_CONAN=OFF" ];
+  patches = [ ./000-cmake-disable-conan.diff ];
+
+  nativeBuildInputs = [ cmake wrapQtAppsHook ];
+
+  passthru = {
+    updateScript = nix-update-script { };
+  };
+
+  meta = with lib; {
+    description = "Kimai desktop client written in QT6";
+    homepage = "https://github.com/AlexandrePTJ/kemai";
+    license = licenses.mit;
+    maintainers = with maintainers; [ poelzi ];
+    platforms   = platforms.unix;
+  };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 04265e8e1a0..b186a403ab7 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -30779,6 +30779,8 @@ with pkgs;
     inherit (qt6) wrapQtAppsHook qtbase qtcharts;
   };
 
+  kemai = qt6Packages.callPackage ../applications/misc/kemai { };
+
   jetbrains = (recurseIntoAttrs (callPackages ../applications/editors/jetbrains {
     vmopts = config.jetbrains.vmopts or null;
     jdk = jetbrains.jdk;