From 81b9cc6f54bd05299d5c4b487a8c35d73b8183f4 Mon Sep 17 00:00:00 2001 From: Vladimír Čunát Date: Sun, 29 Nov 2015 09:33:50 +0100 Subject: 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. --- .../kde-4.14/kde-baseapps/kde-baseapps.nix | 5 ++ pkgs/desktops/kde-4.14/kdewebdev/klinkstatus.nix | 5 ++ pkgs/development/libraries/mailcore2/default.nix | 4 +- pkgs/servers/prayer/default.nix | 15 +++--- pkgs/tools/text/html-tidy/default.nix | 58 +++++++++------------- pkgs/tools/text/tidy-html5/default.nix | 25 ---------- pkgs/top-level/all-packages.nix | 2 - 7 files changed, 46 insertions(+), 68 deletions(-) delete mode 100644 pkgs/tools/text/tidy-html5/default.nix (limited to 'pkgs') 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 ]; -- cgit 1.4.1