From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:50976) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jSkWr-0002m5-HC for guix-patches@gnu.org; Sun, 26 Apr 2020 12:53:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jSkWp-0007KJ-6D for guix-patches@gnu.org; Sun, 26 Apr 2020 12:53:17 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:51456) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jSkWo-0007Iz-O8 for guix-patches@gnu.org; Sun, 26 Apr 2020 12:53:14 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jSkWo-0005YP-LA for guix-patches@gnu.org; Sun, 26 Apr 2020 12:53:14 -0400 Subject: [bug#40874] [PATCH 94/94] gnu: Add sequoia. Resent-Message-ID: Received: from eggs.gnu.org ([2001:470:142:3::10]:50114) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jSkVj-0008Bp-7e for guix-patches@gnu.org; Sun, 26 Apr 2020 12:52:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jSkVg-0005L4-K8 for guix-patches@gnu.org; Sun, 26 Apr 2020 12:52:06 -0400 Received: from mail-out.m-online.net ([212.18.0.9]:48783) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jSkVf-0005Jo-Ts for guix-patches@gnu.org; Sun, 26 Apr 2020 12:52:04 -0400 From: Hartmut Goebel Date: Sun, 26 Apr 2020 18:46:13 +0200 Message-Id: <1293693f3427509e67f15d14962ae632e4d349da.1587919230.git.h.goebel@crazy-compilers.com> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 40874@debbugs.gnu.org * gnu/packages/sequoia.scm: New file. * gnu/local.mk: Add it. --- gnu/local.mk | 1 + gnu/packages/sequoia.scm | 162 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 163 insertions(+) create mode 100644 gnu/packages/sequoia.scm diff --git a/gnu/local.mk b/gnu/local.mk index 9f212434a9..2828d4c367 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -469,6 +469,7 @@ GNU_SYSTEM_MODULES = \ %D%/packages/search.scm \ %D%/packages/security-token.scm \ %D%/packages/selinux.scm \ + %D%/packages/sequoia.scm \ %D%/packages/serialization.scm \ %D%/packages/serveez.scm \ %D%/packages/shells.scm \ diff --git a/gnu/packages/sequoia.scm b/gnu/packages/sequoia.scm new file mode 100644 index 0000000000..2236be8d8a --- /dev/null +++ b/gnu/packages/sequoia.scm @@ -0,0 +1,162 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2019, 2020 Hartmut Goebel +;;; +;;; 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 sequoia) + #:use-module (guix build-system cargo) + #:use-module (guix download) + #:use-module (guix git-download) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix packages) + #:use-module (gnu packages) + #:use-module (gnu packages check) ;; python-pytest + #:use-module (gnu packages crates-io) + #:use-module (gnu packages libffi) ;; python-cffi + #:use-module (gnu packages llvm) + #:use-module (gnu packages multiprecision) + #:use-module (gnu packages nettle) + #:use-module (gnu packages pkg-config) + #:use-module (gnu packages python) + #:use-module (gnu packages python-xyz) ;; python-setuptools + #:use-module (gnu packages serialization) + #:use-module (gnu packages sqlite) + #:use-module (gnu packages tls)) + +(define-public sequoia + (package + (name "sequoia") + (version "0.16.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://gitlab.com/sequoia-pgp/sequoia.git") + (commit (string-append "v" version)))) + (sha256 + (base32 "0iwzi2ylrwz56s77cd4vcf89ig6ipy4w6kp2pfwqvd2d00x54dhk")) + (file-name (git-file-name name version)))) + (build-system cargo-build-system) + (outputs '("out" "python")) + (native-inputs + `(("clang" ,clang) + ("pkg-config" ,pkg-config) + ("python-pytest" ,python-pytest) + ("python-pytest-runner" ,python-pytest-runner))) + (inputs + `(("capnproto" ,capnproto) + ("gmp" ,gmp) + ("nettle" ,nettle) + ("openssl" ,openssl) + ("python" ,python) + ("python-cffi" ,python-cffi) + ("sqlite" ,sqlite))) + (arguments + `(#:tests? #f ;; building the tests requires 9.7GB total + #:cargo-inputs + (("rust-assert-cli" ,rust-assert-cli-0.6) + ("rust-anyhow" ,rust-anyhow-1.0) + ("rust-base64", rust-base64-0.11) + ;;("rust-buffered-reader" included + ("rust-bzip2", rust-bzip2-0.3) + ("rust-capnp" ,rust-capnp-0.10) + ("rust-capnp-rpc" ,rust-capnp-rpc-0.10) + ("rust-capnpc" ,rust-capnpc-0.10) + ("rust-chrono" ,rust-chrono-0.4) + ("rust-clap" ,rust-clap-2) + ("rust-clap" ,rust-clap-2) + ("rust-colored" ,rust-colored-1) + ("rust-crossterm" ,rust-crossterm-0.13) + ("rust-ctor", rust-ctor-0.1) + ("rust-dirs" ,rust-dirs-2.0) + ;;("rust-failure" included + ("rust-filetime" ,rust-filetime-0.2) + ("rust-flate2", rust-flate2-1.0) + ("rust-fs2" ,rust-fs2-0.4) + ("rust-futures" ,rust-futures-0.1) + ("rust-http" ,rust-http-0.1) + ("rust-hyper" ,rust-hyper-0.12) + ("rust-hyper-tls" ,rust-hyper-tls-0.3) + ("rust-idna", rust-idna-0.2) + ("rust-itertools" ,rust-itertools-0.8) + ("rust-lalrpop-util", rust-lalrpop-util-0.17) + ("rust-lazy-static", rust-lazy-static-1.3) + ("rust-libc" ,rust-libc-0.2) + ("rust-memsec", rust-memsec-0.5) + ("rust-native-tls" ,rust-native-tls-0.2) + ("rust-nettle", rust-nettle-7) + ("rust-parity-tokio-ipc" ,rust-parity-tokio-ipc-0.4) + ("rust-percent-encoding" ,rust-percent-encoding-2.1) + ("rust-prettytable-rs" ,rust-prettytable-rs-0.8) + ("rust-proc-macro2" ,rust-proc-macro2-1.0) + ("rust-quickcheck", rust-quickcheck-0.9) + ("rust-rand", rust-rand-0.7) + ("rust-regex", rust-regex-1.3) + ("rust-rusqlite" ,rust-rusqlite-0.19) + ("rust-tempfile" ,rust-tempfile-3.1) + ("rust-thiserror" ,rust-thiserror-1.0) + ("rust-tokio" ,rust-tokio-0.1) + ("rust-tokio-core" ,rust-tokio-core-0.1) + ("rust-unicode-normalization", rust-unicode-normalization-0.1) + ("rust-url" ,rust-url-2.1) + ("rust-zbase32" ,rust-zbase32-0.1)) + #:cargo-development-inputs + (("rust-bindgen" ,rust-bindgen-0.51) ;; FIXME for nettle-sys and rusqlite + ("rust-lalrpop" ,rust-lalrpop-0.17) + ("rust-rpassword" ,rust-rpassword-4)) + #:phases + (modify-phases %standard-phases + ;; Run make instead of using the rust build system, as + ;; suggested by the installation instructions + (replace 'build (lambda _ (invoke "make" "build-release") #t)) + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (if tests? + (invoke "make" "check") + #t))) + (replace 'install (lambda _ (invoke "make" "install") #t)) + (add-after 'unpack 'adjust-prefix + (lambda* (#:key outputs #:allow-other-keys) + (setenv "PREFIX" (assoc-ref outputs "out")) + #t)) + (add-after 'unpack 'fix-fo-python-output + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out")) + (pyout (assoc-ref outputs "python"))) + (substitute* "ffi/lang/python/Makefile" + ;; adjust prefix for python package + (("PREFIX\\s*\\??=.*") + (string-append "PREFIX = " pyout "\n")) + ;; fix rpath to include the main package + (("\\WLDFLAGS=" text) + (string-append text "'-Wl,-rpath=" out "/lib '")) + ;; make setuptools install into the prefix, see + ;; guix/build/python-build-system.scm for explanation + (("\\ssetup.py\\s+install\\s") + " setup.py install --root=/ --single-version-externally-managed ")) + #t))) + (add-after 'unpack 'set-missing-env-vars + (lambda* (#:key inputs #:allow-other-keys) + ;; FIXME: why do we need to set this here? + (setenv "LIBCLANG_PATH" + (string-append (assoc-ref inputs "clang") "/lib")) + #t))))) + (home-page "https://sequoia-pgp.org") + (synopsis "New OpenPGP implementation") + (description "Sequoia is a new OpenPGP implementation. It consists of +several crates, providing both a low-level and a high-level API for dealing +with OpenPGP data.") + (license license:gpl2+))) -- 2.21.3