about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorVladimír Čunát <vcunat@gmail.com>2015-11-29 09:33:50 +0100
committerVladimír Čunát <vcunat@gmail.com>2015-11-29 10:32:02 +0100
commit81b9cc6f54bd05299d5c4b487a8c35d73b8183f4 (patch)
treea6e834c38b184f4534ecc19767b029d604c2dcfd /pkgs
parentf2ad4a47e8a2cdaa1f9a27e668bebef69c1403f7 (diff)
downloadnixlib-81b9cc6f54bd05299d5c4b487a8c35d73b8183f4.tar
nixlib-81b9cc6f54bd05299d5c4b487a8c35d73b8183f4.tar.gz
nixlib-81b9cc6f54bd05299d5c4b487a8c35d73b8183f4.tar.bz2
nixlib-81b9cc6f54bd05299d5c4b487a8c35d73b8183f4.tar.lz
nixlib-81b9cc6f54bd05299d5c4b487a8c35d73b8183f4.tar.xz
nixlib-81b9cc6f54bd05299d5c4b487a8c35d73b8183f4.tar.zst
nixlib-81b9cc6f54bd05299d5c4b487a8c35d73b8183f4.zip
html-tidy: unify with its drop-in replacement tidy-html5
- the original project has been unmaintained for years
- some dependants needed to be patched due to renamed headers
  https://github.com/htacg/tidy-html5/issues/326#issuecomment-160329114
- separate tidy-html5 package was removed, as since the 5.0.0 version
  it's meant as a successor to both, and library name got back
  from libtidy5.so to libtidy.so
  https://github.com/htacg/tidy-html5/issues/326#issuecomment-160314666

