From 900df250350fd51c101a92efdde6b222b2c8d228 Mon Sep 17 00:00:00 2001 From: FliegendeWurst <2012gdwu+github@posteo.de> Date: Wed, 18 Oct 2023 17:26:25 +0200 Subject: gummy: 0.3 -> 0.5.4 --- pkgs/tools/misc/gummy/cmake_no_fetch.patch | 24 ++++++++++++++++++++ pkgs/tools/misc/gummy/default.nix | 35 +++++++++++++++++++++++++----- 2 files changed, 54 insertions(+), 5 deletions(-) create mode 100644 pkgs/tools/misc/gummy/cmake_no_fetch.patch (limited to 'pkgs/tools') diff --git a/pkgs/tools/misc/gummy/cmake_no_fetch.patch b/pkgs/tools/misc/gummy/cmake_no_fetch.patch new file mode 100644 index 0000000000000..3791c4801b850 --- /dev/null +++ b/pkgs/tools/misc/gummy/cmake_no_fetch.patch @@ -0,0 +1,24 @@ +--- a/CMakeLists.txt 2023-10-18 17:14:06.368938573 +0200 ++++ b/CMakeLists.txt 2023-10-18 17:16:54.361334970 +0200 +@@ -9,17 +9,16 @@ + set(SPDLOG_FMT_EXTERNAL ON) + + FetchContent_Declare(json +- URL https://github.com/nlohmann/json/releases/download/v3.11.2/json.tar.xz ++ SOURCE_DIR @nlohmann_json_src@ + ) + FetchContent_Declare(fmt +- URL https://github.com/fmtlib/fmt/releases/download/9.1.0/fmt-9.1.0.zip ++ SOURCE_DIR @fmt_src@ + ) + FetchContent_Declare(spdlog +- URL https://github.com/gabime/spdlog/archive/refs/tags/v1.11.0.tar.gz ++ SOURCE_DIR @spdlog_src@ + ) + FetchContent_Declare(cli11 +- GIT_REPOSITORY https://github.com/CLIUtils/CLI11 +- GIT_TAG 291c58789c031208f08f4f261a858b5b7083e8e2 #v2.3.2 ++ SOURCE_DIR @cli11_src@ + ) + FetchContent_MakeAvailable( + json diff --git a/pkgs/tools/misc/gummy/default.nix b/pkgs/tools/misc/gummy/default.nix index 9d5b473c3b9c4..bc0f9f1a426a7 100644 --- a/pkgs/tools/misc/gummy/default.nix +++ b/pkgs/tools/misc/gummy/default.nix @@ -1,6 +1,7 @@ { lib , stdenv , fetchFromGitHub +, substituteAll , testers , gummy , cmake @@ -8,18 +9,24 @@ , libXext , sdbus-cpp , udev +, xcbutilimage , coreutils +, cli11 +, ddcutil +, fmt +, nlohmann_json +, spdlog }: stdenv.mkDerivation rec { pname = "gummy"; - version = "0.3"; + version = "0.5.4"; src = fetchFromGitHub { owner = "fushko"; repo = "gummy"; rev = version; - sha256 = "sha256-dw2yOXTS61OIe+NOq8MPydhkZvTit13eC7cbL5nFseg="; + sha256 = "sha256-cRYmBeHvTpw+cwAZzw5qjMRFPINRa7xRXixZzPKwE84="; }; nativeBuildInputs = [ @@ -27,25 +34,43 @@ stdenv.mkDerivation rec { ]; buildInputs = [ + cli11 + ddcutil + fmt libX11 libXext + nlohmann_json sdbus-cpp + spdlog udev + xcbutilimage ]; cmakeFlags = [ "-DUDEV_DIR=${placeholder "out"}/lib/udev" + "-DUDEV_RULES_DIR=${placeholder "out"}/lib/udev/rules.d" + ]; + + patches = [ + # prevent CMake from trying to get libraries on the Internet + (substituteAll { + src = ./cmake_no_fetch.patch; + nlohmann_json_src = nlohmann_json.src; + fmt_src = fmt.src; + spdlog_src = spdlog.src; + cli11_src = cli11.src; + }) ]; # Fixes the "gummy start" command, without this it cannot find the binary. # Setting this through cmake does not seem to work. postPatch = '' - substituteInPlace src/gummy/gummy.cpp \ + substituteInPlace gummy/gummyd/gummyd/api.cpp \ --replace "CMAKE_INSTALL_DAEMON_PATH" "\"${placeholder "out"}/libexec/gummyd\"" ''; preFixup = '' - substituteInPlace $out/lib/udev/99-gummy.rules \ + substituteInPlace $out/lib/udev/rules.d/99-gummy.rules \ --replace "/bin/chmod" "${coreutils}/bin/chmod" ln -s $out/libexec/gummyd $out/bin/gummyd @@ -61,6 +86,6 @@ stdenv.mkDerivation rec { via backlight (currently only for embedded displays) and gamma. Multiple monitors are supported. ''; license = licenses.gpl3Only; - maintainers = [ maintainers.ivar ]; + maintainers = with maintainers; [ ivar ]; }; } -- cgit 1.4.1 From f2f833d852ac4dd587a88c6c1f46a037920c9255 Mon Sep 17 00:00:00 2001 From: FliegendeWurst <2012gdwu+github@posteo.de> Date: Sun, 21 Apr 2024 16:13:38 +0200 Subject: gummy: 0.5.4 -> 0.6.0 --- pkgs/tools/misc/gummy/cmake_no_fetch.patch | 24 ------------------------ pkgs/tools/misc/gummy/default.nix | 26 ++++++++------------------ 2 files changed, 8 insertions(+), 42 deletions(-) delete mode 100644 pkgs/tools/misc/gummy/cmake_no_fetch.patch (limited to 'pkgs/tools') diff --git a/pkgs/tools/misc/gummy/cmake_no_fetch.patch b/pkgs/tools/misc/gummy/cmake_no_fetch.patch deleted file mode 100644 index 3791c4801b850..0000000000000 --- a/pkgs/tools/misc/gummy/cmake_no_fetch.patch +++ /dev/null @@ -1,24 +0,0 @@ ---- a/CMakeLists.txt 2023-10-18 17:14:06.368938573 +0200 -+++ b/CMakeLists.txt 2023-10-18 17:16:54.361334970 +0200 -@@ -9,17 +9,16 @@ - set(SPDLOG_FMT_EXTERNAL ON) - - FetchContent_Declare(json -- URL https://github.com/nlohmann/json/releases/download/v3.11.2/json.tar.xz -+ SOURCE_DIR @nlohmann_json_src@ - ) - FetchContent_Declare(fmt -- URL https://github.com/fmtlib/fmt/releases/download/9.1.0/fmt-9.1.0.zip -+ SOURCE_DIR @fmt_src@ - ) - FetchContent_Declare(spdlog -- URL https://github.com/gabime/spdlog/archive/refs/tags/v1.11.0.tar.gz -+ SOURCE_DIR @spdlog_src@ - ) - FetchContent_Declare(cli11 -- GIT_REPOSITORY https://github.com/CLIUtils/CLI11 -- GIT_TAG 291c58789c031208f08f4f261a858b5b7083e8e2 #v2.3.2 -+ SOURCE_DIR @cli11_src@ - ) - FetchContent_MakeAvailable( - json diff --git a/pkgs/tools/misc/gummy/default.nix b/pkgs/tools/misc/gummy/default.nix index bc0f9f1a426a7..192c1e3261a56 100644 --- a/pkgs/tools/misc/gummy/default.nix +++ b/pkgs/tools/misc/gummy/default.nix @@ -1,6 +1,6 @@ { lib , stdenv -, fetchFromGitHub +, fetchFromGitea , substituteAll , testers , gummy @@ -20,13 +20,14 @@ stdenv.mkDerivation rec { pname = "gummy"; - version = "0.5.4"; + version = "0.6.0"; - src = fetchFromGitHub { - owner = "fushko"; + src = fetchFromGitea { + domain = "codeberg.org"; + owner = "fusco"; repo = "gummy"; rev = version; - sha256 = "sha256-cRYmBeHvTpw+cwAZzw5qjMRFPINRa7xRXixZzPKwE84="; + hash = "sha256-kATieFf+dEpcYgSEPoETacP7R+u2dOrg7rOhIkNQ1uE="; }; nativeBuildInputs = [ @@ -51,21 +52,10 @@ stdenv.mkDerivation rec { "-DUDEV_RULES_DIR=${placeholder "out"}/lib/udev/rules.d" ]; - patches = [ - # prevent CMake from trying to get libraries on the Internet - (substituteAll { - src = ./cmake_no_fetch.patch; - nlohmann_json_src = nlohmann_json.src; - fmt_src = fmt.src; - spdlog_src = spdlog.src; - cli11_src = cli11.src; - }) - ]; - # Fixes the "gummy start" command, without this it cannot find the binary. # Setting this through cmake does not seem to work. postPatch = '' - substituteInPlace gummy/gummyd/gummyd/api.cpp \ + substituteInPlace gummyd/gummyd/api.cpp \ --replace "CMAKE_INSTALL_DAEMON_PATH" "\"${placeholder "out"}/libexec/gummyd\"" ''; @@ -79,7 +69,7 @@ stdenv.mkDerivation rec { passthru.tests.version = testers.testVersion { package = gummy; }; meta = with lib; { - homepage = "https://github.com/Fushko/gummy"; + homepage = "https://codeberg.org/fusco/gummy"; description = "Brightness and temperature manager for X11"; longDescription = '' CLI screen manager for X11 that allows automatic and manual brightness/temperature adjustments, -- cgit 1.4.1