From 05b90a4ab4618495d9ebab55acbf45de353df871 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Thu, 30 Jul 2020 18:08:55 +0200 Subject: gnu: opam: Fix tests. * gnu/packages/ocaml.scm (opam)[arguments]: Remove #:tests?. Adjust the pre-check phase to make some files writable, patch a hard-coded file name, and disable mostly-redundant git tests. [native-inputs]: Remove GIT and PYTHON. Add OPENSSL, PYTHON-WRAPPER, RSYNC, UNZIP, and WHICH. --- gnu/packages/ocaml.scm | 33 +++++++++++++++++++++++---------- 1 file changed, 23 insertions(+), 10 deletions(-) (limited to 'gnu/packages/ocaml.scm') diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm index 1b40063ffb..682bc890bf 100644 --- a/gnu/packages/ocaml.scm +++ b/gnu/packages/ocaml.scm @@ -14,6 +14,7 @@ ;;; Copyright © 2018 Kei Kebreau ;;; Copyright © 2019 Ricardo Wurmus ;;; Copyright © 2020 Brett Gilio +;;; Copyright © 2020 Marius Bakke ;;; ;;; This file is part of GNU Guix. ;;; @@ -60,13 +61,13 @@ #:use-module (gnu packages protobuf) #:use-module (gnu packages python) #:use-module (gnu packages python-xyz) + #:use-module (gnu packages rsync) #:use-module (gnu packages sdl) #:use-module (gnu packages sqlite) #:use-module (gnu packages tex) #:use-module (gnu packages texinfo) #:use-module (gnu packages time) #:use-module (gnu packages tls) - #:use-module (gnu packages version-control) #:use-module (gnu packages virtualization) #:use-module (gnu packages web-browsers) #:use-module (gnu packages xml) @@ -461,10 +462,6 @@ the opam file fomat.") #:test-target "tests" - ;; FIXME: There's an obscure test failure: - ;; …/_obuild/opam/opam.asm install P1' failed. - #:tests? #f - #:phases (modify-phases %standard-phases (add-before 'build 'pre-build (lambda* (#:key inputs make-flags #:allow-other-keys) @@ -495,15 +492,31 @@ the opam file fomat.") #t))) (add-before 'check 'pre-check (lambda _ - (setenv "HOME" (getcwd)) - (invoke "git" "config" "--global" "user.email" "guix@gnu.org") - (invoke "git" "config" "--global" "user.name" "Guix") + ;; The "repo" test attempts to open some of these files O_WRONLY + ;; and fails with a bogus "OpamSystem.File_not_found" otherwise. + (for-each + (lambda (f) (chmod f #o644)) + (find-files "tests/packages" "\\.opam$")) + + (substitute* "tests/Makefile" + (("/usr/bin/printf") + (which "printf")) + ;; By default tests run twice: once with a "local" repository + ;; and once with a git repository: disable the git tests to + ;; avoid the dependency. + (("all: local git") + "all: local")) #t))))) (native-inputs `(("dune" ,dune) - ("git" ,git) ;for the tests ("ocaml-cppo" ,ocaml-cppo) - ("python" ,python))) ;for the tests + + ;; For tests. + ("openssl" ,openssl) + ("python" ,python-wrapper) + ("rsync" ,rsync) + ("unzip" ,unzip) + ("which" ,which))) (inputs `(("ocaml" ,ocaml) ("ncurses" ,ncurses) -- cgit 1.4.1 From 4a7243fcfb1aa6f967a16cb31510aa421012fd56 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Mon, 31 Aug 2020 19:40:38 +0200 Subject: gnu: ocamlify: Parametrize source URI. * gnu/packages/ocaml.scm (ocamlify)[source]: Construct with VERSION. --- gnu/packages/ocaml.scm | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'gnu/packages/ocaml.scm') diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm index 682bc890bf..df1ca764aa 100644 --- a/gnu/packages/ocaml.scm +++ b/gnu/packages/ocaml.scm @@ -2259,18 +2259,18 @@ radix-64 representation. It is specified in RFC 4648.") (package (name "ocamlify") (version "0.0.1") - (source (origin - (method url-fetch) - (uri "https://download.ocamlcore.org/ocamlify/ocamlify/0.0.1/ocamlify-0.0.1.tar.gz") - (sha256 - (base32 - "1j9nb3vjqbdsx3d6jazixgrh776051zkrc06nsc5q5ilp1jhrwkm")))) + (source + (origin + (method url-fetch) + (uri (string-append "https://download.ocamlcore.org/ocamlify/ocamlify/" + version "/ocamlify-" version ".tar.gz")) + (sha256 + (base32 "1j9nb3vjqbdsx3d6jazixgrh776051zkrc06nsc5q5ilp1jhrwkm")))) (build-system ocaml-build-system) - ; tests are done during build (arguments `(#:phases (modify-phases %standard-phases - (delete 'check) + (delete 'check) ; tests are run during the build (replace 'configure (lambda* (#:key outputs #:allow-other-keys) (invoke "ocaml" "setup.ml" "-configure" "--prefix" -- cgit 1.4.1 From 2d3370c4ec22cea965cd934dd30909cd5929a85a Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Mon, 31 Aug 2020 20:00:19 +0200 Subject: gnu: ocamlify: Update to 0.0.2. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/ocaml.scm (ocamlify): Update to 0.0.2. [arguments]: Add a ‘disable-safe-string’ phase. --- gnu/packages/ocaml.scm | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'gnu/packages/ocaml.scm') diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm index df1ca764aa..33c3fa0494 100644 --- a/gnu/packages/ocaml.scm +++ b/gnu/packages/ocaml.scm @@ -2258,18 +2258,24 @@ radix-64 representation. It is specified in RFC 4648.") (define-public ocamlify (package (name "ocamlify") - (version "0.0.1") + (version "0.0.2") (source (origin (method url-fetch) (uri (string-append "https://download.ocamlcore.org/ocamlify/ocamlify/" version "/ocamlify-" version ".tar.gz")) (sha256 - (base32 "1j9nb3vjqbdsx3d6jazixgrh776051zkrc06nsc5q5ilp1jhrwkm")))) + (base32 "1f0fghvlbfryf5h3j4as7vcqrgfjb4c8abl5y0y5h069vs4kp5ii")))) (build-system ocaml-build-system) (arguments `(#:phases (modify-phases %standard-phases + (add-after 'unpack 'disable-safe-string + ;; Work around ‘Error: This expression has type string but an + ;; expression was expected of type bytes’ since OCaml 4.06. + (lambda _ + (setenv "OCAMLPARAM" "safe-string=0,_") + #t)) (delete 'check) ; tests are run during the build (replace 'configure (lambda* (#:key outputs #:allow-other-keys) -- cgit 1.4.1