From be621a4f602a4011bf55d4db367cc662d7e56924 Mon Sep 17 00:00:00 2001 From: Marcin Serwin Date: Tue, 15 Apr 2025 19:30:30 +0200 Subject: [PATCH 1/2] copyq: 9.1.0 -> 10.0.0 --- pkgs/applications/misc/copyq/default.nix | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/misc/copyq/default.nix b/pkgs/applications/misc/copyq/default.nix index bb395236a66c..0e6025a2ee1b 100644 --- a/pkgs/applications/misc/copyq/default.nix +++ b/pkgs/applications/misc/copyq/default.nix @@ -2,6 +2,7 @@ lib, stdenv, fetchFromGitHub, + fetchpatch, cmake, ninja, qtbase, @@ -12,19 +13,20 @@ libXtst, qtwayland, wayland, + pkg-config, wrapQtAppsHook, kdePackages, }: stdenv.mkDerivation rec { pname = "CopyQ"; - version = "9.1.0"; + version = "10.0.0"; src = fetchFromGitHub { owner = "hluk"; repo = "CopyQ"; rev = "v${version}"; - hash = "sha256-WBJyLfiPPEQ/Cj5uuwy9KhVc1kw4Hv5TeEuRFDydlGk="; + hash = "sha256-lH3WJ6cK2eCnmcLVLnYUypABj73UZjGqqDPp92QE+V4="; }; nativeBuildInputs = [ @@ -32,6 +34,7 @@ stdenv.mkDerivation rec { ninja kdePackages.extra-cmake-modules wrapQtAppsHook + pkg-config ]; buildInputs = [ @@ -53,6 +56,15 @@ stdenv.mkDerivation rec { --replace copyq "$out/bin/copyq" ''; + patches = [ + (fetchpatch { + # Can be removed after next release + name = "fix-qchar-construction-for-qt-6.9.patch"; + url = "https://github.com/hluk/CopyQ/commit/f08c0d46a239362c5d3525ef9c3ba943bb00f734.patch"; + hash = "sha256-dsDIUVJHFFqzZ3tFOcYdwol/tm4viHM0CRs6wYfVKbQ="; + }) + ]; + cmakeFlags = [ "-DWITH_QT6=ON" ]; meta = with lib; { From e3a5955f3b266253a1f11eecfd0ccb08bf9d4acf Mon Sep 17 00:00:00 2001 From: Marcin Serwin Date: Tue, 15 Apr 2025 20:13:13 +0200 Subject: [PATCH 2/2] copyq: refactor --- pkgs/applications/misc/copyq/default.nix | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/pkgs/applications/misc/copyq/default.nix b/pkgs/applications/misc/copyq/default.nix index 0e6025a2ee1b..9a3037be3be3 100644 --- a/pkgs/applications/misc/copyq/default.nix +++ b/pkgs/applications/misc/copyq/default.nix @@ -18,7 +18,7 @@ kdePackages, }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (rec { pname = "CopyQ"; version = "10.0.0"; @@ -51,11 +51,6 @@ stdenv.mkDerivation rec { kdePackages.knotifications ]; - postPatch = '' - substituteInPlace shared/com.github.hluk.copyq.desktop.in \ - --replace copyq "$out/bin/copyq" - ''; - patches = [ (fetchpatch { # Can be removed after next release @@ -65,15 +60,17 @@ stdenv.mkDerivation rec { }) ]; - cmakeFlags = [ "-DWITH_QT6=ON" ]; + cmakeFlags = [ + (lib.cmakeBool "WITH_QT6" true) + ]; - meta = with lib; { + meta = { homepage = "https://hluk.github.io/CopyQ"; description = "Clipboard Manager with Advanced Features"; - license = licenses.gpl3Only; - maintainers = with maintainers; [ artturin ]; + license = lib.licenses.gpl3Plus; + maintainers = with lib.maintainers; [ artturin ]; # NOTE: CopyQ supports windows and osx, but I cannot test these. - platforms = platforms.linux; + platforms = lib.platforms.linux; mainProgram = "copyq"; }; -} +})