/cc committers to tidy-html5: @edwjto and @zimbatm.
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/desktops/kde-4.14/kde-baseapps/kde-baseapps.nix5
-rw-r--r--pkgs/desktops/kde-4.14/kdewebdev/klinkstatus.nix5
-rw-r--r--pkgs/development/libraries/mailcore2/default.nix4
-rw-r--r--pkgs/servers/prayer/default.nix15
-rw-r--r--pkgs/tools/text/html-tidy/default.nix58
-rw-r--r--pkgs/tools/text/tidy-html5/default.nix25
-rw-r--r--pkgs/top-level/all-packages.nix2
7 files changed, 46 insertions, 68 deletions
diff --git a/pkgs/desktops/kde-4.14/kde-baseapps/kde-baseapps.nix b/pkgs/desktops/kde-4.14/kde-baseapps/kde-baseapps.nix
index 31245413f158..98fab7d25592 100644
--- a/pkgs/desktops/kde-4.14/kde-baseapps/kde-baseapps.nix
+++ b/pkgs/desktops/kde-4.14/kde-baseapps/kde-baseapps.nix
@@ -2,6 +2,11 @@
 , nepomuk_core, nepomuk_widgets, libXt }:
 
 kde {
+  postPatch = ''
+    substituteInPlace konq-plugins/validators/tidy_validator.cpp \
+      --replace buffio.h tidybuffio.h
+  '';
+
   buildInputs = [ kdelibs nepomuk_core nepomuk_widgets html-tidy kactivities libXt ];
 
   meta = {
diff --git a/pkgs/desktops/kde-4.14/kdewebdev/klinkstatus.nix b/pkgs/desktops/kde-4.14/kdewebdev/klinkstatus.nix
index b0138ecb48b0..b593c952219c 100644
--- a/pkgs/desktops/kde-4.14/kdewebdev/klinkstatus.nix
+++ b/pkgs/desktops/kde-4.14/kdewebdev/klinkstatus.nix
@@ -4,6 +4,11 @@ kde {
 
 # todo: ruby19 is not found by the build system. not linking against ruby18 due to it being too old
 
+  postPatch = ''
+    substituteInPlace klinkstatus/src/tidy/tidyx.h \
+      --replace buffio.h tidybuffio.h
+  '';
+
   buildInputs = [ kdelibs kdepimlibs html-tidy boost ];
 
   meta = {
diff --git a/pkgs/development/libraries/mailcore2/default.nix b/pkgs/development/libraries/mailcore2/default.nix
index 8cf0744a0d14..de82bd0243e9 100644
--- a/pkgs/development/libraries/mailcore2/default.nix
+++ b/pkgs/development/libraries/mailcore2/default.nix
@@ -23,7 +23,9 @@ stdenv.mkDerivation rec {
     substituteInPlace CMakeLists.txt \
        --replace "tidy/tidy.h" "tidy.h" \
        --replace "/usr/include/tidy" "${libtidy}/include" \
-       --replace "/usr/include/libxml2" "${libxml2}/include/libxml2" \
+       --replace "/usr/include/libxml2" "${libxml2}/include/libxml2"
+    substituteInPlace src/core/basetypes/MCHTMLCleaner.cpp \
+      --replace buffio.h tidybuffio.h
   '';
 
   cmakeFlags = [
diff --git a/pkgs/servers/prayer/default.nix b/pkgs/servers/prayer/default.nix
index 1e476cb2301a..447d63c731dc 100644
--- a/pkgs/servers/prayer/default.nix
+++ b/pkgs/servers/prayer/default.nix
@@ -6,17 +6,12 @@ let
 in
 stdenv.mkDerivation rec {
   name = "prayer-1.3.5";
-  
+
   src = fetchurl {
     url = "ftp://ftp.csx.cam.ac.uk/pub/software/email/prayer/${name}.tar.gz";
     sha256 = "135fjbxjn385b6cjys6qhbwfw61mdcl2akkll4jfpdzfvhbxlyda";
   };
 
-  buildInputs = [ openssl db zlib uwimap html-tidy pam ];
-  nativeBuildInputs = [ perl ];
-
-  NIX_LDFLAGS = "-lpam";
-
   patches = [ ./install.patch ];
   postPatch = ''
     sed -i -e s/gmake/make/ -e 's/LDAP_ENABLE.*= true/LDAP_ENABLE=false/' \
@@ -26,8 +21,16 @@ stdenv.mkDerivation rec {
       Config
     sed -i -e s,/usr/bin/perl,${perl}/bin/perl, \
       templates/src/*.pl
+  '' + /* html-tidy updates */ ''
+    substituteInPlace ./session/html_secure_tidy.c \
+      --replace buffio.h tidybuffio.h
   '';
 
+  buildInputs = [ openssl db zlib uwimap html-tidy pam ];
+  nativeBuildInputs = [ perl ];
+
+  NIX_LDFLAGS = "-lpam";
+
   meta = {
     homepage = http://www-uxsup.csx.cam.ac.uk/~dpc22/prayer/;
     description = "Yet another Webmail interface for IMAP servers on Unix systems written in C";
diff --git a/pkgs/tools/text/html-tidy/default.nix b/pkgs/tools/text/html-tidy/default.nix
index 247cb67da56c..062715b83020 100644
--- a/pkgs/tools/text/html-tidy/default.nix
+++ b/pkgs/tools/text/html-tidy/default.nix
@@ -1,41 +1,31 @@
-{ fetchcvs, stdenv, autoconf, automake, libtool }:
+{ stdenv, fetchurl, cmake, libxslt }:
 
-let date = "2009-07-04"; in
-  stdenv.mkDerivation rec {
-    name = "html-tidy-20090704";
+let
+  version = "5.0.0";
+in
+stdenv.mkDerivation rec {
+  name = "html-tidy-${version}";
 
-    # According to http://tidy.sourceforge.net/, there are no new
-    # release tarballs, so one has to either get the code from CVS or
-    # use a decade-old tarball.
+  src = fetchurl {
+    url = "https://github.com/htacg/tidy-html5/archive/${version}.tar.gz";
+    sha256 = "1qz7hgk482496agngp9grz4jqkyxrp29r2ywbccc9i5198yspca4";
+  };
 
-    src = fetchcvs {
-      inherit date;
-      cvsRoot = ":pserver:anonymous@tidy.cvs.sourceforge.net:/cvsroot/tidy";
-      module = "tidy";
-      sha256 = "d2e68b4335ebfde65ef66d5684f7693675c98bdd50b7a63c0b04f61db673aa6d";
-    };
+  nativeBuildInputs = [ cmake libxslt/*manpage*/ ];
 
-    buildInputs = [ autoconf automake libtool ];
+  # ATM bin/tidy is statically linked, as upstream provides no other option yet.
+  # https://github.com/htacg/tidy-html5/issues/326#issuecomment-160322107
 
-    preConfigure = ''
-      cp -rv build/gnuauto/* .
-      AUTOMAKE="automake --foreign" autoreconf -vfi
+  meta = with stdenv.lib; {
+    description = "A HTML validator and `tidier'";
+    longDescription = ''
+      HTML Tidy is a command-line tool and C library that can be
+      used to validate and fix HTML data.
     '';
+    license = licenses.libpng; # very close to it - the 3 clauses are identical
+    homepage = http://html-tidy.org;
+    platforms = platforms.all;
+    maintainers = with maintainers; [ edwtjo ];
+  };
+}
 
-    doCheck = true;
-
-    meta = {
-      description = "HTML Tidy, an HTML validator and `tidier'";
-
-      longDescription = ''
-        HTML Tidy is a command-line tool and C library that can be
-        used to validate and fix HTML data.
-      '';
-
-      license = stdenv.lib.licenses.mit;
-
-      homepage = http://tidy.sourceforge.net/;
-
-      maintainers = [ ];
-    };
-  }
diff --git a/pkgs/tools/text/tidy-html5/default.nix b/pkgs/tools/text/tidy-html5/default.nix
deleted file mode 100644
index ef3bcc46ba73..000000000000
--- a/pkgs/tools/text/tidy-html5/default.nix
+++ /dev/null
@@ -1,25 +0,0 @@
-{ stdenv, lib, cmake, fetchFromGitHub, libxslt, ... }:
-
-stdenv.mkDerivation rec {
-
-  name = "tidy-html5";
-  version = "4.9.30";
-
-  src = fetchFromGitHub {
-    owner = "htacg";
-    repo = "tidy-html5";
-    rev = version;
-    sha256 = "0hd4c23352r5lnh23mx137wb4mkxcjdrl1dy8kgghszik5fprs3s";
-  };
-
-  buildInputs = [ cmake libxslt ];
-
-  meta = with stdenv.lib; {
-    description = "The granddaddy of HTML tools, with support for modern standards";
-    homepage = "http://www.html-tidy.org/";
-    license = licenses.w3c;
-    platforms = platforms.all;
-    maintainers = with maintainers; [ edwtjo ];
-  };
-
-}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 034fcc8d0df5..61ee39b4763d 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -3397,8 +3397,6 @@ let
 
   tftp-hpa = callPackage ../tools/networking/tftp-hpa {};
 
-  tidy-html5 = callPackage ../tools/text/tidy-html5 { };
-
   tigervnc = callPackage ../tools/admin/tigervnc {
     fontDirectories = [ xorg.fontadobe75dpi xorg.fontmiscmisc xorg.fontcursormisc
       xorg.fontbhlucidatypewriter75dpi ];