unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Ricardo Wurmus <rekado@elephly.net>
To: 47972@debbugs.gnu.org
Cc: Ricardo Wurmus <rekado@elephly.net>
Subject: [bug#47972] [PATCH 6/6] gnu: Add irods-client-icommands.
Date: Fri, 23 Apr 2021 16:32:01 +0200	[thread overview]
Message-ID: <20210423143201.12831-6-rekado@elephly.net> (raw)
In-Reply-To: <20210423143201.12831-1-rekado@elephly.net>

* gnu/packages/irods.scm (irods-client-icommands): New variable.
---
 gnu/packages/irods.scm | 137 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 137 insertions(+)

diff --git a/gnu/packages/irods.scm b/gnu/packages/irods.scm
index 75a58d97cb..e757c1d80a 100644
--- a/gnu/packages/irods.scm
+++ b/gnu/packages/irods.scm
@@ -20,10 +20,12 @@
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
   #:use-module (guix download)
+  #:use-module (guix git-download)
   #:use-module (guix build-system cmake)
   #:use-module (guix utils)
   #:use-module (gnu packages)
   #:use-module (gnu packages backup)
+  #:use-module (gnu packages base)
   #:use-module (gnu packages boost)
   #:use-module (gnu packages check)
   #:use-module (gnu packages compression)
@@ -34,6 +36,7 @@
   #:use-module (gnu packages linux)
   #:use-module (gnu packages llvm)
   #:use-module (gnu packages logging)
+  #:use-module (gnu packages man)
   #:use-module (gnu packages networking)
   #:use-module (gnu packages pretty-print)
   #:use-module (gnu packages python)
@@ -198,3 +201,137 @@ management software.  iRODS virtualizes data storage resources, so users can
 take control of their data, regardless of where and on what device the data is
 stored.")
     (license license:bsd-3)))
