From 4535eb91c399cf6b3d151751be170ca3b3df122f Mon Sep 17 00:00:00 2001 From: Eric Bavier Date: Tue, 12 Nov 2019 17:11:49 -0600 Subject: gnu: tomb: Update to 2.7. * gnu/packages/patches/tomb-fix-errors-on-open.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/crypto.scm (tomb): Update to 2.7. [source]: Use the patch. --- gnu/packages/patches/tomb-fix-errors-on-open.patch | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 gnu/packages/patches/tomb-fix-errors-on-open.patch (limited to 'gnu/packages/patches') diff --git a/gnu/packages/patches/tomb-fix-errors-on-open.patch b/gnu/packages/patches/tomb-fix-errors-on-open.patch new file mode 100644 index 0000000000..5f41c9ee8f --- /dev/null +++ b/gnu/packages/patches/tomb-fix-errors-on-open.patch @@ -0,0 +1,25 @@ +Description: Avoid error messages when opening a new tomb + Make sure control file exists and has user ownership before user writes to it. +Author: Sven Geuer +Bug: https://github.com/dyne/Tomb/issues/369 +Last-Update: 2019-11-04 +--- a/tomb ++++ b/tomb +@@ -2197,14 +2197,15 @@ + # {{{ Open + + _update_control_file() { +- # replaces a control file with new contents and gives it user ownership ++ # make sure a control file exists, gives it user ownership ++ # and replaces it with new contents + # stdin = contents + # $1 = path to control file + # $2 = contents + [[ "$2" = "" ]] && return 1 + _sudo touch "$1" +- print "$2" > "$1" + _sudo chown ${_UID}:${_GID} "$1" ++ print "$2" > "$1" + _verbose "updated control file $1 = $2" + } + -- cgit v1.2.3 From 2401806bdbc362e5c6ff03a2a3dd33a5d4cdf96e Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sat, 16 Nov 2019 17:15:14 +0100 Subject: gnu: ucx: Avoid relying on /sys/class/net. This fixes test failures of packages that use Open MPI, whereby UCX would error out due to /sys/class/net being unavailable in the build chroot that the daemon sets up. * gnu/packages/patches/ucx-tcp-iface-ioctl.patch: New file. * gnu/packages/fabric-management.scm (ucx)[source]: Use it. * gnu/local.mk (dist_patch_DATA): Add it. --- gnu/local.mk | 1 + gnu/packages/fabric-management.scm | 3 +- gnu/packages/patches/ucx-tcp-iface-ioctl.patch | 109 +++++++++++++++++++++++++ 3 files changed, 112 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/ucx-tcp-iface-ioctl.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 0bc23b92ee..8a52e98d3e 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1392,6 +1392,7 @@ dist_patch_DATA = \ %D%/packages/patches/tuxpaint-stamps-path.patch \ %D%/packages/patches/txr-shell.patch \ %D%/packages/patches/u-boot-fix-mkimage-header-verification.patch \ + %D%/packages/patches/ucx-tcp-iface-ioctl.patch \ %D%/packages/patches/udiskie-no-appindicator.patch \ %D%/packages/patches/unzip-CVE-2014-8139.patch \ %D%/packages/patches/unzip-CVE-2014-8140.patch \ diff --git a/gnu/packages/fabric-management.scm b/gnu/packages/fabric-management.scm index becf877f08..c31ee6e217 100644 --- a/gnu/packages/fabric-management.scm +++ b/gnu/packages/fabric-management.scm @@ -190,7 +190,8 @@ testing InfiniBand networks.") (file-name (git-file-name name version)) (sha256 (base32 - "0x3clvy716i7va4m4adgx6ihjsfnzrkdizhxz5v52944dkglpc8n")))) + "0x3clvy716i7va4m4adgx6ihjsfnzrkdizhxz5v52944dkglpc8n")) + (patches (search-patches "ucx-tcp-iface-ioctl.patch")))) (build-system gnu-build-system) (arguments '( ;; These are some of the flags found in 'contrib/configure-release'. diff --git a/gnu/packages/patches/ucx-tcp-iface-ioctl.patch b/gnu/packages/patches/ucx-tcp-iface-ioctl.patch new file mode 100644 index 0000000000..d5df7047bc --- /dev/null +++ b/gnu/packages/patches/ucx-tcp-iface-ioctl.patch @@ -0,0 +1,109 @@ +Since /sys is unavailable in build environments, the list of available +TCP network interfaces cannot be obtained via /sys/class/net. This patch +provides alternative code that uses the SIOCGIFCONF ioctl to get the +names of the available TCP network interfaces. + +diff --git a/src/uct/tcp/tcp_iface.c b/src/uct/tcp/tcp_iface.c +index 81ad459..10024a6 100644 +--- a/src/uct/tcp/tcp_iface.c ++++ b/src/uct/tcp/tcp_iface.c +@@ -12,6 +12,8 @@ + #include + #include + #include ++#include ++#include + + static ucs_config_field_t uct_tcp_iface_config_table[] = { + {"", "MAX_SHORT=8k", NULL, +@@ -483,6 +485,70 @@ static UCS_CLASS_DEFINE_NEW_FUNC(uct_tcp_iface_t, uct_iface_t, uct_md_h, + uct_worker_h, const uct_iface_params_t*, + const uct_iface_config_t*); + ++/* Fetch information about available network devices through an ioctl. */ ++static ucs_status_t query_devices_ioctl(uct_md_h md, ++ uct_tl_resource_desc_t **resource_p, ++ unsigned *num_resources_p) ++{ ++ int sock, err, i; ++ uct_tl_resource_desc_t *resources, *tmp; ++ unsigned num_resources; ++ ucs_status_t status; ++ struct ifconf conf; ++ struct ifreq reqs[10]; ++ ++ conf.ifc_len = sizeof reqs; ++ conf.ifc_req = reqs; ++ ++ sock = socket(SOCK_STREAM, AF_INET, 0); ++ if (sock < 0) { ++ ucs_error("socket(2) failed: %m"); ++ status = UCS_ERR_IO_ERROR; ++ goto out; ++ } ++ ++ err = ioctl(sock, SIOCGIFCONF, &conf); ++ if (err < 0) { ++ ucs_error("SIOCGIFCONF ioctl failed: %m"); ++ status = UCS_ERR_IO_ERROR; ++ goto out; ++ } ++ ++ resources = NULL; ++ num_resources = 0; ++ for (i = 0; i < conf.ifc_len / sizeof(struct ifreq); i++) { ++ const char *name = reqs[i].ifr_name; ++ ++ if (!ucs_netif_is_active(name)) { ++ continue; ++ } ++ ++ tmp = ucs_realloc(resources, sizeof(*resources) * (num_resources + 1), ++ "tcp resources"); ++ if (tmp == NULL) { ++ ucs_free(resources); ++ status = UCS_ERR_NO_MEMORY; ++ goto out; ++ } ++ resources = tmp; ++ ++ ucs_snprintf_zero(resources[i].tl_name, sizeof(resources[i].tl_name), ++ "%s", UCT_TCP_NAME); ++ ucs_snprintf_zero(resources[i].dev_name, sizeof(resources[i].dev_name), ++ "%s", name); ++ resources[i].dev_type = UCT_DEVICE_TYPE_NET; ++ ++num_resources; ++ } ++ ++ *num_resources_p = num_resources; ++ *resource_p = resources; ++ status = UCS_OK; ++ ++out: ++ if (sock >= 0) close(sock); ++ return status; ++} ++ + static ucs_status_t uct_tcp_query_tl_resources(uct_md_h md, + uct_tl_resource_desc_t **resource_p, + unsigned *num_resources_p) +@@ -496,9 +562,9 @@ static ucs_status_t uct_tcp_query_tl_resources(uct_md_h md, + + dir = opendir(netdev_dir); + if (dir == NULL) { +- ucs_error("opendir(%s) failed: %m", netdev_dir); +- status = UCS_ERR_IO_ERROR; +- goto out; ++ /* When /sys is unavailable, as can be the case in a container, ++ * resort to a good old 'ioctl'. */ ++ return query_devices_ioctl(md, resource_p, num_resources_p); + } + + resources = NULL; +@@ -543,6 +609,5 @@ static ucs_status_t uct_tcp_query_tl_resources(uct_md_h md, + + out_closedir: + closedir(dir); +-out: + return status; + } -- cgit v1.2.3 From 3b7828cc7f938fcb369976cbe75d9c85f22583a1 Mon Sep 17 00:00:00 2001 From: Robert Smith Date: Sat, 16 Nov 2019 16:18:43 +0100 Subject: gnu: Add minisat. * gnu/packages/patches/minisat-friend-declaration.patch: New file. * gnu/packages/patches/minisat-install.patch: New file. * gnu/local.mk (dist_patch_DATA): Add both files above. * gnu/packages/maths.scm (minisat): New exported variable. Signed-off-by: Mathieu Othacehe --- gnu/local.mk | 2 ++ gnu/packages/maths.scm | 40 ++++++++++++++++++++++ .../patches/minisat-friend-declaration.patch | 25 ++++++++++++++ gnu/packages/patches/minisat-install.patch | 19 ++++++++++ 4 files changed, 86 insertions(+) create mode 100644 gnu/packages/patches/minisat-friend-declaration.patch create mode 100644 gnu/packages/patches/minisat-install.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 8a52e98d3e..bb4dcbb17d 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1131,6 +1131,8 @@ dist_patch_DATA = \ %D%/packages/patches/metabat-fix-compilation.patch \ %D%/packages/patches/mhash-keygen-test-segfault.patch \ %D%/packages/patches/mingw-w64-6.0.0-gcc.patch \ + %D%/packages/patches/minisat-friend-declaration.patch \ + %D%/packages/patches/minisat-install.patch \ %D%/packages/patches/mpc123-initialize-ao.patch \ %D%/packages/patches/module-init-tools-moduledir.patch \ %D%/packages/patches/monero-use-system-miniupnpc.patch \ diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm index 16a9d97a47..32608ea2ff 100644 --- a/gnu/packages/maths.scm +++ b/gnu/packages/maths.scm @@ -32,6 +32,7 @@ ;;; Copyright © 2018 Amin Bandali ;;; Copyright © 2019 Nicolas Goaziou ;;; Copyright © 2019 Steve Sprang +;;; Copyright © 2019 Robert Smith ;;; ;;; This file is part of GNU Guix. ;;; @@ -5242,3 +5243,42 @@ fields of knowledge.") (home-page "http://speedcrunch.org/") (license license:gpl2+))) +(define-public minisat + ;; This is the last commit which is available upstream, no + ;; release happened since 2010. + (let ((commit "37dc6c67e2af26379d88ce349eb9c4c6160e8543") + (revision "1")) + (package + (name "minisat") + (version (string-append "2.2.0-" revision "." (string-take commit 7))) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/niklasso/minisat.git") + (commit commit))) + (file-name (string-append name "-" version "-checkout")) + (sha256 + (base32 + "091hf3qkm197s5r7xcr3m07xsdwyz2rqk1hc9kj0hn13imz09irq")) + (patches + (search-patches "minisat-friend-declaration.patch" + "minisat-install.patch")))) + (build-system gnu-build-system) + (arguments + '(#:make-flags (list (string-append "prefix=" %output)) + #:tests? #f ;no check target + #:phases + (modify-phases %standard-phases + (delete 'configure)))) + (inputs + `(("zlib:static" ,zlib "static") + ("zlib" ,zlib))) + (synopsis + "Small, yet efficient, SAT solver") + (description + "MiniSat is a minimalistic, open-source SAT solver, developed to help +researchers and developers alike to get started on SAT.") + (home-page + "http://minisat.se/MiniSat.html") + (license license:expat)))) diff --git a/gnu/packages/patches/minisat-friend-declaration.patch b/gnu/packages/patches/minisat-friend-declaration.patch new file mode 100644 index 0000000000..14a886ae2f --- /dev/null +++ b/gnu/packages/patches/minisat-friend-declaration.patch @@ -0,0 +1,25 @@ +See https://groups.google.com/forum/#!topic/minisat/FCocZsC8oMQ +This seems to only be a problem with newer versions of g++, and +upstream development seems to have stopped in 2013. + +diff -rupN minisat-2.2.0/core/SolverTypes.h minisat-2.2.0.patched/core/SolverTypes.h +--- a/minisat/core/SolverTypes.h 2010-07-10 17:07:36.000000000 +0100 ++++ b/minisat/core/SolverTypes.h 2014-03-29 11:57:49.000000000 +0000 +@@ -47,7 +47,7 @@ struct Lit { + int x; + + // Use this as a constructor: +- friend Lit mkLit(Var var, bool sign = false); ++ //friend Lit mkLit(Var var, bool sign = false); + + bool operator == (Lit p) const { return x == p.x; } + bool operator != (Lit p) const { return x != p.x; } +@@ -55,7 +55,7 @@ struct Lit { + }; + + +-inline Lit mkLit (Var var, bool sign) { Lit p; p.x = var + var + (int)sign; return p; } ++inline Lit mkLit (Var var, bool sign = false) { Lit p; p.x = var + var + (int)sign; return p; } + inline Lit operator ~(Lit p) { Lit q; q.x = p.x ^ 1; return q; } + inline Lit operator ^(Lit p, bool b) { Lit q; q.x = p.x ^ (unsigned int)b; return q; } + inline bool sign (Lit p) { return p.x & 1; } diff --git a/gnu/packages/patches/minisat-install.patch b/gnu/packages/patches/minisat-install.patch new file mode 100644 index 0000000000..23cde89bec --- /dev/null +++ b/gnu/packages/patches/minisat-install.patch @@ -0,0 +1,19 @@ +Avoid the default dynamic executable, which depends on minisat.so +Instead install the release version, which is statically linked. + +diff --git a/Makefile b/Makefile +index ceb9d77..7b91906 100644 +--- a/Makefile ++++ b/Makefile +@@ -191,9 +191,9 @@ install-lib: $(BUILD_DIR)/release/lib/$(MINISAT_SLIB) $(BUILD_DIR)/dynamic/lib/$ + ln -sf $(MINISAT_DLIB).$(SOMAJOR) $(DESTDIR)$(libdir)/$(MINISAT_DLIB) + $(INSTALL) -m 644 $(BUILD_DIR)/release/lib/$(MINISAT_SLIB) $(DESTDIR)$(libdir) + +-install-bin: $(BUILD_DIR)/dynamic/bin/$(MINISAT) ++install-bin: $(BUILD_DIR)/release/bin/$(MINISAT) + $(INSTALL) -d $(DESTDIR)$(bindir) +- $(INSTALL) -m 755 $(BUILD_DIR)/dynamic/bin/$(MINISAT) $(DESTDIR)$(bindir) ++ $(INSTALL) -m 755 $(BUILD_DIR)/release/bin/$(MINISAT) $(DESTDIR)$(bindir) + + clean: + rm -f $(foreach t, release debug profile dynamic, $(foreach o, $(SRCS:.cc=.o), $(BUILD_DIR)/$t/$o)) \ -- cgit v1.2.3 From af6a9fc27622ea8a342fe18c8604f2fe64a04e68 Mon Sep 17 00:00:00 2001 From: Tanguy Le Carrour Date: Tue, 19 Nov 2019 09:50:51 +0100 Subject: gnu: Add python-3.8. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/python.scm (python-3.8): New public variable. [source]: Add patches to skip four tests. * gnu/packages/patches/python-3.8-search-paths.patch: New file. * gnu/packages/patches/python-3.8-fix-tests.patch: New file. Signed-off-by: Marius Bakke --- gnu/packages/patches/python-3.8-fix-tests.patch | 42 ++++++++++++++++++++++ gnu/packages/patches/python-3.8-search-paths.patch | 17 +++++++++ gnu/packages/python.scm | 26 ++++++++++++++ 3 files changed, 85 insertions(+) create mode 100644 gnu/packages/patches/python-3.8-fix-tests.patch create mode 100644 gnu/packages/patches/python-3.8-search-paths.patch (limited to 'gnu/packages/patches') diff --git a/gnu/packages/patches/python-3.8-fix-tests.patch b/gnu/packages/patches/python-3.8-fix-tests.patch new file mode 100644 index 0000000000..4fbdd444c7 --- /dev/null +++ b/gnu/packages/patches/python-3.8-fix-tests.patch @@ -0,0 +1,42 @@ +diff --git a/Lib/test/_test_multiprocessing.py b/Lib/test/_test_multiprocessing.py +index 1474624..887f8ee 100644 +--- a/Lib/test/_test_multiprocessing.py ++++ b/Lib/test/_test_multiprocessing.py +@@ -3801,6 +3801,7 @@ class _TestSharedMemory(BaseTestCase): + sms.close() + + @unittest.skipIf(os.name != "posix", "not feasible in non-posix platforms") ++ @unittest.skipUnless(sys.stdin.isatty(), "KeyboardInterrupts require a TTY device") + def test_shared_memory_SharedMemoryServer_ignores_sigint(self): + # bpo-36368: protect SharedMemoryManager server process from + # KeyboardInterrupt signals. +diff --git a/Lib/test/test_signal.py b/Lib/test/test_signal.py +index d41e94b..a1c15e7 100644 +--- a/Lib/test/test_signal.py ++++ b/Lib/test/test_signal.py +@@ -78,6 +78,7 @@ class PosixTests(unittest.TestCase): + self.assertLess(len(s), signal.NSIG) + + @unittest.skipUnless(sys.executable, "sys.executable required.") ++ @unittest.skipUnless(sys.stdin.isatty(), "KeyboardInterrupts require a TTY device") + def test_keyboard_interrupt_exit_code(self): + """KeyboardInterrupt triggers exit via SIGINT.""" + process = subprocess.run( +@@ -128,6 +129,7 @@ class WindowsSignalTests(unittest.TestCase): + signal.signal(7, handler) + + @unittest.skipUnless(sys.executable, "sys.executable required.") ++ @unittest.skipUnless(sys.stdin.isatty(), "KeyboardInterrupts require a TTY device") + def test_keyboard_interrupt_exit_code(self): + """KeyboardInterrupt triggers an exit using STATUS_CONTROL_C_EXIT.""" + # We don't test via os.kill(os.getpid(), signal.CTRL_C_EVENT) here +@@ -1245,6 +1247,7 @@ class StressTest(unittest.TestCase): + + class RaiseSignalTest(unittest.TestCase): + ++ @unittest.skipUnless(sys.stdin.isatty(), "KeyboardInterrupts require a TTY device") + def test_sigint(self): + with self.assertRaises(KeyboardInterrupt): + signal.raise_signal(signal.SIGINT) +-- +2.23.0 diff --git a/gnu/packages/patches/python-3.8-search-paths.patch b/gnu/packages/patches/python-3.8-search-paths.patch new file mode 100644 index 0000000000..88f19850bf --- /dev/null +++ b/gnu/packages/patches/python-3.8-search-paths.patch @@ -0,0 +1,17 @@ +diff --git a/setup.py b/setup.py +index 20d7f35..5751083 100644 +--- a/setup.py ++++ b/setup.py +@@ -676,8 +676,8 @@ class PyBuildExt(build_ext): + # if a file is found in one of those directories, it can + # be assumed that no additional -I,-L directives are needed. + if not CROSS_COMPILING: +- self.lib_dirs = self.compiler.library_dirs + system_lib_dirs +- self.inc_dirs = self.compiler.include_dirs + system_include_dirs ++ self.lib_dirs = os.getenv('LIBRARY_PATH', '').split(os.pathsep) ++ self.inc_dirs = os.getenv('CPATH', '').split(os.pathsep) + else: + # Add the sysroot paths. 'sysroot' is a compiler option used to + # set the logical path of the standard system headers and +-- +2.23.0 diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 644c9d7666..048941e8a9 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -57,6 +57,7 @@ ;;; Copyright © 2018, 2019 Maxim Cournoyer ;;; Copyright © 2018 Luther Thompson ;;; Copyright © 2018 Vagrant Cascadian +;;; Copyright © 2019 Tanguy Le Carrour ;;; ;;; This file is part of GNU Guix. ;;; @@ -408,6 +409,31 @@ data types.") (version-major+minor version) "/site-packages")))))))) +(define-public python-3.8 + (package + (inherit python-3.7) + (name "python-next") + (version "3.8.0") + (source + (origin + (inherit (package-source python-3.7)) + (uri (string-append "https://www.python.org/ftp/python/" + version "/Python-" version ".tar.xz")) + (sha256 (base32 "110d0did9rxn7rg85kf2fwli5hqq44xv2d8bi7d92m7v2d728mmk")) + (patches (search-patches + "python-3.8-search-paths.patch" + "python-3-fix-tests.patch" + "python-3.8-fix-tests.patch" + "python-3-deterministic-build-info.patch")) + (snippet + '(begin + ;; Delete the bundled copy of libexpat. + (delete-file-recursively "Modules/expat") + (substitute* "Modules/Setup" + ;; Link Expat instead of embedding the bundled one. + (("^#pyexpat.*") "pyexpat pyexpat.c -lexpat\n")) + #t)))))) + ;; Current 3.x version. (define-public python-3 python-3.7) -- cgit v1.2.3 From a531ff94c3dcf480be5c085c52f2c2d9bc532712 Mon Sep 17 00:00:00 2001 From: Timothy Sample Date: Fri, 1 Nov 2019 21:56:40 -0400 Subject: gnu: ghc-diff: Patch to work with newer QuickCheck. * gnu/packages/patches/ghc-diff-swap-cover-args.patch: New file. * gnu/local.mk: Add it. * gnu/packages/haskell-xyz.scm (ghc-diff): Use it. --- gnu/local.mk | 1 + gnu/packages/haskell-xyz.scm | 1 + gnu/packages/patches/ghc-diff-swap-cover-args.patch | 20 ++++++++++++++++++++ 3 files changed, 22 insertions(+) create mode 100644 gnu/packages/patches/ghc-diff-swap-cover-args.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 47618993bf..a9548d4bd6 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -878,6 +878,7 @@ dist_patch_DATA = \ %D%/packages/patches/gd-freetype-test-failure.patch \ %D%/packages/patches/geoclue-config.patch \ %D%/packages/patches/ghc-8.0-fall-back-to-madv_dontneed.patch \ + %D%/packages/patches/ghc-diff-swap-cover-args.patch \ %D%/packages/patches/ghc-dont-pass-linker-flags-via-response-files.patch \ %D%/packages/patches/ghc-haddock-library-unbundle.patch \ %D%/packages/patches/ghostscript-no-header-id.patch \ diff --git a/gnu/packages/haskell-xyz.scm b/gnu/packages/haskell-xyz.scm index c8fbec048d..86e0d2a60e 100644 --- a/gnu/packages/haskell-xyz.scm +++ b/gnu/packages/haskell-xyz.scm @@ -2606,6 +2606,7 @@ and parsers with useful semantics.") (method url-fetch) (uri (string-append "https://hackage.haskell.org/package/" "Diff/Diff-" version ".tar.gz")) + (patches (search-patches "ghc-diff-swap-cover-args.patch")) (sha256 (base32 "0bqcdvhxx8dmqc3793m6axg813wv9ldz2j37f1wygbbrbbndmdvp")))) diff --git a/gnu/packages/patches/ghc-diff-swap-cover-args.patch b/gnu/packages/patches/ghc-diff-swap-cover-args.patch new file mode 100644 index 0000000000..724416ff7a --- /dev/null +++ b/gnu/packages/patches/ghc-diff-swap-cover-args.patch @@ -0,0 +1,20 @@ +The QuickCheck library swapped the order of the arguments of the 'cover' +function in version 2.12. Version 0.3.4 of the Diff library still uses +the old argument order. Swapping the argument order makes Diff work +with newer versions of QuickCheck. + +See for the +upstream bug report. + +diff -ruN a/test/Test.hs b/test/Test.hs +--- a/test/Test.hs 2016-04-23 01:21:45.000000000 -0400 ++++ b/test/Test.hs 2019-11-01 19:13:04.590770903 -0400 +@@ -134,7 +134,7 @@ + prop_ppDiffR (DiffInput le ri) = + let haskDiff=ppDiff $ getGroupedDiff le ri + utilDiff= unsafePerformIO (runDiff (unlines le) (unlines ri)) +- in cover (haskDiff == utilDiff) 90 "exact match" $ ++ in cover 90 (haskDiff == utilDiff) "exact match" $ + classify (haskDiff == utilDiff) "exact match" + (div ((length haskDiff)*100) (length utilDiff) < 110) -- less than 10% bigger + where -- cgit v1.2.3 From faac56f3af797973c4a8400d841bbddc303e924b Mon Sep 17 00:00:00 2001 From: Timothy Sample Date: Sun, 3 Nov 2019 10:54:04 -0500 Subject: gnu: ghc-monad-par: Add a patch to fix tests on GHC 8.6. * gnu/packages/patches/ghc-monad-par-fix-tests.patch: New file. * gnu/local.mk: Add it. * gnu/packages/haskell-xyz.scm (ghc-monad-par): Use it. --- gnu/local.mk | 3 +- gnu/packages/haskell-xyz.scm | 1 + gnu/packages/patches/ghc-monad-par-fix-tests.patch | 45 ++++++++++++++++++++++ 3 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/ghc-monad-par-fix-tests.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index a9548d4bd6..c6f0dfdb46 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -880,7 +880,8 @@ dist_patch_DATA = \ %D%/packages/patches/ghc-8.0-fall-back-to-madv_dontneed.patch \ %D%/packages/patches/ghc-diff-swap-cover-args.patch \ %D%/packages/patches/ghc-dont-pass-linker-flags-via-response-files.patch \ - %D%/packages/patches/ghc-haddock-library-unbundle.patch \ + %D%/packages/patches/ghc-haddock-library-unbundle.patch \ + %D%/packages/patches/ghc-monad-par-fix-tests.patch \ %D%/packages/patches/ghostscript-no-header-id.patch \ %D%/packages/patches/ghostscript-no-header-uuid.patch \ %D%/packages/patches/ghostscript-no-header-creationdate.patch \ diff --git a/gnu/packages/haskell-xyz.scm b/gnu/packages/haskell-xyz.scm index 30d9098e1f..604c2deaa9 100644 --- a/gnu/packages/haskell-xyz.scm +++ b/gnu/packages/haskell-xyz.scm @@ -6541,6 +6541,7 @@ operators for looping.") (uri (string-append "https://hackage.haskell.org/package/" "monad-par-" version "/" "monad-par-" version ".tar.gz")) + (patches (search-patches "ghc-monad-par-fix-tests.patch")) (sha256 (base32 "0ldrzqy24fsszvn2a2nr77m2ih7xm0h9bgkjyv1l274aj18xyk7q")))) diff --git a/gnu/packages/patches/ghc-monad-par-fix-tests.patch b/gnu/packages/patches/ghc-monad-par-fix-tests.patch new file mode 100644 index 0000000000..d21a1e485c --- /dev/null +++ b/gnu/packages/patches/ghc-monad-par-fix-tests.patch @@ -0,0 +1,45 @@ +This patch is taken from upstream. It fixes a test to work with GHC 8.6. +The paths have been slightly altered to work with the release tarball. + +See . + +From e20f81c8060208e4fb038e8f0e0668b41d72a6fb Mon Sep 17 00:00:00 2001 +From: Clint Adams +Date: Sat, 31 Aug 2019 14:12:34 -0400 +Subject: [PATCH] Use a case statement instead of pattern-matching in + case_test_diamond + +This avoids the need for a MonadFail instance. Closes #66 +--- + monad-par/tests/ParTests_shared.hs | 15 +++++++++------ + 1 file changed, 9 insertions(+), 6 deletions(-) + +diff --git a/tests/ParTests_shared.hs b/tests/ParTests_shared.hs +index 31f438d..b2de50c 100644 +--- a/tests/ParTests_shared.hs ++++ b/tests/ParTests_shared.hs +@@ -109,12 +109,15 @@ case_test_diamond :: Assertion + case_test_diamond = 9 @=? (m :: Int) + where + m = runPar $ do +- [a,b,c,d] <- sequence [new,new,new,new] +- fork $ do x <- get a; put b (x+1) +- fork $ do x <- get a; put c (x+2) +- fork $ do x <- get b; y <- get c; put d (x+y) +- fork $ do put a 3 +- get d ++ abcd <- sequence [new,new,new,new] ++ case abcd of ++ [a,b,c,d] -> do ++ fork $ do x <- get a; put b (x+1) ++ fork $ do x <- get a; put c (x+2) ++ fork $ do x <- get b; y <- get c; put d (x+y) ++ fork $ do put a 3 ++ get d ++ _ -> error "Oops" + + -- | Violate IVar single-assignment: + -- +-- +2.23.0 + -- cgit v1.2.3 From 06344a3a39b773972a8e8e8d2acf8d1722618e9c Mon Sep 17 00:00:00 2001 From: Timothy Sample Date: Thu, 31 Oct 2019 13:23:47 -0400 Subject: gnu: ghc-hpack: Update to 0.31.2. * gnu/packages/haskell-xyz.scm (ghc-hpack): Update to 0.31.2. [source]: Use a patch to fix tests. [inputs]: Add 'ghc-infer-license'. * gnu/packages/patches/ghc-hpack-fix-tests.patch: New file. * gnu/local.mk: Add it. --- gnu/local.mk | 1 + gnu/packages/haskell-xyz.scm | 6 +- gnu/packages/patches/ghc-hpack-fix-tests.patch | 193 +++++++++++++++++++++++++ 3 files changed, 198 insertions(+), 2 deletions(-) create mode 100644 gnu/packages/patches/ghc-hpack-fix-tests.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index c6f0dfdb46..9c4d1013d8 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -881,6 +881,7 @@ dist_patch_DATA = \ %D%/packages/patches/ghc-diff-swap-cover-args.patch \ %D%/packages/patches/ghc-dont-pass-linker-flags-via-response-files.patch \ %D%/packages/patches/ghc-haddock-library-unbundle.patch \ + %D%/packages/patches/ghc-hpack-fix-tests.patch \ %D%/packages/patches/ghc-monad-par-fix-tests.patch \ %D%/packages/patches/ghostscript-no-header-id.patch \ %D%/packages/patches/ghostscript-no-header-uuid.patch \ diff --git a/gnu/packages/haskell-xyz.scm b/gnu/packages/haskell-xyz.scm index e0aa5ee23a..14d9d6924b 100644 --- a/gnu/packages/haskell-xyz.scm +++ b/gnu/packages/haskell-xyz.scm @@ -4953,15 +4953,16 @@ representations of current time.") (define-public ghc-hpack (package (name "ghc-hpack") - (version "0.28.2") + (version "0.31.2") (source (origin (method url-fetch) (uri (string-append "https://hackage.haskell.org/package/hpack/" "hpack-" version ".tar.gz")) + (patches (search-patches "ghc-hpack-fix-tests.patch")) (sha256 (base32 - "18w0h76jdp3mk9vin8da9iz3cwhcxmw787xy8wlh8bxcpcr16q5r")))) + "1l2d6185lawwhsj70swxkvcacm0hvcn9qsrlx4ph4gs6k578603g")))) (build-system haskell-build-system) (inputs `(("ghc-aeson" ,ghc-aeson) @@ -4971,6 +4972,7 @@ representations of current time.") ("ghc-http-client" ,ghc-http-client) ("ghc-http-client-tls" ,ghc-http-client-tls) ("ghc-http-types" ,ghc-http-types) + ("ghc-infer-license" ,ghc-infer-license) ("ghc-scientific" ,ghc-scientific) ("ghc-unordered-containers" ,ghc-unordered-containers) ("ghc-vector" ,ghc-vector) diff --git a/gnu/packages/patches/ghc-hpack-fix-tests.patch b/gnu/packages/patches/ghc-hpack-fix-tests.patch new file mode 100644 index 0000000000..19aa762174 --- /dev/null +++ b/gnu/packages/patches/ghc-hpack-fix-tests.patch @@ -0,0 +1,193 @@ +This patch is taken and adapted from upstream. It landed shortly after +the release of 0.31.2, and fixes eleven tests. The patch has been +lightly adapted to apply to the release tarball, but the commit message +was left untouched, so it refers to some changes not included in the +patch. + +From a8d9362d4b686074f698c04c20beea88587511a1 Mon Sep 17 00:00:00 2001 +From: quasicomputational +Date: Sat, 1 Jun 2019 15:11:31 +0100 +Subject: [PATCH] Make CI green (#345) + +* AppVeyor workaround for TMP issue + +https://github.com/commercialhaskell/stack/issues/3944 + +* Bump resolver to nightly-2018-12-12. + +This has the primary benefit of moving to GHC 8.6.3 and should fix +AppVeyor. + +* Add clock 0.8 as an extra-dep. + +* Adapt expected output to aeson 1.4.3.0. +--- + appveyor.yml | 3 +++ + hpack.cabal | 10 +++++----- + package.yaml | 2 +- + stack.yaml | 5 +++-- + test/Data/Aeson/Config/FromValueSpec.hs | 2 +- + test/Data/Aeson/Config/TypesSpec.hs | 2 +- + test/EndToEndSpec.hs | 8 ++++---- + test/Hpack/ConfigSpec.hs | 2 +- + test/Hpack/Syntax/DefaultsSpec.hs | 2 +- + test/Hpack/Syntax/DependenciesSpec.hs | 4 ++-- + 10 files changed, 22 insertions(+), 18 deletions(-) + +diff --git a/hpack.cabal b/hpack.cabal +index fedb9a8..4db3014 100644 +--- a/hpack.cabal ++++ b/hpack.cabal +@@ -1,10 +1,10 @@ + cabal-version: 1.12 + +--- This file has been generated from package.yaml by hpack version 0.31.0. ++-- This file has been generated from package.yaml by hpack version 0.31.2. + -- + -- see: https://github.com/sol/hpack + -- +--- hash: 3d060180293c32b8d0c25b710d0f419e96a6cc6ec3f95ac5e70bb77f44cbafc3 ++-- hash: bd5dd178c7e9f7f7a3456d79b592ea336c41ef43c9892354c001f06659e8b901 + + name: hpack + version: 0.31.2 +@@ -31,7 +31,7 @@ library + build-depends: + Cabal >=2.2 + , Glob >=0.9.0 +- , aeson >=1.2.1.0 ++ , aeson >=1.4.3.0 + , base >=4.9 && <5 + , bifunctors + , bytestring +@@ -87,7 +87,7 @@ executable hpack + build-depends: + Cabal >=2.2 + , Glob >=0.9.0 +- , aeson >=1.2.1.0 ++ , aeson >=1.4.3.0 + , base >=4.9 && <5 + , bifunctors + , bytestring +@@ -125,7 +125,7 @@ test-suite spec + , Glob >=0.9.0 + , HUnit >=1.6.0.0 + , QuickCheck +- , aeson >=1.2.1.0 ++ , aeson >=1.4.3.0 + , base >=4.9 && <5 + , bifunctors + , bytestring +diff --git a/test/Data/Aeson/Config/FromValueSpec.hs b/test/Data/Aeson/Config/FromValueSpec.hs +index 33de8b7..06b3eb9 100644 +--- a/test/Data/Aeson/Config/FromValueSpec.hs ++++ b/test/Data/Aeson/Config/FromValueSpec.hs +@@ -85,7 +85,7 @@ spec = do + [yaml| + name: "Joe" + age: "23" +- |] `shouldDecodeTo` left "Error while parsing $.age - expected Int, encountered String" ++ |] `shouldDecodeTo` left "Error while parsing $.age - parsing Int failed, expected Number, but encountered String" + + context "with (,)" $ do + it "captures unrecognized fields" $ do +diff --git a/test/Data/Aeson/Config/TypesSpec.hs b/test/Data/Aeson/Config/TypesSpec.hs +index c954534..472aa42 100644 +--- a/test/Data/Aeson/Config/TypesSpec.hs ++++ b/test/Data/Aeson/Config/TypesSpec.hs +@@ -13,7 +13,7 @@ spec = do + context "List" $ do + let + parseError :: String -> Result (List Int) +- parseError prefix = Left (prefix ++ " - expected Int, encountered String") ++ parseError prefix = Left (prefix ++ " - parsing Int failed, expected Number, but encountered String") + + context "when parsing single values" $ do + it "returns the value in a singleton list" $ do +diff --git a/test/EndToEndSpec.hs b/test/EndToEndSpec.hs +index 283c72c..46389ea 100644 +--- a/test/EndToEndSpec.hs ++++ b/test/EndToEndSpec.hs +@@ -285,7 +285,7 @@ spec = around_ (inTempDirectoryNamed "foo") $ do + path: defaults.yaml + ref: "2017" + library: {} +- |] `shouldFailWith` (file ++ ": Error while parsing $ - expected Object, encountered Array") ++ |] `shouldFailWith` (file ++ ": Error while parsing $ - expected Object, but encountered Array") + + it "warns on unknown fields" $ do + let file = joinPath ["defaults", "sol", "hpack-template", "2017", "defaults.yaml"] +@@ -340,7 +340,7 @@ spec = around_ (inTempDirectoryNamed "foo") $ do + it "rejects other values" $ do + [i| + version: {} +- |] `shouldFailWith` "package.yaml: Error while parsing $.version - expected Number or String, encountered Object" ++ |] `shouldFailWith` "package.yaml: Error while parsing $.version - expected Number or String, but encountered Object" + + describe "license" $ do + it "accepts cabal-style licenses" $ do +@@ -1363,14 +1363,14 @@ spec = around_ (inTempDirectoryNamed "foo") $ do + then: + dependencies: Win32 + else: null +- |] `shouldFailWith` "package.yaml: Error while parsing $.when.else - expected Object, encountered Null" ++ |] `shouldFailWith` "package.yaml: Error while parsing $.when.else - expected Object, but encountered Null" + + it "rejects invalid conditionals" $ do + [i| + dependencies: + - foo + - 23 +- |] `shouldFailWith` "package.yaml: Error while parsing $.dependencies[1] - expected Object or String, encountered Number" ++ |] `shouldFailWith` "package.yaml: Error while parsing $.dependencies[1] - expected Object or String, but encountered Number" + + it "warns on unknown fields" $ do + [i| +diff --git a/test/Hpack/ConfigSpec.hs b/test/Hpack/ConfigSpec.hs +index 9f4b279..69cbea1 100644 +--- a/test/Hpack/ConfigSpec.hs ++++ b/test/Hpack/ConfigSpec.hs +@@ -675,7 +675,7 @@ spec = do + it "rejects other values" $ do + [yaml| + 23 +- |] `shouldDecodeTo` (Left "Error while parsing $ - expected Boolean or String, encountered Number" :: Result Cond) ++ |] `shouldDecodeTo` (Left "Error while parsing $ - expected Boolean or String, but encountered Number" :: Result Cond) + + describe "formatOrList" $ do + it "formats a singleton list" $ do +diff --git a/test/Hpack/Syntax/DefaultsSpec.hs b/test/Hpack/Syntax/DefaultsSpec.hs +index 5875413..5438b7a 100644 +--- a/test/Hpack/Syntax/DefaultsSpec.hs ++++ b/test/Hpack/Syntax/DefaultsSpec.hs +@@ -151,4 +151,4 @@ spec = do + it "fails" $ do + [yaml| + 10 +- |] `shouldDecodeTo` left "Error while parsing $ - expected Object or String, encountered Number" ++ |] `shouldDecodeTo` left "Error while parsing $ - expected Object or String, but encountered Number" +diff --git a/test/Hpack/Syntax/DependenciesSpec.hs b/test/Hpack/Syntax/DependenciesSpec.hs +index 1a83732..d95044f 100644 +--- a/test/Hpack/Syntax/DependenciesSpec.hs ++++ b/test/Hpack/Syntax/DependenciesSpec.hs +@@ -125,7 +125,7 @@ spec = do + it "rejects invalid values" $ do + [yaml| + hpack: [] +- |] `shouldDecodeTo` left "Error while parsing $.hpack - expected Null, Object, Number, or String, encountered Array" ++ |] `shouldDecodeTo` left "Error while parsing $.hpack - expected Null, Object, Number, or String, but encountered Array" + + context "when the constraint is a Number" $ do + it "accepts 1" $ do +@@ -213,7 +213,7 @@ spec = do + [yaml| + foo: + version: {} +- |] `shouldDecodeTo` left "Error while parsing $.foo.version - expected Null, Number, or String, encountered Object" ++ |] `shouldDecodeTo` left "Error while parsing $.foo.version - expected Null, Number, or String, but encountered Object" + + it "accepts a string" $ do + [yaml| +-- +2.23.0 + -- cgit v1.2.3 From 10707d572034e7389211cbe3df30dd92f93124f7 Mon Sep 17 00:00:00 2001 From: Timothy Sample Date: Thu, 31 Oct 2019 13:33:24 -0400 Subject: gnu: ghc-haddock-library: Update to 1.7.0. The new source tarball does not have bundled dependencies, so it does not need to be patched. * gnu/packages/haskell-xyz.scm (ghc-haddock-library): Update to 1.7.0. [source]: Remove 'patches', 'modules' and 'snippet'. [arguments]: Update the 'relax-test-suite-dependencies' phase to allow newer versions of 'hspec' and 'QuickCheck'; remove the 'add-examples-directory' phase. * gnu/packages/patches/ghc-haddock-library-unbundle.patch: Delete file. * gnu/local.mk: Remove it. --- gnu/local.mk | 1 - gnu/packages/haskell-xyz.scm | 23 ++---- .../patches/ghc-haddock-library-unbundle.patch | 86 ---------------------- 3 files changed, 6 insertions(+), 104 deletions(-) delete mode 100644 gnu/packages/patches/ghc-haddock-library-unbundle.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 9c4d1013d8..fd18592582 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -880,7 +880,6 @@ dist_patch_DATA = \ %D%/packages/patches/ghc-8.0-fall-back-to-madv_dontneed.patch \ %D%/packages/patches/ghc-diff-swap-cover-args.patch \ %D%/packages/patches/ghc-dont-pass-linker-flags-via-response-files.patch \ - %D%/packages/patches/ghc-haddock-library-unbundle.patch \ %D%/packages/patches/ghc-hpack-fix-tests.patch \ %D%/packages/patches/ghc-monad-par-fix-tests.patch \ %D%/packages/patches/ghostscript-no-header-id.patch \ diff --git a/gnu/packages/haskell-xyz.scm b/gnu/packages/haskell-xyz.scm index 37f56df89b..bd5b599ace 100644 --- a/gnu/packages/haskell-xyz.scm +++ b/gnu/packages/haskell-xyz.scm @@ -4328,7 +4328,7 @@ documentation-generation tool for Haskell libraries.") (define-public ghc-haddock-library (package (name "ghc-haddock-library") - (version "1.5.0.1") + (version "1.7.0") (source (origin (method url-fetch) @@ -4338,29 +4338,18 @@ documentation-generation tool for Haskell libraries.") ".tar.gz")) (sha256 (base32 - "1cmbg8l5xrwpliclwy3l057raypjqy0hsg1h1743ahaj8gq10b7z")) - (patches (search-patches - "ghc-haddock-library-unbundle.patch")) - (modules '((guix build utils))) - (snippet '(begin - (delete-file-recursively "vendor") - #t)))) + "04fhcjk0pvsaqvsgp2w06cv2qvshq1xs1bwc157q4lmkgr57khp7")))) (build-system haskell-build-system) (arguments `(#:phases (modify-phases %standard-phases + ;; Since there is no revised Cabal file upstream, we have to + ;; patch it manually. (add-before 'configure 'relax-test-suite-dependencies (lambda _ (substitute* "haddock-library.cabal" - (("base-compat\\s*\\^>= 0\\.9\\.3") "base-compat") - (("hspec\\s*\\^>= 2\\.4\\.4") "hspec")))) - ;; The release tarball does not contain the "fixtures/examples" - ;; directory, which is required for testing. In the upstream - ;; repository, the directory exists and is populated. Here, we - ;; create an empty directory to placate the tests. - (add-before 'check 'add-examples-directory - (lambda _ - (mkdir "fixtures/examples") + (("hspec\\s*>= 2.4.4 && < 2.6") "hspec") + (("QuickCheck\\s*\\^>= 2.11") "QuickCheck")) #t))))) (native-inputs `(("ghc-base-compat" ,ghc-base-compat) diff --git a/gnu/packages/patches/ghc-haddock-library-unbundle.patch b/gnu/packages/patches/ghc-haddock-library-unbundle.patch deleted file mode 100644 index 0e8b548956..0000000000 --- a/gnu/packages/patches/ghc-haddock-library-unbundle.patch +++ /dev/null @@ -1,86 +0,0 @@ -This patch (inspired by Debian) allows ghc-haddock-library to use our -ghc-attoparsec package instead of using a bundled version. - ---- a/haddock-library.cabal 2018-09-01 01:22:18.676855884 -0400 -+++ b/haddock-library.cabal 2018-09-01 01:25:10.501150260 -0400 -@@ -10,7 +10,6 @@ - itself, see the ‘haddock’ package. - license: BSD3 - license-files: LICENSE -- vendor/attoparsec-0.13.1.0/LICENSE - maintainer: Alex Biehl , Simon Hengel , Mateusz Kowalczyk - homepage: http://www.haskell.org/haddock/ - bug-reports: https://github.com/haskell/haddock/issues -@@ -28,7 +27,6 @@ - , containers >= 0.4.2.1 && < 0.6 - , transformers >= 0.3.0 && < 0.6 - -- -- internal sub-lib - build-depends: attoparsec - - hs-source-dirs: src -@@ -49,42 +47,6 @@ - if impl(ghc >= 8.0) - ghc-options: -Wcompat -Wnoncanonical-monad-instances -Wnoncanonical-monadfail-instances - --library attoparsec -- default-language: Haskell2010 -- -- build-depends: -- base >= 4.5 && < 4.12 -- , bytestring >= 0.9.2.1 && < 0.11 -- , deepseq >= 1.3 && < 1.5 -- -- hs-source-dirs: vendor/attoparsec-0.13.1.0 -- -- -- NB: haddock-library needs only small part of lib:attoparsec -- -- internally, so we only bundle that subset here -- exposed-modules: -- Data.Attoparsec.ByteString -- Data.Attoparsec.ByteString.Char8 -- Data.Attoparsec.Combinator -- -- other-modules: -- Data.Attoparsec -- Data.Attoparsec.ByteString.Buffer -- Data.Attoparsec.ByteString.FastSet -- Data.Attoparsec.ByteString.Internal -- Data.Attoparsec.Internal -- Data.Attoparsec.Internal.Fhthagn -- Data.Attoparsec.Internal.Types -- Data.Attoparsec.Number -- -- ghc-options: -funbox-strict-fields -Wall -fwarn-tabs -O2 -- -- ghc-options: -Wall -- if impl(ghc >= 8.0) -- ghc-options: -Wcompat -Wnoncanonical-monad-instances -Wnoncanonical-monadfail-instances -- else -- build-depends: semigroups ^>= 0.18.3, fail ^>= 4.9.0.0 -- -- - test-suite spec - type: exitcode-stdio-1.0 - default-language: Haskell2010 -@@ -115,11 +77,10 @@ - , hspec ^>= 2.4.4 - , QuickCheck ^>= 2.11 - -- -- internal sub-lib - build-depends: attoparsec - - -- Versions for the dependencies below are transitively pinned by -- -- dependency on haddock-library:lib:attoparsec -+ -- dependency on attoparsec - build-depends: - base - , bytestring -@@ -146,7 +107,7 @@ - haddock-library - - -- Versions for the dependencies below are transitively pinned by -- -- dependency on haddock-library:lib:attoparsec -+ -- dependency on attoparsec - build-depends: - base - -- cgit v1.2.3 From d9b1567a07ee26019e4ea12dda36d00dc3205ca6 Mon Sep 17 00:00:00 2001 From: Timothy Sample Date: Thu, 31 Oct 2019 13:33:38 -0400 Subject: gnu: ghc-pandoc: Update to 2.7.3. * gnu/packages/haskell-xyz.scm (ghc-pandoc): Update to 2.7.3. [source]: Add patches to fix tests. [arguments]: Remove '#:phases'. [inputs]: Remove 'ghc-deepseq-generics', 'ghc-old-locale', and 'ghc-yaml'; add 'ghc-hslua-module-system', 'ghc-hsyaml', 'ghc-ipynb', and 'ghc-unicode-transforms'. [native-inputs]: Add 'ghc-tasty-lua'. * gnu/packages/patches/ghc-pandoc-fix-html-tests.patch: New file. * gnu/packages/patches/ghc-pandoc-fix-latex-test.patch: New file. * gnu/local.mk: Add them. --- gnu/local.mk | 2 + gnu/packages/haskell-xyz.scm | 28 +++---- .../patches/ghc-pandoc-fix-html-tests.patch | 92 ++++++++++++++++++++++ .../patches/ghc-pandoc-fix-latex-test.patch | 31 ++++++++ 4 files changed, 134 insertions(+), 19 deletions(-) create mode 100644 gnu/packages/patches/ghc-pandoc-fix-html-tests.patch create mode 100644 gnu/packages/patches/ghc-pandoc-fix-latex-test.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index fd18592582..8e937c8734 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -882,6 +882,8 @@ dist_patch_DATA = \ %D%/packages/patches/ghc-dont-pass-linker-flags-via-response-files.patch \ %D%/packages/patches/ghc-hpack-fix-tests.patch \ %D%/packages/patches/ghc-monad-par-fix-tests.patch \ + %D%/packages/patches/ghc-pandoc-fix-html-tests.patch \ + %D%/packages/patches/ghc-pandoc-fix-latex-test.patch \ %D%/packages/patches/ghostscript-no-header-id.patch \ %D%/packages/patches/ghostscript-no-header-uuid.patch \ %D%/packages/patches/ghostscript-no-header-creationdate.patch \ diff --git a/gnu/packages/haskell-xyz.scm b/gnu/packages/haskell-xyz.scm index b35452c60c..aec3950e5d 100644 --- a/gnu/packages/haskell-xyz.scm +++ b/gnu/packages/haskell-xyz.scm @@ -7638,30 +7638,18 @@ command line options in Haskell.") (define-public ghc-pandoc (package (name "ghc-pandoc") - (version "2.2.1") + (version "2.7.3") (source (origin (method url-fetch) (uri (string-append "https://hackage.haskell.org/package/pandoc/pandoc-" version ".tar.gz")) + (patches (search-patches "ghc-pandoc-fix-html-tests.patch" + "ghc-pandoc-fix-latex-test.patch")) (sha256 (base32 - "1dqin92w513l7whg5wdgrngnxsj5mb8gppfvn7kjgyv2pdgpy0zy")))) + "0dpjrr40h54cljzhvixyym07z792a9izg6b9dmqpjlgcg4rj0xx8")))) (build-system haskell-build-system) - (arguments - `(#:phases - (modify-phases %standard-phases - (add-before 'configure 'update-constraints - (lambda _ - (substitute* "pandoc.cabal" - (("tasty >= 0\\.11 && < 1\\.1") - "tasty >= 0.11 && < 1.1.1")))) - (add-before 'configure 'patch-tests - (lambda _ - ;; These tests fail benignly and have been adjusted upstream: - ;; . - (substitute* "test/Tests/Old.hs" - (("lhsWriterTests \"html\"") "[]"))))))) (inputs `(("ghc-aeson" ,ghc-aeson) ("ghc-aeson-pretty" ,ghc-aeson-pretty) @@ -7670,22 +7658,23 @@ command line options in Haskell.") ("ghc-blaze-markup" ,ghc-blaze-markup) ("ghc-cmark-gfm" ,ghc-cmark-gfm) ("ghc-data-default" ,ghc-data-default) - ("ghc-deepseq-generics" ,ghc-deepseq-generics) ("ghc-diff" ,ghc-diff) ("ghc-doctemplates" ,ghc-doctemplates) ("ghc-executable-path" ,ghc-executable-path) ("ghc-glob" ,ghc-glob) ("ghc-haddock-library" ,ghc-haddock-library) ("ghc-hslua" ,ghc-hslua) + ("ghc-hslua-module-system" ,ghc-hslua-module-system) ("ghc-hslua-module-text" ,ghc-hslua-module-text) + ("ghc-hsyaml" ,ghc-hsyaml) ("ghc-http" ,ghc-http) ("ghc-http-client" ,ghc-http-client) ("ghc-http-client-tls" ,ghc-http-client-tls) ("ghc-http-types" ,ghc-http-types) + ("ghc-ipynb" ,ghc-ipynb) ("ghc-juicypixels" ,ghc-juicypixels) ("ghc-network" ,ghc-network) ("ghc-network-uri" ,ghc-network-uri) - ("ghc-old-locale" ,ghc-old-locale) ("ghc-pandoc-types" ,ghc-pandoc-types) ("ghc-random" ,ghc-random) ("ghc-scientific" ,ghc-scientific) @@ -7696,16 +7685,17 @@ command line options in Haskell.") ("ghc-tagsoup" ,ghc-tagsoup) ("ghc-temporary" ,ghc-temporary) ("ghc-texmath" ,ghc-texmath) + ("ghc-unicode-transforms" ,ghc-unicode-transforms) ("ghc-unordered-containers" ,ghc-unordered-containers) ("ghc-vector" ,ghc-vector) ("ghc-xml" ,ghc-xml) - ("ghc-yaml" ,ghc-yaml) ("ghc-zip-archive" ,ghc-zip-archive) ("ghc-zlib" ,ghc-zlib))) (native-inputs `(("ghc-tasty" ,ghc-tasty) ("ghc-tasty-golden" ,ghc-tasty-golden) ("ghc-tasty-hunit" ,ghc-tasty-hunit) + ("ghc-tasty-lua" ,ghc-tasty-lua) ("ghc-tasty-quickcheck" ,ghc-tasty-quickcheck) ("ghc-quickcheck" ,ghc-quickcheck) ("ghc-hunit" ,ghc-hunit))) diff --git a/gnu/packages/patches/ghc-pandoc-fix-html-tests.patch b/gnu/packages/patches/ghc-pandoc-fix-html-tests.patch new file mode 100644 index 0000000000..b624ff9e9e --- /dev/null +++ b/gnu/packages/patches/ghc-pandoc-fix-html-tests.patch @@ -0,0 +1,92 @@ +This patch is taken from upstream. It fixes two HTML tests that are broken +due to using a Skylighting version greater than or equal to 0.8.2. + +From 968d2046a3cb6db661673be580660ac402753c34 Mon Sep 17 00:00:00 2001 +From: John MacFarlane +Date: Sun, 14 Jul 2019 10:48:14 -0700 +Subject: [PATCH] Update test for new skylighting. + +--- + test/lhs-test.html | 13 ++++++------- + test/lhs-test.html+lhs | 13 ++++++------- + 2 files changed, 12 insertions(+), 14 deletions(-) + +diff --git a/test/lhs-test.html b/test/lhs-test.html +index 6685555f4..446dd3d95 100644 +--- a/test/lhs-test.html ++++ b/test/lhs-test.html +@@ -12,19 +12,18 @@ + div.column{display: inline-block; vertical-align: top; width: 50%;} + + +