From 9798022270039e4f63d33e0e7c399763e327d8eb Mon Sep 17 00:00:00 2001 From: emaryn Date: Wed, 26 Feb 2025 22:05:47 +0800 Subject: [PATCH] retext: 8.0.2 -> 8.1.0 --- pkgs/applications/editors/retext/default.nix | 32 +++++++++++-------- .../editors/retext/remove-wheel-check.patch | 28 ---------------- 2 files changed, 19 insertions(+), 41 deletions(-) delete mode 100644 pkgs/applications/editors/retext/remove-wheel-check.patch diff --git a/pkgs/applications/editors/retext/default.nix b/pkgs/applications/editors/retext/default.nix index 480be18986c8..9518a3d94cce 100644 --- a/pkgs/applications/editors/retext/default.nix +++ b/pkgs/applications/editors/retext/default.nix @@ -19,21 +19,23 @@ python3.pkgs.buildPythonApplication rec { pname = "retext"; - version = "8.0.2"; - format = "setuptools"; + version = "8.1.0"; + pyproject = true; src = fetchFromGitHub { owner = "retext-project"; - repo = pname; + repo = "retext"; tag = version; - hash = "sha256-BToW9rPFEbgAErvJ5gtUpNadCLtlRihE7eKKFgO5N68="; + hash = "sha256-npQ1eVb2iyswbqxi262shC9u/g9oE0ofkLbisFgqQM4="; }; toolbarIcons = fetchzip { url = "https://github.com/retext-project/retext/archive/icons.zip"; - hash = "sha256-LQtSFCGWcKvXis9pFDmPqAMd1m6QieHQiz2yykeTdnI="; + hash = "sha256-nqKAUg9nTzGPPxr80KTn6JX9JgCUJwpcwp8aOIlcxPY="; }; + build-system = with python3.pkgs; [ setuptools ]; + nativeBuildInputs = [ wrapQtAppsHook qttools.dev @@ -44,7 +46,7 @@ python3.pkgs.buildPythonApplication rec { qtsvg ]; - propagatedBuildInputs = with python3.pkgs; [ + dependencies = with python3.pkgs; [ chardet docutils markdown @@ -55,7 +57,11 @@ python3.pkgs.buildPythonApplication rec { pyqt6-webengine ]; - patches = [ ./remove-wheel-check.patch ]; + # disable wheel check + postPatch = '' + substituteInPlace setup.py \ + --replace-fail "self.root and self.root.endswith('/wheel')" "False" + ''; preConfigure = '' lrelease ReText/locale/*.ts @@ -78,8 +84,8 @@ python3.pkgs.buildPythonApplication rec { cp ${toolbarIcons}/* $out/${python3.pkgs.python.sitePackages}/ReText/icons substituteInPlace $out/share/applications/me.mitya57.ReText.desktop \ - --replace "Exec=ReText-${version}.data/scripts/retext %F" "Exec=$out/bin/retext %F" \ - --replace "Icon=ReText/icons/retext.svg" "Icon=retext" + --replace-fail "Exec=ReText-${version}.data/scripts/retext %F" "Exec=retext %F" \ + --replace-fail "Icon=./ReText/icons/retext.svg" "Icon=retext" ''; doCheck = false; @@ -88,12 +94,12 @@ python3.pkgs.buildPythonApplication rec { "ReText" ]; - meta = with lib; { + meta = { description = "Editor for Markdown and reStructuredText"; homepage = "https://github.com/retext-project/retext/"; - license = licenses.gpl3Plus; - maintainers = with maintainers; [ klntsky ]; - platforms = platforms.unix; + license = lib.licenses.gpl3Plus; + maintainers = with lib.maintainers; [ klntsky ]; + platforms = lib.platforms.unix; mainProgram = "retext"; }; } diff --git a/pkgs/applications/editors/retext/remove-wheel-check.patch b/pkgs/applications/editors/retext/remove-wheel-check.patch deleted file mode 100644 index d736a3c3ccc9..000000000000 --- a/pkgs/applications/editors/retext/remove-wheel-check.patch +++ /dev/null @@ -1,28 +0,0 @@ -From f07d08d3056c46f62674f65eabae0efa2b65d681 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= -Date: Sat, 15 Oct 2022 16:53:27 +0200 -Subject: [PATCH] disable wheel check -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Signed-off-by: Jörg Thalheim ---- - setup.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/setup.py b/setup.py -index a9cae37..e0e1e5b 100755 ---- a/setup.py -+++ b/setup.py -@@ -101,7 +101,7 @@ def run(self): - - desktop_file_path = join(self.install_data, 'share', 'applications', - 'me.mitya57.ReText.desktop') -- if self.root and self.root.endswith('/wheel'): -+ if False and self.root and self.root.endswith('/wheel'): - # Desktop files don't allow relative paths, and we don't know the - # absolute path when building a wheel. - log.info('removing the .desktop file from the wheel') --- -2.37.3