From eb0d5fc3f076ad8fbac43158e77277066bbe28b9 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Sat, 27 Apr 2019 19:28:20 -0400 Subject: [PATCH 1/4] pylint: remove pyenchant dependency pyenchant is broken on macOS and also no longer actively developed. pylint has made this an optional dependency that is no longer part of the default test suite. See this issue for more discussion: https://github.com/PyCQA/pylint/issues/1900 --- pkgs/development/python-modules/pylint/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/pylint/default.nix b/pkgs/development/python-modules/pylint/default.nix index 8f1f4378a394..64259872ce32 100644 --- a/pkgs/development/python-modules/pylint/default.nix +++ b/pkgs/development/python-modules/pylint/default.nix @@ -1,5 +1,5 @@ { stdenv, lib, buildPythonPackage, fetchPypi, python, pythonOlder, astroid, - isort, mccabe, pytest, pytestrunner, pyenchant }: + isort, mccabe, pytest, pytestrunner }: buildPythonPackage rec { pname = "pylint"; @@ -14,7 +14,7 @@ buildPythonPackage rec { nativeBuildInputs = [ pytestrunner ]; - checkInputs = [ pytest pyenchant ]; + checkInputs = [ pytest ]; propagatedBuildInputs = [ astroid isort mccabe ]; From be705d8249218b1583c345fa3ca467bfffbfa8b5 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Sat, 27 Apr 2019 19:31:20 -0400 Subject: [PATCH 2/4] pyenchant: mark broken on darwin/macOS --- pkgs/development/python-modules/pyenchant/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/development/python-modules/pyenchant/default.nix b/pkgs/development/python-modules/pyenchant/default.nix index 6b49c65faae0..40ac257cad10 100644 --- a/pkgs/development/python-modules/pyenchant/default.nix +++ b/pkgs/development/python-modules/pyenchant/default.nix @@ -31,6 +31,7 @@ buildPythonPackage rec { description = "pyenchant: Python bindings for the Enchant spellchecker"; homepage = https://pythonhosted.org/pyenchant/; license = licenses.lgpl21; + badPlatforms = [ "x86_64-darwin" ]; }; } From 3e96aebf4ed7176acb5e94e9dcf62b64b0c1cf22 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Sat, 27 Apr 2019 19:36:52 -0400 Subject: [PATCH 3/4] enchant: 1.6.1 -> 2.2.3 Moves default enchant to 2.2.3. Release url: https://github.com/AbiWord/enchant/releases/tag/v2.0.0 Mostly need to verify no breakage occurs for packages using enchant. --- pkgs/applications/networking/irc/hexchat/default.nix | 4 ++-- pkgs/development/libraries/enchant/{default.nix => 1.x.nix} | 0 pkgs/development/python-modules/pyenchant/default.nix | 4 ++-- pkgs/top-level/all-packages.nix | 3 ++- 4 files changed, 6 insertions(+), 5 deletions(-) rename pkgs/development/libraries/enchant/{default.nix => 1.x.nix} (100%) diff --git a/pkgs/applications/networking/irc/hexchat/default.nix b/pkgs/applications/networking/irc/hexchat/default.nix index f03e4c4e9e34..34c4fcf0c88c 100644 --- a/pkgs/applications/networking/irc/hexchat/default.nix +++ b/pkgs/applications/networking/irc/hexchat/default.nix @@ -1,6 +1,6 @@ { stdenv, fetchFromGitHub, pkgconfig, gtk2, lua, perl, python2 , libtool, pciutils, dbus-glib, libcanberra-gtk2, libproxy -, libsexy, enchant, libnotify, openssl, intltool +, libsexy, enchant1, libnotify, openssl, intltool , desktop-file-utils, hicolor-icon-theme , autoconf, automake, autoconf-archive }: @@ -30,7 +30,7 @@ stdenv.mkDerivation rec { #hexchat and heachat-text loads enchant spell checking library at run time and so it needs to have route to the path patchPhase = '' - sed -i "s,libenchant.so.1,${enchant}/lib/libenchant.so.1,g" src/fe-gtk/sexy-spell-entry.c + sed -i "s,libenchant.so.1,${enchant1}/lib/libenchant.so.1,g" src/fe-gtk/sexy-spell-entry.c ''; preConfigure = '' diff --git a/pkgs/development/libraries/enchant/default.nix b/pkgs/development/libraries/enchant/1.x.nix similarity index 100% rename from pkgs/development/libraries/enchant/default.nix rename to pkgs/development/libraries/enchant/1.x.nix diff --git a/pkgs/development/python-modules/pyenchant/default.nix b/pkgs/development/python-modules/pyenchant/default.nix index 40ac257cad10..8c240261463a 100644 --- a/pkgs/development/python-modules/pyenchant/default.nix +++ b/pkgs/development/python-modules/pyenchant/default.nix @@ -13,10 +13,10 @@ buildPythonPackage rec { sha256 = "fc31cda72ace001da8fe5d42f11c26e514a91fa8c70468739216ddd8de64e2a0"; }; - propagatedBuildInputs = [ pkgs.enchant ]; + propagatedBuildInputs = [ pkgs.enchant1 ]; patchPhase = let - path_hack_script = "s|LoadLibrary(e_path)|LoadLibrary('${pkgs.enchant}/lib/' + e_path)|"; + path_hack_script = "s|LoadLibrary(e_path)|LoadLibrary('${pkgs.enchant1}/lib/' + e_path)|"; in '' sed -i "${path_hack_script}" enchant/_enchant.py diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 3af78b9f552d..63a906f97c5c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -10201,9 +10201,10 @@ in elastix = callPackage ../development/libraries/science/biology/elastix { }; - enchant = callPackage ../development/libraries/enchant { }; + enchant1 = callPackage ../development/libraries/enchant/1.x.nix { }; enchant2 = callPackage ../development/libraries/enchant/2.x.nix { }; + enchant = enchant2; enet = callPackage ../development/libraries/enet { }; From ba76fa91c762160e0d75a4cba74b44a0c3f911e7 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Mon, 3 Jun 2019 10:54:36 -0400 Subject: [PATCH 4/4] treewide: handle enchant = enchant2 patch or provide backup to enchant1 where necessary --- pkgs/desktops/gnome-2/default.nix | 4 ++-- pkgs/desktops/gnome-2/platform/gtkhtml/4.x.nix | 4 ++-- pkgs/desktops/gnome-3/default.nix | 2 +- pkgs/desktops/gnome-3/misc/gtkhtml/default.nix | 2 +- pkgs/development/libraries/gtkspell/3.nix | 6 +++--- pkgs/tools/inputmethods/fcitx/unwrapped.nix | 4 ++-- pkgs/top-level/all-packages.nix | 9 ++++++--- 7 files changed, 17 insertions(+), 14 deletions(-) diff --git a/pkgs/desktops/gnome-2/default.nix b/pkgs/desktops/gnome-2/default.nix index b1a2d6ae7faf..95e6d0f12b03 100644 --- a/pkgs/desktops/gnome-2/default.nix +++ b/pkgs/desktops/gnome-2/default.nix @@ -47,9 +47,9 @@ lib.makeScope pkgs.newScope (self: with self; { libbonoboui = callPackage ./platform/libbonoboui { }; - gtkhtml = callPackage ./platform/gtkhtml { }; + gtkhtml = callPackage ./platform/gtkhtml { enchant = pkgs.enchant1; }; - gtkhtml4 = callPackage ./platform/gtkhtml/4.x.nix { }; + gtkhtml4 = callPackage ./platform/gtkhtml/4.x.nix { enchant = pkgs.enchant1; }; gtkglext = callPackage ./platform/gtkglext { }; diff --git a/pkgs/desktops/gnome-2/platform/gtkhtml/4.x.nix b/pkgs/desktops/gnome-2/platform/gtkhtml/4.x.nix index 493f88290f3a..f38ad7f24911 100644 --- a/pkgs/desktops/gnome-2/platform/gtkhtml/4.x.nix +++ b/pkgs/desktops/gnome-2/platform/gtkhtml/4.x.nix @@ -1,5 +1,5 @@ -{ stdenv, fetchurl, pkgconfig, gtk3, intltool, -GConf, enchant, isocodes, gnome_icon_theme, gsettings-desktop-schemas }: +{ stdenv, fetchurl, pkgconfig, gtk3, intltool, fetchpatch +, GConf, enchant, isocodes, gnome_icon_theme, gsettings-desktop-schemas }: stdenv.mkDerivation rec { version = "4.10.0"; diff --git a/pkgs/desktops/gnome-3/default.nix b/pkgs/desktops/gnome-3/default.nix index 8680e3ed81da..151581b73eb9 100644 --- a/pkgs/desktops/gnome-3/default.nix +++ b/pkgs/desktops/gnome-3/default.nix @@ -347,7 +347,7 @@ lib.makeScope pkgs.newScope (self: with self; { pidgin-im-gnome-shell-extension = callPackage ./misc/pidgin { }; - gtkhtml = callPackage ./misc/gtkhtml { }; + gtkhtml = callPackage ./misc/gtkhtml { enchant = pkgs.enchant1; }; pomodoro = callPackage ./misc/pomodoro { }; diff --git a/pkgs/desktops/gnome-3/misc/gtkhtml/default.nix b/pkgs/desktops/gnome-3/misc/gtkhtml/default.nix index 543453a2bd31..b8cce222f939 100644 --- a/pkgs/desktops/gnome-3/misc/gtkhtml/default.nix +++ b/pkgs/desktops/gnome-3/misc/gtkhtml/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, pkgconfig, gtk3, intltool +{ stdenv, fetchurl, pkgconfig, gtk3, intltool, fetchpatch , gnome3, enchant, isocodes, gsettings-desktop-schemas }: stdenv.mkDerivation rec { diff --git a/pkgs/development/libraries/gtkspell/3.nix b/pkgs/development/libraries/gtkspell/3.nix index 6d4288376800..f0baecb19904 100644 --- a/pkgs/development/libraries/gtkspell/3.nix +++ b/pkgs/development/libraries/gtkspell/3.nix @@ -1,4 +1,4 @@ -{stdenv, fetchurl, gtk3, aspell, pkgconfig, enchant2, isocodes, intltool, gobject-introspection, vala}: +{stdenv, fetchurl, gtk3, aspell, pkgconfig, enchant, isocodes, intltool, gobject-introspection, vala}: stdenv.mkDerivation rec { name = "gtkspell-${version}"; @@ -12,8 +12,8 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ pkgconfig intltool gobject-introspection vala ]; - buildInputs = [ aspell gtk3 enchant2 isocodes ]; - propagatedBuildInputs = [ enchant2 ]; + buildInputs = [ aspell gtk3 enchant isocodes ]; + propagatedBuildInputs = [ enchant ]; configureFlags = [ "--enable-introspection" diff --git a/pkgs/tools/inputmethods/fcitx/unwrapped.nix b/pkgs/tools/inputmethods/fcitx/unwrapped.nix index 50cc06d20593..b32368c93d3c 100644 --- a/pkgs/tools/inputmethods/fcitx/unwrapped.nix +++ b/pkgs/tools/inputmethods/fcitx/unwrapped.nix @@ -1,5 +1,5 @@ { stdenv, fetchurl, pkgconfig, cmake, intltool, gettext -, libxml2, enchant, isocodes, icu, libpthreadstubs +, libxml2, enchant1, isocodes, icu, libpthreadstubs , pango, cairo, libxkbfile, libXau, libXdmcp, libxkbcommon , dbus, gtk2, gtk3, qt4, extra-cmake-modules , xkeyboard_config, pcre, libuuid @@ -69,7 +69,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake extra-cmake-modules intltool pkgconfig pcre ]; buildInputs = [ - xkeyboard_config enchant gettext isocodes icu libpthreadstubs libXau libXdmcp libxkbfile + xkeyboard_config enchant1 gettext isocodes icu libpthreadstubs libXau libXdmcp libxkbfile libxkbcommon libxml2 dbus cairo gtk2 gtk3 pango qt4 libuuid ]; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 63a906f97c5c..67b5a0d62052 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -10802,7 +10802,7 @@ in gtksourceviewmm4 = callPackage ../development/libraries/gtksourceviewmm/4.x.nix { }; - gtkspell2 = callPackage ../development/libraries/gtkspell { }; + gtkspell2 = callPackage ../development/libraries/gtkspell { enchant = enchant1; }; gtkspell3 = callPackage ../development/libraries/gtkspell/3.nix { }; @@ -13282,7 +13282,7 @@ in subdl = callPackage ../applications/video/subdl { }; - subtitleeditor = callPackage ../applications/video/subtitleeditor { }; + subtitleeditor = callPackage ../applications/video/subtitleeditor { enchant = enchant1; }; suil = callPackage ../development/libraries/audio/suil { }; @@ -20992,7 +20992,9 @@ in xmind = callPackage ../applications/misc/xmind { }; - xneur = callPackage ../applications/misc/xneur { }; + xneur = callPackage ../applications/misc/xneur { + enchant = enchant1; + }; gxneur = callPackage ../applications/misc/gxneur { inherit (gnome2) libglade GConf; @@ -21003,6 +21005,7 @@ in inherit (gnome2) libglade scrollkeeper; gtkhtml = gnome2.gtkhtml4; python = python27; + enchant = enchant1; }; xournal = callPackage ../applications/graphics/xournal {