From 369381e995c20941ab2dd7635c326b4366b5db46 Mon Sep 17 00:00:00 2001 From: Matthew Glazar Date: Sat, 1 Feb 2020 17:54:10 -0800 Subject: [PATCH 1/3] chatterino2: fix formatting of Nix code --- .../networking/instant-messengers/chatterino2/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/applications/networking/instant-messengers/chatterino2/default.nix b/pkgs/applications/networking/instant-messengers/chatterino2/default.nix index 553b466b12f9c..6a08bba81ad07 100644 --- a/pkgs/applications/networking/instant-messengers/chatterino2/default.nix +++ b/pkgs/applications/networking/instant-messengers/chatterino2/default.nix @@ -26,7 +26,7 @@ mkDerivation rec { improved/extended version of the Twitch web chat. Chatterino 2 is the second installment of the Twitch chat client series "Chatterino". - ''; + ''; homepage = "https://github.com/fourtf/chatterino2"; license = licenses.mit; platforms = platforms.unix; From d1cef6e6ebbe6030e36ff99d9453fc899d08b6f9 Mon Sep 17 00:00:00 2001 From: Matthew Glazar Date: Sat, 1 Feb 2020 17:36:17 -0800 Subject: [PATCH 2/3] chatterino2: unstable-2019-05-11 -> 2.1.7 Upgrade chatterino2 to the latest release version. This commit changes the name of the chatterino2 package. Before this commit, the package is named chatterino2-unstable. After this commit, the package is named chatterino2. If a user wants to upgrade, they must first uninstall chatterino2-unstable before installing chatterino2, else there will be a conflict: $ nix-env -iA nixpkgs.chatterino2 installing 'chatterino2-2.1.7' building '/nix/store/hxx0vriblvvlkskcnm4rk32d2ghlvkj5-user-environment.drv'... error: packages '/nix/store/icgg81lkh1z17zbzw7ncrfqnkhlb39x9-chatterino2-2.1.7/Applications/chatterino.app/Contents/Info.plist' and '/nix/store/65wapk4pd5gj8dgvd245fzv4z799cnw8-chatterino2-unstable-2019-05-11/Applications/chatterino.app/Contents/Info.plist' have the same priority 5; use 'nix-env --set-flag priority NUMBER INSTALLED_PKGNAME' to change the priority of one of the conflicting packages (0 being the highest priority) builder for '/nix/store/hxx0vriblvvlkskcnm4rk32d2ghlvkj5-user-environment.drv' failed with exit code 1 error: build of '/nix/store/hxx0vriblvvlkskcnm4rk32d2ghlvkj5-user-environment.drv' failed $ nix-env -q | grep chatterino2 chatterino2-unstable-2019-05-11 $ # chatterino2-unstable conflicts with chatterino2; both can't be $ # installed at the same time. Uninstall chatterino2-unstable, then $ # try installing chatterino2 again: $ nix-env -e chatterino2-unstable uninstalling 'chatterino2-unstable-2019-05-11' $ nix-env -iA nixpkgs.chatterino2 installing 'chatterino2-2.1.7' $ nix-env -q | grep chatterino2 chatterino2-2.1.7 --- .../chatterino2/darwin-frameworks.patch | 27 +++++++++++++++++++ .../chatterino2/default.nix | 7 ++--- 2 files changed, 31 insertions(+), 3 deletions(-) create mode 100644 pkgs/applications/networking/instant-messengers/chatterino2/darwin-frameworks.patch diff --git a/pkgs/applications/networking/instant-messengers/chatterino2/darwin-frameworks.patch b/pkgs/applications/networking/instant-messengers/chatterino2/darwin-frameworks.patch new file mode 100644 index 0000000000000..6a8dcf9c22182 --- /dev/null +++ b/pkgs/applications/networking/instant-messengers/chatterino2/darwin-frameworks.patch @@ -0,0 +1,27 @@ +Fix build on macOS. +Patch source: https://github.com/frankosterfeld/qtkeychain/commit/95c6021e280ebe4692e7729cf626c7298db9b226 + +commit 95c6021e280ebe4692e7729cf626c7298db9b226 +Author: Vadim Peretokin +Date: Tue Sep 10 10:21:40 2019 +0200 + + Don't quote LIBS arguments + +diff --git a/lib/qtkeychain/qt5keychain.pri b/lib/qtkeychain/qt5keychain.pri +index ee6d4e8..b3bb626 100644 +--- a/lib/qtkeychain/qt5keychain.pri ++++ b/lib/qtkeychain/qt5keychain.pri +@@ -73,11 +73,11 @@ win32 { + } + + macx:!ios { +- LIBS += "-framework Security" "-framework Foundation" ++ LIBS += -framework Security -framework Foundation + SOURCES += $$QT5KEYCHAIN_PWD/keychain_mac.cpp + } + + ios { +- LIBS += "-framework Security" "-framework Foundation" ++ LIBS += -framework Security -framework Foundation + OBJECTIVE_SOURCES += $$QT5KEYCHAIN_PWD/keychain_ios.mm + } diff --git a/pkgs/applications/networking/instant-messengers/chatterino2/default.nix b/pkgs/applications/networking/instant-messengers/chatterino2/default.nix index 6a08bba81ad07..b46a54cabbc34 100644 --- a/pkgs/applications/networking/instant-messengers/chatterino2/default.nix +++ b/pkgs/applications/networking/instant-messengers/chatterino2/default.nix @@ -2,15 +2,16 @@ mkDerivation rec { pname = "chatterino2"; - version = "unstable-2019-05-11"; + version = "2.1.7"; src = fetchFromGitHub { owner = "fourtf"; repo = pname; - rev = "8c46cbf571dc8fd77287bf3186445ff52b1d1aaf"; - sha256 = "0i2385hamhd9i7jdy906cfrd81cybw524j92l87c8pzrkxphignk"; + rev = "v${version}"; + sha256 = "0bbdzainfa7hlz5p0jfq4y04i3wix7z3i6w193906bi4gr9wilpg"; fetchSubmodules = true; }; nativeBuildInputs = [ qmake pkgconfig wrapQtAppsHook ]; + patches = lib.optionals stdenv.isDarwin [ ./darwin-frameworks.patch ]; buildInputs = [ qtbase qtsvg qtmultimedia boost openssl ]; postInstall = lib.optionalString stdenv.isDarwin '' mkdir -p "$out/Applications" From 0969cb845fbf1839e30ac96632781c14911fc979 Mon Sep 17 00:00:00 2001 From: Matthew Glazar Date: Mon, 25 May 2020 16:59:23 -0700 Subject: [PATCH 3/3] chatterino2: update GitHub account name On GitHub, chatterino2 moved from https://github.com/fourtf/chatterino2 to https://github.com/Chatterino/chatterino2. The old URL redirects to the new URL, but update Nixpkgs' source URL and homepage to point to the new URL to reduce confusion. --- .../networking/instant-messengers/chatterino2/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/networking/instant-messengers/chatterino2/default.nix b/pkgs/applications/networking/instant-messengers/chatterino2/default.nix index b46a54cabbc34..01d8c78dd9d3c 100644 --- a/pkgs/applications/networking/instant-messengers/chatterino2/default.nix +++ b/pkgs/applications/networking/instant-messengers/chatterino2/default.nix @@ -4,7 +4,7 @@ mkDerivation rec { pname = "chatterino2"; version = "2.1.7"; src = fetchFromGitHub { - owner = "fourtf"; + owner = "Chatterino"; repo = pname; rev = "v${version}"; sha256 = "0bbdzainfa7hlz5p0jfq4y04i3wix7z3i6w193906bi4gr9wilpg"; @@ -28,7 +28,7 @@ mkDerivation rec { the second installment of the Twitch chat client series "Chatterino". ''; - homepage = "https://github.com/fourtf/chatterino2"; + homepage = "https://github.com/Chatterino/chatterino2"; license = licenses.mit; platforms = platforms.unix; maintainers = with maintainers; [ rexim ];