11 # Use `lib.collect lib.isDerivation aspellDicts;` to make all dictionaries
13 , enchantAspellDicts ? with aspellDicts; [ en en-computers ]
16 python3.pkgs.buildPythonApplication rec {
19 format = "setuptools";
21 src = fetchFromGitHub {
22 owner = "retext-project";
24 rev = "refs/tags/${version}";
25 hash = "sha256-BToW9rPFEbgAErvJ5gtUpNadCLtlRihE7eKKFgO5N68=";
28 toolbarIcons = fetchzip {
29 url = "https://github.com/retext-project/retext/archive/icons.zip";
30 hash = "sha256-LQtSFCGWcKvXis9pFDmPqAMd1m6QieHQiz2yykeTdnI=";
43 propagatedBuildInputs = with python3.pkgs; [
54 patches = [ ./remove-wheel-check.patch ];
57 lrelease ReText/locale/*.ts
60 # prevent double wrapping
61 dontWrapQtApps = true;
64 makeWrapperArgs+=("''${qtWrapperArgs[@]}")
66 "--set" "ASPELL_CONF" "dict-dir ${buildEnv {
67 name = "aspell-all-dicts";
68 paths = map (path: "${path}/lib/aspell") enchantAspellDicts;
72 cp ${toolbarIcons}/* $out/${python3.pkgs.python.sitePackages}/ReText/icons
74 substituteInPlace $out/share/applications/me.mitya57.ReText.desktop \
75 --replace "Exec=ReText-${version}.data/scripts/retext %F" "Exec=$out/bin/retext %F" \
76 --replace "Icon=ReText/icons/retext.svg" "Icon=retext"
81 pythonImportsCheck = [
86 description = "Editor for Markdown and reStructuredText";
87 homepage = "https://github.com/retext-project/retext/";
88 license = licenses.gpl3Plus;
89 maintainers = with maintainers; [ klntsky ];
90 platforms = platforms.unix;
91 mainProgram = "retext";