From patchwork Mon Mar 4 08:35:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Pierre Neidhardt X-Patchwork-Id: 1280 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 C454316C43; Mon, 4 Mar 2019 08:36:13 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id 58B4B16C20 for ; Mon, 4 Mar 2019 08:36:13 +0000 (GMT) Received: from localhost ([127.0.0.1]:50297 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h0j52-0004bw-Oh for patchwork@mira.cbaines.net; Mon, 04 Mar 2019 03:36:12 -0500 Received: from eggs.gnu.org ([209.51.188.92]:60953) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h0j4t-0004bo-Od for guix-patches@gnu.org; Mon, 04 Mar 2019 03:36:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h0j4s-0004MQ-J8 for guix-patches@gnu.org; Mon, 04 Mar 2019 03:36:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:45381) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h0j4s-0004Lr-EE for guix-patches@gnu.org; Mon, 04 Mar 2019 03:36:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1h0j4s-0000Nk-7u for guix-patches@gnu.org; Mon, 04 Mar 2019 03:36:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#34727] [PATCH] gnu: Add hyperledger-fabric. Resent-From: Pierre Neidhardt Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 04 Mar 2019 08:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 34727 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 34727@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.15516885231413 (code B ref -1); Mon, 04 Mar 2019 08:36:02 +0000 Received: (at submit) by debbugs.gnu.org; 4 Mar 2019 08:35:23 +0000 Received: from localhost ([127.0.0.1]:58925 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h0j4F-0000Mi-BW for submit@debbugs.gnu.org; Mon, 04 Mar 2019 03:35:23 -0500 Received: from eggs.gnu.org ([209.51.188.92]:46304) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h0j4C-0000MV-Me for submit@debbugs.gnu.org; Mon, 04 Mar 2019 03:35:21 -0500 Received: from lists.gnu.org ([209.51.188.17]:47544) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1h0j47-0003Hs-Fq for submit@debbugs.gnu.org; Mon, 04 Mar 2019 03:35:15 -0500 Received: from eggs.gnu.org ([209.51.188.92]:60654) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h0j45-0004Oq-Um for guix-patches@gnu.org; Mon, 04 Mar 2019 03:35:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h0j44-0003ES-L9 for guix-patches@gnu.org; Mon, 04 Mar 2019 03:35:13 -0500 Received: from relay11.mail.gandi.net ([217.70.178.231]:45473) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1h0j44-00032s-6O for guix-patches@gnu.org; Mon, 04 Mar 2019 03:35:12 -0500 Received: from localhost.localdomain (lfbn-1-12225-33.w90-92.abo.wanadoo.fr [90.92.41.33]) (Authenticated sender: mail@ambrevar.xyz) by relay11.mail.gandi.net (Postfix) with ESMTPSA id CF72310000D for ; Mon, 4 Mar 2019 08:35:05 +0000 (UTC) From: Pierre Neidhardt Date: Mon, 4 Mar 2019 09:35:05 +0100 Message-Id: <20190304083505.13281-1-mail@ambrevar.xyz> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 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/local.mk (hyperledger): New variable. --- gnu/local.mk | 1 + gnu/packages/hyperledger.scm | 89 ++++++++++++++++++++++++++++++++++++ 2 files changed, 90 insertions(+) create mode 100644 gnu/packages/hyperledger.scm diff --git a/gnu/local.mk b/gnu/local.mk index 974195b4b..0909f9521 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -235,6 +235,7 @@ GNU_SYSTEM_MODULES = \ %D%/packages/hexedit.scm \ %D%/packages/hugs.scm \ %D%/packages/hurd.scm \ + %D%/packages/hyperledger.scm \ %D%/packages/ibus.scm \ %D%/packages/icu4c.scm \ %D%/packages/idris.scm \ diff --git a/gnu/packages/hyperledger.scm b/gnu/packages/hyperledger.scm new file mode 100644 index 000000000..5f8b78281 --- /dev/null +++ b/gnu/packages/hyperledger.scm @@ -0,0 +1,89 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2019 Pierre Neidhardt +;;; +;;; 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 hyperledger) + #:use-module (ice-9 match) + #:use-module (guix build-system go) + #:use-module (guix build-system trivial) + #:use-module (guix packages) + #:use-module (guix download) + #:use-module (guix git-download) + #:use-module (guix licenses) + #:use-module (gnu packages) + #:use-module (gnu packages base) + #:use-module (gnu packages curl) + #:use-module (gnu packages docker) + #:use-module (gnu packages golang) + #:use-module (gnu packages version-control)) + +(define-public hyperledger-fabric + (package + (name "hyperledger-fabric") + (version "1.4") + ;; While the GitHub repository is supposed to be "just a mirror," the Go + ;; imports refer to it explicitly. + (home-page "https://github.com/hyperledger/fabric") + (source (origin + (method git-fetch) + (uri (git-reference + (url home-page) + (commit (string-append "release-" version)))) + (sha256 + (base32 + "1g003wf6439f2c9i2vphf4sh463yyasq1vpqmkpw9lj170a6kl8k")) + (file-name (git-file-name name version)))) + (build-system go-build-system) + (native-inputs + `(("which" ,which) + ("docker-cli" ,docker-cli) + ("git" ,git) + ("curl" ,curl))) + (arguments + `(#:import-path "github.com/hyperledger/fabric" + #:unpack-path "github.com/hyperledger/fabric" + ;; We don't need to install the source code for end-user applications. + #:install-source? #f + ;; TODO: Tests require a running Docker daemon. + #:tests? #f + #:phases + (modify-phases %standard-phases + (replace 'build + (lambda _ + ;; Only linux-amd64 and linux-ppc64le seem to be supported at the moment. + (invoke "make" "-C" "src/github.com/hyperledger/fabric" + "release/linux-amd64"))) + (add-after 'install 'install-commands + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out")) + (src "src/github.com/hyperledger/fabric/")) + (with-directory-excursion src + (copy-recursively + "release/linux-amd64/bin" + (string-append out "/bin")) + (install-file "LICENSE" + (string-append out "/share/licenses")) + (install-file "README.md" + (string-append out "/share/doc")) + (copy-recursively "sampleconfig" + (string-append out "/etc/hyperledger/fabric")))) + #t))))) + (synopsis "Platform for distributed ledger solutions") + (description "A platform for distributed ledger solutions, underpinned by +a modular architecture delivering high degrees of confidentiality, resiliency, +flexibility and scalability.") + (license asl2.0)))