From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49326) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fe3LN-0000XA-US for guix-patches@gnu.org; Fri, 13 Jul 2018 15:03:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fe3LK-0003hF-O5 for guix-patches@gnu.org; Fri, 13 Jul 2018 15:03:05 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:51331) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fe3LK-0003gL-AG for guix-patches@gnu.org; Fri, 13 Jul 2018 15:03:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fe3LJ-0003lg-Un for guix-patches@gnu.org; Fri, 13 Jul 2018 15:03:01 -0400 Subject: [bug#32138] [PATCH] gnu: Add inchi. Resent-Message-ID: From: Kei Kebreau References: <20180713133941.12371-1-kkebreau@posteo.net> <87in5jcjks.fsf@fsfe.org> Date: Fri, 13 Jul 2018 15:01:47 -0400 In-Reply-To: <87in5jcjks.fsf@fsfe.org> (Jelle Licht's message of "Fri, 13 Jul 2018 16:10:43 +0200") Message-ID: <87a7qv0xk4.fsf@posteo.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" 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: Jelle Licht Cc: 32138@debbugs.gnu.org --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Jelle Licht writes: > Kei Kebreau writes: > >> * gnu/packages/chemistry.scm (inchi): New variable. >> --- >> gnu/packages/chemistry.scm | 3 +++ >> 1 file changed, 3 insertions(+) >> >> diff --git a/gnu/packages/chemistry.scm b/gnu/packages/chemistry.scm >> index f1359b2cf..df79f252b 100644 >> --- a/gnu/packages/chemistry.scm >> +++ b/gnu/packages/chemistry.scm >> @@ -1,5 +1,6 @@ >> ;;; GNU Guix --- Functional package management for GNU >> ;;; Copyright =C2=A9 2018 Konrad Hinsen >> +;;; Copyright =C2=A9 2018 Kei Kebreau >> ;;; >> ;;; This file is part of GNU Guix. >> ;;; >> @@ -20,9 +21,11 @@ >> #:use-module (guix packages) >> #:use-module ((guix licenses) #:prefix license:) >> #:use-module (guix download) >> + #:use-module (gnu packages compression) >> #:use-module (gnu packages gv) >> #:use-module (gnu packages maths) >> #:use-module (gnu packages python) >> + #:use-module (guix build-system gnu) >> #:use-module (guix build-system python)) >>=20=20 >> (define-public domainfinder > > It seems you forgot to commit the actual package definition :-). Whoops! Let's try this again! --=-=-= Content-Type: text/plain; charset=utf-8 Content-Disposition: attachment; filename=0001-gnu-Add-inchi.patch Content-Transfer-Encoding: quoted-printable From=20d132ab76417f238f914eb681a1c0f81b2375a1f9 Mon Sep 17 00:00:00 2001 From: Kei Kebreau Date: Fri, 13 Jul 2018 09:35:27 -0400 Subject: [PATCH] gnu: Add inchi. * gnu/packages/chemistry.scm (inchi): New variable. =2D-- gnu/packages/chemistry.scm | 81 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) diff --git a/gnu/packages/chemistry.scm b/gnu/packages/chemistry.scm index f1359b2cf..1a5086d62 100644 =2D-- a/gnu/packages/chemistry.scm +++ b/gnu/packages/chemistry.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright =C2=A9 2018 Konrad Hinsen +;;; Copyright =C2=A9 2018 Kei Kebreau ;;; ;;; This file is part of GNU Guix. ;;; @@ -20,9 +21,11 @@ #:use-module (guix packages) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix download) + #:use-module (gnu packages compression) #:use-module (gnu packages gv) #:use-module (gnu packages maths) #:use-module (gnu packages python) + #:use-module (guix build-system gnu) #:use-module (guix build-system python)) =20 (define-public domainfinder @@ -54,6 +57,84 @@ single structure. The software is currently not activel= y maintained and works only with Python 2 and NumPy < 1.9.") (license license:cecill-c))) =20 +(define-public inchi + (package + (name "inchi") + (version "1.05") + (source (origin + (method url-fetch) + (uri (string-append "http://www.inchi-trust.org/download/" + (string-join (string-split version #\.) = "") + "/INCHI-1-SRC.zip")) + (sha256 + (base32 + "081pcjx1z5jm23fs1pl2r3bccia0ww8wfkzcjpb7byhn7b513hsa")) + (file-name (string-append name "-" version ".zip")))) + (build-system gnu-build-system) + (arguments + '(#:tests? #f ; no check target + #:phases + (modify-phases %standard-phases + (delete 'configure) ; no configure script + (add-before 'build 'chdir-to-build-directory + (lambda _ (chdir "INCHI_EXE/inchi-1/gcc") #t)) + (add-after 'build 'build-library + (lambda _ + (chdir "../../../INCHI_API/libinchi/gcc") + (invoke "make"))) + (replace 'install + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (bin (string-append out "/bin")) + (doc (string-append out "/share/doc/inchi")) + (include-dir (string-append out "/include/inchi")) + (lib (string-append out "/lib/inchi")) + (inchi-doc (assoc-ref inputs "inchi-doc")) + (unzip (string-append (assoc-ref inputs "unzip") + "/bin/unzip"))) + (chdir "../../..") + ;; Install binary. + (with-directory-excursion "INCHI_EXE/bin/Linux" + (rename-file "inchi-1" "inchi") + (install-file "inchi" bin)) + ;; Install libraries. + (with-directory-excursion "INCHI_API/bin/Linux" + (for-each (lambda (file) + (install-file file lib)) + (find-files "." "libinchi\\.so\\.1\\.*"))) + ;; Install header files. + (with-directory-excursion "INCHI_BASE/src" + (for-each (lambda (file) + (install-file file include-dir)) + (find-files "." "\\.h$"))) + ;; Install documentation. + (mkdir-p doc) + (invoke unzip "-j" "-d" doc inchi-doc) + #t)))))) + (native-inputs + `(("unzip" ,unzip) + ("inchi-doc" + ,(origin + (method url-fetch) + (uri (string-append "http://www.inchi-trust.org/download/" + (string-join (string-split version #\.) = "") + "/INCHI-1-DOC.zip")) + (sha256 + (base32 + "1id1qb2y4lwsiw91qr2yqpn6kxbwjwhjk0hb2rwk4fxhdqib6da6")) + (file-name (string-append name "-" version ".zip")))))) + (home-page "https://www.inchi-trust.org") + (synopsis "Utility for manipulating machine-readable chemical structur= es") + (description + "The @dfn{InChI} (IUPAC International Chemical Identifier) algorithm = turns +chemical structures into machine-readable strings of information. InChIs = are +unique to the compound they describe and can encode absolute stereochemist= ry +making chemicals and chemistry machine-readable and discoverable. A simple +analogy is that InChI is the bar-code for chemistry and chemical structure= s.") + (license (license:non-copyleft + "file://LICENCE" + "See LICENCE in the distribution.")))) + (define with-numpy-1.8 (package-input-rewriting `((,python2-numpy . ,python2-numpy-1.8)))) =20 =2D-=20 2.18.0 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEg7ZwOtzKO2lLzi2m5qXuPBlGeg0FAltI9xsACgkQ5qXuPBlG eg33ghAAsYlMhDwOR9rINVbaAKSYw1PIJACXgKDrktz8/wxCNWORsHp2Im6HBzyW L7JPpbNrzLQmLvb3WVHuVb2NaezHrrkB9TeshKiaKFZXwQN8LfTrv6e8CvBnBPIw gpq4wen5yHqJRekEuwfHojYiORr+lwoO1H29QOWfU/mUbnH29t2gdQvIpA3eBN+n lu9Vvs6G2ntBhLsWszrrXtkpk110eFHsXJhwjPZ4CnTP/FLOjOCp5tGDcNP2e3KY +ai3xmp+fyZySP6XKd9Nz/viDajG/f1UhAbmIjuLNWau7OtYtVWTTIdbRGizubL0 lCz9zvx4JOhQsNLChH0viRRnG2r3JPXsAnIZMSXagYRt2ZCRFYAhIOOsvwL/h3j/ p8zNSHtUJi0dJmU+n0DLvhesuElw8jrHFf1h5cFFmLudMPSpzORNJeIOWxxvf8ui COT+JZBwvQXtm8j6jcugx3HlWTxnLTGlxa390rLcP5QEvUb8KfaRY3n5cWBFNTS1 T/pTGsvFXWk7M6xpH7CILDL6UoRnTUNwjg1uPdzGvk9LSXIq+04eqfiKu7PMvt99 jrX+ILGV3DokTo/5Pazr+1m7U3a4hLCP/et/2nHB3lTJGMMhIul0uI1u5mfbXKlt mA40mNFucOpPXYNiAQCSqAPeY+sZm3hT3DAerLQHjzZ1DAdY5Qs= =eQsX -----END PGP SIGNATURE----- --==-=-=--