+
+(define-public irods-client-icommands
+  (package
+    (name "irods-client-icommands")
+    (version "4.2.8")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/irods/irods_client_icommands")
+                    (commit version)))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "069n647p5ypf44gim8z26mwayg5lzgk7r9qyyqd8f9n7h0p4jxpn"))))
+    (build-system cmake-build-system)
+    (arguments
+     `(#:tests? #false ; not clear how to run tests
+       #:configure-flags
+       (list
+        "-DCMAKE_BUILD_TYPE=Release"
+
+        ;; Configuration attempts to guess the distribution with Python.
+        "-DIRODS_LINUX_DISTRIBUTION_NAME=guix"
+        "-DIRODS_LINUX_DISTRIBUTION_VERSION_MAJOR=1"
+
+        (string-append "-DIRODS_DIR="
+                       (assoc-ref %build-inputs "irods")
+                       "/lib/irods/cmake")
+        (string-append "-DIRODS_EXTERNALS_FULLPATH_CLANG="
+                       (assoc-ref %build-inputs "clang"))
+        (string-append "-DIRODS_EXTERNALS_FULLPATH_CLANG_RUNTIME="
+                       (assoc-ref %build-inputs "clang-runtime"))
+        (string-append "-DIRODS_EXTERNALS_FULLPATH_CPPZMQ="
+                       (assoc-ref %build-inputs "cppzmq"))
+        (string-append "-DIRODS_EXTERNALS_FULLPATH_ARCHIVE="
+                       (assoc-ref %build-inputs "libarchive"))
+        (string-append "-DIRODS_EXTERNALS_FULLPATH_AVRO="
+                       (assoc-ref %build-inputs "avro-cpp"))
+        (string-append "-DIRODS_EXTERNALS_FULLPATH_BOOST="
+                       (assoc-ref %build-inputs "boost"))
+        (string-append "-DIRODS_EXTERNALS_FULLPATH_ZMQ="
+                       (assoc-ref %build-inputs "zeromq"))
+        (string-append "-DIRODS_EXTERNALS_FULLPATH_JSON="
+                       (assoc-ref %build-inputs "json"))
+        (string-append "-DIRODS_EXTERNALS_FULLPATH_FMT="
+                       (assoc-ref %build-inputs "fmt")))
+
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'unset-Werror ;
+           (lambda _                           ;
+             ;; -Werror kills the build due to a deprecation warning
+             (substitute* "CMakeLists.txt" ;
+               (("-Werror") ""))))
+         (add-after 'unpack 'remove-/usr-prefix
+           (lambda _
+             (substitute* "CMakeLists.txt"
+               (("usr/") ""))))
+         (add-after 'set-paths 'adjust-CPLUS_INCLUDE_PATH
+           (lambda* (#:key inputs #:allow-other-keys)
+             (let ((gcc (assoc-ref inputs  "gcc")))
+               (setenv "CPLUS_INCLUDE_PATH"
+                       (string-join
+                        (cons* (string-append (assoc-ref inputs "libcxx+libcxxabi")
+                                              "/include/c++/v1")
+                               (string-append (assoc-ref inputs "json")
+                                              "/include/nlohmann")
+                               ;; Hide GCC's C++ headers so that they do not interfere with
+                               ;; the Clang headers.
+                               (delete (string-append gcc "/include/c++")
+                                       (string-split (getenv "CPLUS_INCLUDE_PATH")
+                                                     #\:)))
+                        ":"))
+               (format #true
+                       "environment variable `CPLUS_INCLUDE_PATH' changed to ~a~%"
+                       (getenv "CPLUS_INCLUDE_PATH"))))))))
+    (inputs
+     `(("avro-cpp" ,(package
+                      (inherit avro-cpp-1.9)
+                      (arguments
+                       `(#:configure-flags
+                         '("-DCMAKE_CXX_COMPILER=clang++"
+                           "-DCMAKE_CXX_FLAGS=-stdlib=libc++"
+                           "-DCMAKE_EXE_LINKER_FLAGS=-lc++abi -lz")
+                         #:phases
+                         (modify-phases %standard-phases
+                           (add-after 'unpack 'chdir
+                             (lambda _ (chdir "lang/c++")))
+                           (add-after 'set-paths 'adjust-CPLUS_INCLUDE_PATH
+                             (lambda* (#:key inputs #:allow-other-keys)
+                               (let ((gcc (assoc-ref inputs  "gcc")))
+                                 (setenv "CPLUS_INCLUDE_PATH"
+                                         (string-join
+                                          (cons* (string-append (assoc-ref inputs "libcxx+libcxxabi")
+                                                                "/include/c++/v1")
+                                                 ;; Hide GCC's C++ headers so that they do not interfere with
+                                                 ;; the Clang headers.
+                                                 (delete (string-append gcc "/include/c++")
+                                                         (string-split (getenv "CPLUS_INCLUDE_PATH")
+                                                                       #\:)))
+                                          ":"))
+                                 (format #true
+                                         "environment variable `CPLUS_INCLUDE_PATH' changed to ~a~%"
+                                         (getenv "CPLUS_INCLUDE_PATH"))))))))
+                      (inputs
+                       `(("boost" ,boost-for-irods)
+                         ("clang" ,clang-toolchain-6)
+                         ("libcxx+libcxxabi" ,libcxx+libcxxabi-6)
+                         ("libcxxabi" ,libcxxabi-6)
+                         ("snappy" ,snappy-with-clang6)
+                         ("zlib" ,zlib)))))
+       ("boost" ,boost-for-irods)
+       ("cppzmq" ,cppzmq)
+       ("fmt" ,fmt-for-irods)
+       ("irods" ,irods)
+       ("json" ,json-modern-cxx)
+       ("libarchive" ,libarchive)
+       ("libcxxabi" ,libcxxabi-6)     ; we need this for linking with -lc++abi
+       ("mit-krb5" ,mit-krb5)
+       ("openssl" ,openssl)
+       ("zeromq" ,zeromq)))
+    (native-inputs
+     `(("clang" ,clang-toolchain-6)
+       ("clang-runtime" ,clang-runtime-6)
+       ("libcxx+libcxxabi" ,libcxx+libcxxabi-6)
+       ("help2man" ,help2man)
+       ("which" ,which)))
+    (home-page "https://irods.org")
+    (synopsis "Data management software")
+    (description "The Integrated Rule-Oriented Data System (iRODS) is data
+management software.  iRODS virtualizes data storage resources, so users can
+take control of their data, regardless of where and on what device the data is
+stored.")
+    (license license:bsd-3)))
-- 
2.31.1





  parent reply	other threads:[~2021-04-23 15:19 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-23 14:20 [bug#47972] Add irods Ricardo Wurmus
2021-04-23 14:31 ` [bug#47972] [PATCH 1/6] gnu: Add boost-for-irods Ricardo Wurmus
2021-04-23 14:31   ` [bug#47972] [PATCH 2/6] gnu: Add snappy-with-clang6 Ricardo Wurmus
2021-04-23 14:31   ` [bug#47972] [PATCH 3/6] gnu: Add nanodbc-for-irods Ricardo Wurmus
2021-04-23 14:31   ` [bug#47972] [PATCH 4/6] gnu: Add fmt-for-irods Ricardo Wurmus
2021-04-23 14:32   ` [bug#47972] [PATCH 5/6] gnu: Add irods Ricardo Wurmus
2021-04-23 14:32   ` Ricardo Wurmus [this message]
2021-04-24 11:02   ` [bug#47972] [PATCH 1/6] gnu: Add boost-for-irods Maxime Devos
2021-06-10  8:28   ` [bug#47972] Add irods Ludovic Courtès
2021-06-14 14:48     ` bug#47972: " Ricardo Wurmus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210423143201.12831-6-rekado@elephly.net \
    --to=rekado@elephly.net \
    --cc=47972@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).