guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/02: gnu: OpenEXR: Move the snippet into a build phase.


From: guix-commits
Subject: 01/02: gnu: OpenEXR: Move the snippet into a build phase.
Date: Mon, 25 Oct 2021 19:24:28 -0400 (EDT)

lfam pushed a commit to branch master
in repository guix.

commit 547009ff0acdb0a16ed24bbedfa35d6c107d4721
Author: Leo Famulari <leo@famulari.name>
AuthorDate: Sat Oct 23 16:47:27 2021 -0400

    gnu: OpenEXR: Move the snippet into a build phase.
    
    This snippet was just working around a quirk of the Guix build environment.
    
    * gnu/packages/graphics.scm (openexr)[origin]: Remove snippet.
    [arguments]: Add a 'patch-test-directory' phase.
---
 gnu/packages/graphics.scm | 22 ++++++++++++----------
 1 file changed, 12 insertions(+), 10 deletions(-)

diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm
index 16d1ad2..6fc3240 100644
--- a/gnu/packages/graphics.scm
+++ b/gnu/packages/graphics.scm
@@ -1117,17 +1117,19 @@ graphics.")
              (commit (string-append "v" version))))
        (file-name (git-file-name name version))
        (sha256
-        (base32 "0vyclrrikphwkkpyjg8kzh3qzflzk3d6xsidgqllgfdgllr9wmgv"))
-       (modules '((guix build utils)))
-       (snippet
-        '(begin
-           (with-directory-excursion "src/test"
-             (substitute* (append (find-files "." "tmpDir\\.h")
-                                  '("OpenEXRCoreTest/main.cpp"))
-               (("\"/var/tmp/\"")
-                "\"/tmp/\"")))
-           #t))))
+        (base32 "0vyclrrikphwkkpyjg8kzh3qzflzk3d6xsidgqllgfdgllr9wmgv"))))
     (build-system cmake-build-system)
+    (arguments
+     '(#:phases
+       (modify-phases %standard-phases
+         ;; /var/tmp does not exist in the Guix build environment
+         (add-after 'unpack 'patch-test-directory
+           (lambda _
+             (substitute* '("src/test/OpenEXRUtilTest/tmpDir.h"
+                            "src/test/OpenEXRFuzzTest/tmpDir.h"
+                            "src/test/OpenEXRTest/tmpDir.h"
+                            "src/test/OpenEXRCoreTest/main.cpp")
+               (("/var/tmp") "/tmp")))))))
     (inputs
      `(("imath" ,imath)
        ("zlib" ,zlib)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]