From f94a5ef5fa022ed04988edf7aa9d8403d1edd5b7 Mon Sep 17 00:00:00 2001 From: kashw2 Date: Mon, 4 Sep 2023 00:43:30 +1000 Subject: [PATCH 1/4] focuswriter: 1.7.6 -> 1.8.5 --- .../editors/focuswriter/default.nix | 28 +++++++++++++------ pkgs/top-level/all-packages.nix | 2 +- 2 files changed, 21 insertions(+), 9 deletions(-) diff --git a/pkgs/applications/editors/focuswriter/default.nix b/pkgs/applications/editors/focuswriter/default.nix index d39c29dc6a5b..a907dcb5b9ac 100644 --- a/pkgs/applications/editors/focuswriter/default.nix +++ b/pkgs/applications/editors/focuswriter/default.nix @@ -1,18 +1,30 @@ -{ lib, fetchurl, pkg-config, qmake, qttools, hunspell, qtbase, qtmultimedia, mkDerivation }: +{ lib +, stdenv +, fetchurl +, pkg-config +, cmake +, hunspell +, qtbase +, qtmultimedia +, qttools +, qt5compat +}: -mkDerivation rec { +stdenv.mkDerivation rec { pname = "focuswriter"; - version = "1.7.6"; + version = "1.8.5"; src = fetchurl { - url = "https://gottcode.org/focuswriter/focuswriter-${version}-src.tar.bz2"; - sha256 = "0h85f6cs9zbxv118mjfxqfv41j19zkx2xq36mpnlmrlzkjj7dx9l"; + url = "https://gottcode.org/focuswriter/focuswriter-${version}.tar.bz2"; + sha256 = "sha256-O0GHzpA8Vap/rWiLF2j9zMyfAm2ko1Vk3KqZyyvudlQ="; }; - nativeBuildInputs = [ pkg-config qmake qttools ]; - buildInputs = [ hunspell qtbase qtmultimedia ]; + nativeBuildInputs = [ pkg-config cmake qttools ]; + buildInputs = [ hunspell qtbase qtmultimedia qt5compat ]; + + # Causes an error during compilation if not set + dontWrapQtApps = true; - qmakeFlags = [ "PREFIX=/" ]; installFlags = [ "INSTALL_ROOT=$(out)" ]; meta = with lib; { diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index d6f76cf42c76..6b78843871d4 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -31724,7 +31724,7 @@ with pkgs; focus-stack = callPackage ../applications/graphics/focus-stack { }; - focuswriter = libsForQt5.callPackage ../applications/editors/focuswriter { }; + focuswriter = qt6Packages.callPackage ../applications/editors/focuswriter { }; foliate = callPackage ../applications/office/foliate { }; From 7af1857466e2d73599b897f2b04ad95beb860169 Mon Sep 17 00:00:00 2001 From: kashw2 Date: Mon, 4 Sep 2023 00:43:54 +1000 Subject: [PATCH 2/4] focuswriter: added kashw2 maintainer --- pkgs/applications/editors/focuswriter/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/applications/editors/focuswriter/default.nix b/pkgs/applications/editors/focuswriter/default.nix index a907dcb5b9ac..b47ec49d5492 100644 --- a/pkgs/applications/editors/focuswriter/default.nix +++ b/pkgs/applications/editors/focuswriter/default.nix @@ -30,7 +30,7 @@ stdenv.mkDerivation rec { meta = with lib; { description = "Simple, distraction-free writing environment"; license = licenses.gpl3Plus; - maintainers = with maintainers; [ madjar ]; + maintainers = with maintainers; [ madjar kashw2 ]; platforms = platforms.linux; homepage = "https://gottcode.org/focuswriter/"; }; From 256814f16e6c77a9cffc9a14fa0db38c05010fce Mon Sep 17 00:00:00 2001 From: kashw2 Date: Mon, 4 Sep 2023 00:45:02 +1000 Subject: [PATCH 3/4] focuswriter: switch from `fetchurl` to `fetchFromGitHub` --- pkgs/applications/editors/focuswriter/default.nix | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/pkgs/applications/editors/focuswriter/default.nix b/pkgs/applications/editors/focuswriter/default.nix index b47ec49d5492..025f42d4113a 100644 --- a/pkgs/applications/editors/focuswriter/default.nix +++ b/pkgs/applications/editors/focuswriter/default.nix @@ -1,6 +1,6 @@ { lib , stdenv -, fetchurl +, fetchFromGitHub , pkg-config , cmake , hunspell @@ -14,15 +14,16 @@ stdenv.mkDerivation rec { pname = "focuswriter"; version = "1.8.5"; - src = fetchurl { - url = "https://gottcode.org/focuswriter/focuswriter-${version}.tar.bz2"; - sha256 = "sha256-O0GHzpA8Vap/rWiLF2j9zMyfAm2ko1Vk3KqZyyvudlQ="; + src = fetchFromGitHub { + owner = "gottcode"; + repo = "focuswriter"; + rev = "v${version}"; + hash = "sha256-6wvTlC/NCCcN2jpwqtoOsCln3ViY/vj7NpMsbYHBGiI="; }; nativeBuildInputs = [ pkg-config cmake qttools ]; buildInputs = [ hunspell qtbase qtmultimedia qt5compat ]; - # Causes an error during compilation if not set dontWrapQtApps = true; installFlags = [ "INSTALL_ROOT=$(out)" ]; From 4769537b2696d552d208a2515686c096f14e44ec Mon Sep 17 00:00:00 2001 From: kashw2 Date: Wed, 6 Sep 2023 09:39:16 +1000 Subject: [PATCH 4/4] focuswriter: added qtwayland and wrapped application --- pkgs/applications/editors/focuswriter/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/editors/focuswriter/default.nix b/pkgs/applications/editors/focuswriter/default.nix index 025f42d4113a..de008a54513a 100644 --- a/pkgs/applications/editors/focuswriter/default.nix +++ b/pkgs/applications/editors/focuswriter/default.nix @@ -8,6 +8,8 @@ , qtmultimedia , qttools , qt5compat +, qtwayland +, wrapQtAppsHook }: stdenv.mkDerivation rec { @@ -21,10 +23,8 @@ stdenv.mkDerivation rec { hash = "sha256-6wvTlC/NCCcN2jpwqtoOsCln3ViY/vj7NpMsbYHBGiI="; }; - nativeBuildInputs = [ pkg-config cmake qttools ]; - buildInputs = [ hunspell qtbase qtmultimedia qt5compat ]; - - dontWrapQtApps = true; + nativeBuildInputs = [ pkg-config cmake qttools wrapQtAppsHook ]; + buildInputs = [ hunspell qtbase qtmultimedia qt5compat qtwayland ]; installFlags = [ "INSTALL_ROOT=$(out)" ];