Commit 1e8a85f1 authored by zendo's avatar zendo
Browse files

retext: 7.2.3 -> 8.0.0

parent 7a94322e
Loading
Loading
Loading
Loading
+31 −9
Original line number Diff line number Diff line
{ lib
, python3
, fetchzip
, fetchFromGitHub
, wrapQtAppsHook
, qtbase
, qttools
, qtsvg
, buildEnv
, aspellDicts
  # Use `lib.collect lib.isDerivation aspellDicts;` to make all dictionaries
@@ -11,18 +15,29 @@

python3.pkgs.buildPythonApplication rec {
  pname = "retext";
  version = "7.2.3";
  version = "8.0.0";
  format = "setuptools";

  src = fetchFromGitHub {
    owner = "retext-project";
    repo = "retext";
    repo = pname;
    rev = version;
    hash = "sha256-EwaJFODnkZGbqVw1oQrTrx2ME4vRttVW4CMPkWvMtHA=";
    hash = "sha256-22yqNwIehgTfeElqhN5Jzye7LbcAiseTeoMgenpmsL0=";
  };

  toolbarIcons = fetchzip {
    url = "https://github.com/retext-project/retext/archive/icons.zip";
    hash = "sha256-LQtSFCGWcKvXis9pFDmPqAMd1m6QieHQiz2yykeTdnI=";
  };

  nativeBuildInputs = [
    wrapQtAppsHook
    qttools.dev
  ];

  buildInputs = [
    qtbase
    qtsvg
  ];

  propagatedBuildInputs = with python3.pkgs; [
@@ -32,14 +47,19 @@ python3.pkgs.buildPythonApplication rec {
    markups
    pyenchant
    pygments
    pyqt5
    pyqt6
    pyqt6-webengine
  ];

  postPatch = ''
    # Remove wheel check
    sed -i -e '31,36d' setup.py
  patches = [ ./remove-wheel-check.patch ];

  preConfigure = ''
    lrelease ReText/locale/*.ts
  '';

  # prevent double wrapping
  dontWrapQtApps = true;

  postInstall = ''
    makeWrapperArgs+=("''${qtWrapperArgs[@]}")
    makeWrapperArgs+=(
@@ -49,9 +69,11 @@ 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-${version}.data/data/share/retext/icons/retext.svg" "Icon=$out/share/retext/icons/retext.svg"
      --replace "Icon=ReText/icons/retext.svg" "Icon=retext"
  '';

  doCheck = false;
@@ -63,7 +85,7 @@ python3.pkgs.buildPythonApplication rec {
  meta = with lib; {
    description = "Editor for Markdown and reStructuredText";
    homepage = "https://github.com/retext-project/retext/";
    license = licenses.gpl2Plus;
    license = licenses.gpl3Plus;
    maintainers = with maintainers; [ klntsky ];
    platforms = platforms.unix;
  };
+28 −0
Original line number Diff line number Diff line
From f07d08d3056c46f62674f65eabae0efa2b65d681 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= <joerg@thalheim.io>
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 <joerg@thalheim.io>
---
 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
+1 −1
Original line number Diff line number Diff line
@@ -10701,7 +10701,7 @@ with pkgs;
  reredirect = callPackage ../tools/misc/reredirect { };
  retext = libsForQt5.callPackage ../applications/editors/retext { };
  retext = qt6Packages.callPackage ../applications/editors/retext { };
  inherit (callPackage ../tools/security/rekor { })
    rekor-cli