From patchwork Fri Apr 23 14:32:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Ricardo Wurmus X-Patchwork-Id: 28823 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 1E71527BC7C; Fri, 23 Apr 2021 15:33:25 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS, T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id DD08E27BC7D for ; Fri, 23 Apr 2021 15:33:23 +0100 (BST) Received: from localhost ([::1]:41764 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lZwrz-0003Jn-4M for patchwork@mira.cbaines.net; Fri, 23 Apr 2021 10:33:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50772) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lZwrh-00036X-7V for guix-patches@gnu.org; Fri, 23 Apr 2021 10:33:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:55150) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lZwrg-0005NP-VR for guix-patches@gnu.org; Fri, 23 Apr 2021 10:33:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lZwrg-00077T-SC for guix-patches@gnu.org; Fri, 23 Apr 2021 10:33:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#47972] [PATCH 5/6] gnu: Add irods. Resent-From: Ricardo Wurmus Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 23 Apr 2021 14:33:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47972 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: 47972@debbugs.gnu.org Cc: Ricardo Wurmus Received: via spool by 47972-submit@debbugs.gnu.org id=B47972.161918835927290 (code B ref 47972); Fri, 23 Apr 2021 14:33:04 +0000 Received: (at 47972) by debbugs.gnu.org; 23 Apr 2021 14:32:39 +0000 Received: from localhost ([127.0.0.1]:38456 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lZwrA-00075o-83 for submit@debbugs.gnu.org; Fri, 23 Apr 2021 10:32:38 -0400 Received: from sender4-of-o51.zoho.com ([136.143.188.51]:21160) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lZwr8-00075a-CA for 47972@debbugs.gnu.org; Fri, 23 Apr 2021 10:32:31 -0400 ARC-Seal: i=1; a=rsa-sha256; t=1619188346; cv=none; d=zohomail.com; s=zohoarc; b=Qfa2cORkOx1ItpjsmodN5FRM5cKMYFAlMi5leX4+QddL8ngc1aWSDvah4ligci9x+P4Dlu2fUQPEUrT9gpHap46uDaSa58k7jhwqx1MjdnA3D87fAP3zxDVg2jyDjuLYDYVbevMQj25BxSitcj9eYZaWMmUeCXMaRl73eMX4ClY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1619188346; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=gt+C9GUyNWFrR+5R9BUUCVD0RSS7SL/QmnaTF7dxuLE=; b=cm/1lOe6hL6mhfVCsuN3iLlCYleVCZnEFztlycbqhohoLSj1IwyhVyb179NLZZszircFZYStZWXShvJeEWFtxdH2V3o8TrixWxpYOKWru9tTa5o6Li8OF206duhEpxuwev5tVgOpmpxET+1/Tja+0nfMzf4kImHi3FJz9togH6k= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=elephly.net; spf=pass smtp.mailfrom=rekado@elephly.net; dmarc=pass header.from= header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1619188346; s=zoho; d=elephly.net; i=rekado@elephly.net; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:MIME-Version:Content-Type:Content-Transfer-Encoding; bh=gt+C9GUyNWFrR+5R9BUUCVD0RSS7SL/QmnaTF7dxuLE=; b=Bkc4CIarxDH6TftrqmK1fhjn6z6gWjJ+WSJrlvv+of/E4MtVi4oE2Aiqnxdj6rHR J5gr75QxS2OaBRQ3srggc/gJakk4H3nqIN4PGeeBmM+rvCWq9YiuOjuQt2SGaV8Q+Y2 6rEf8+CLWE9bIMA2z8cl7TEx4I22MXxJxgU34Lnk= Received: from localhost (p54ad4fb3.dip0.t-ipconnect.de [84.173.79.179]) by mx.zohomail.com with SMTPS id 1619188344380985.5269616705542; Fri, 23 Apr 2021 07:32:24 -0700 (PDT) From: Ricardo Wurmus Date: Fri, 23 Apr 2021 16:32:00 +0200 Message-Id: <20210423143201.12831-5-rekado@elephly.net> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210423143201.12831-1-rekado@elephly.net> References: <20210423143201.12831-1-rekado@elephly.net> MIME-Version: 1.0 X-ZohoMailClient: External X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/irods.scm: New file. * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. --- gnu/local.mk | 1 + gnu/packages/irods.scm | 200 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 201 insertions(+) create mode 100644 gnu/packages/irods.scm diff --git a/gnu/local.mk b/gnu/local.mk index 50b11a8ca2..f18fed6fbc 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -296,6 +296,7 @@ GNU_SYSTEM_MODULES = \ %D%/packages/installers.scm \ %D%/packages/ipfs.scm \ %D%/packages/irc.scm \ + %D%/packages/irods.scm \ %D%/packages/iso-codes.scm \ %D%/packages/jami.scm \ %D%/packages/java.scm \ diff --git a/gnu/packages/irods.scm b/gnu/packages/irods.scm new file mode 100644 index 0000000000..75a58d97cb --- /dev/null +++ b/gnu/packages/irods.scm @@ -0,0 +1,200 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2021 Ricardo Wurmus +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu packages irods) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix packages) + #:use-module (guix download) + #:use-module (guix build-system cmake) + #:use-module (guix utils) + #:use-module (gnu packages) + #:use-module (gnu packages backup) + #:use-module (gnu packages boost) + #:use-module (gnu packages check) + #:use-module (gnu packages compression) + #:use-module (gnu packages cpp) + #:use-module (gnu packages databases) + #:use-module (gnu packages gcc) + #:use-module (gnu packages kerberos) + #:use-module (gnu packages linux) + #:use-module (gnu packages llvm) + #:use-module (gnu packages logging) + #:use-module (gnu packages networking) + #:use-module (gnu packages pretty-print) + #:use-module (gnu packages python) + #:use-module (gnu packages serialization) + #:use-module (gnu packages tls) + #:use-module (srfi srfi-1)) + +(define-public irods + (package + (name "irods") + (version "4.2.8") + (source (origin + (method url-fetch) + (uri (string-append "https://github.com/irods/irods/releases/download/" + version "/irods-" version ".tar.gz")) + (sha256 + (base32 + "0ny54c3r0j692rvbr4iibg7xgd2i7g9x8yyrw04j889bywix14rc")))) + (build-system cmake-build-system) + (arguments + `(#:configure-flags + (list + "-DCMAKE_BUILD_TYPE=Release" + (string-append "-DCMAKE_MODULE_LINKER_FLAGS=-Wl,-rpath=" + (assoc-ref %outputs "out") "/lib") + (string-append "-DCMAKE_SHARED_LINKER_FLAGS=-Wl,-rpath=" + (assoc-ref %outputs "out") "/lib") + (string-append "-DCMAKE_EXE_LINKER_FLAGS=-Wl,-rpath=" + (assoc-ref %outputs "out") "/lib") + + ;; Configuration aborts if no generator format is set + "-DCPACK_GENERATOR=TGZ" + + ;; Configuration attempts to guess the distribution with Python. + "-DIRODS_LINUX_DISTRIBUTION_NAME=guix" + "-DIRODS_LINUX_DISTRIBUTION_VERSION_MAJOR=1" + + (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_CATCH2=" + (assoc-ref %build-inputs "catch2")) + (string-append "-DIRODS_EXTERNALS_FULLPATH_NANODBC=" + (assoc-ref %build-inputs "nanodbc")) + (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 comparison REQUIRE(errs.size() == err->len); + ;; in unit_tests/src/test_irods_lifetime_manager.cpp + (substitute* "CMakeLists.txt" + (("-Werror") "")))) + (add-after 'unpack 'remove-FHS-and-prefix-assumptions + (lambda* (#:key inputs #:allow-other-keys) + (substitute* '("CMakeLists.txt" + "cmake/server.cmake" + "cmake/development_library.cmake" + "cmake/runtime_library.cmake") + (("usr/") "")) + (substitute* "lib/core/src/irods_default_paths.cpp" + (("path.append\\(\"usr\"\\)") "path") + (("path.remove_filename\\(\\).remove_filename\\(\\).remove_filename\\(\\)") + "path.remove_filename().remove_filename()")) + (substitute* "scripts/irods/paths.py" + (("'usr', 'lib', 'irods'") "'lib', 'irods'")) + (substitute* "scripts/irods/pypyodbc.py" + (("\"/usr/lib/libodbc.so\"") + (string-append (assoc-ref inputs "unixodbc") "/lib/libodbc.so"))))) + (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 "catch2") + "/include/catch2") + (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) + ("json" ,json-modern-cxx) + ("libarchive" ,libarchive) + ("libcxxabi" ,libcxxabi-6) ; we need this for linking with -lc++abi + ("linux-pam" ,linux-pam) + ("mit-krb5" ,mit-krb5) + ("nanodbc" ,nanodbc-for-irods) + ("openssl" ,openssl) + ("python" ,python-wrapper) + ("unixodbc" ,unixodbc) + ("zeromq" ,zeromq))) + (native-inputs + `(("catch2" ,catch-framework2) + ("clang" ,clang-toolchain-6) + ("clang-runtime" ,clang-runtime-6) + ("libcxx+libcxxabi" ,libcxx+libcxxabi-6))) + (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)))