gnu: Add hyperledger-iroha.
[jackhill/guix/guix.git] / gnu / packages / chemistry.scm
index 03120aa..2b3b5d7 100644 (file)
@@ -1,6 +1,9 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2018 Konrad Hinsen <konrad.hinsen@fastmail.net>
 ;;; Copyright © 2018 Kei Kebreau <kkebreau@posteo.net>
+;;; Copyright © 2018 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2020 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
 
 (define-module (gnu packages chemistry)
   #:use-module (guix packages)
+  #:use-module (guix utils)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix download)
+  #:use-module (guix git-download)
   #:use-module (gnu packages)
   #:use-module (gnu packages algebra)
   #:use-module (gnu packages boost)
@@ -31,6 +36,7 @@
   #:use-module (gnu packages maths)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages python)
+  #:use-module (gnu packages python-xyz)
   #:use-module (gnu packages qt)
   #:use-module (gnu packages xml)
   #:use-module (guix build-system cmake)
   (package
     (name "avogadro")
     (version "1.2.0")
-    (source (origin
-              (method url-fetch)
-              (uri (string-append "https://github.com/cryos/avogadro/archive/"
-                                  version ".tar.gz"))
-              (sha256
-               (base32
-                "02v4h6hi1m7ilv0apdf74a8l1cm6dxnxyqp0rdaidrp3i9pf6lv4"))
-              (file-name (string-append name "-" version ".tar.gz"))
-              (patches
-               (search-patches "avogadro-eigen3-update.patch"
-                               "avogadro-python-eigen-lib.patch"
-                               "avogadro-boost148.patch"))))
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/cryos/avogadro.git")
+             (commit version)))
+       (sha256
+        (base32 "0258py3lkba85qhs5ynancinyym61vlp0zaq9yrfs3hhnhpzv9n2"))
+       (file-name (git-file-name name version))
+       (patches
+        (search-patches "avogadro-eigen3-update.patch"
+                        "avogadro-python-eigen-lib.patch"
+                        "avogadro-boost148.patch"))))
     (build-system cmake-build-system)
     (arguments
-     '(#:tests? #f
+     `(#:tests? #f
        #:configure-flags
        (list "-DENABLE_GLSL=ON"
              (string-append "-DPYTHON_LIBRARIES="
@@ -63,7 +70,9 @@
                             "/lib")
              (string-append "-DPYTHON_INCLUDE_DIRS="
                             (assoc-ref %build-inputs "python")
-                            "/include/python2.7"))
+                            "/include/python"
+                            ,(version-major+minor
+                               (package-version python))))
        #:phases
        (modify-phases %standard-phases
          (add-after 'unpack 'patch-python-lib-path
                (("^.*OUTPUT_VARIABLE.*")
                 (string-append "set(PYTHON_LIB_PATH \""
                                (assoc-ref outputs "out")
-                               "/lib/python2.7/site-packages\")")))
+                               "/lib/python"
+                               ,(version-major+minor
+                                  (package-version python))
+                               "/site-packages\")")))
              #t))
          (add-after 'install 'wrap-program
            (lambda* (#:key inputs outputs #:allow-other-keys)
                (setenv "PYTHONPATH"
                        (string-append
                         (assoc-ref outputs "out")
-                        "/lib/python2.7/site-packages:"
+                        "/lib/python"
+                        ,(version-major+minor
+                           (package-version python))
+                        "/site-packages:"
                         (getenv "PYTHONPATH")))
                (wrap-program (string-append out "/bin/avogadro")
                  `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))))
@@ -133,7 +148,7 @@ powerful plugin architecture.")
      `(#:python ,python-2
        ;; No test suite
        #:tests? #f))
-    (home-page "http://dirac.cnrs-orleans.fr/DomainFinder")
+    (home-page "http://dirac.cnrs-orleans.fr/DomainFinder.html")
     (synopsis "Analysis of dynamical domains in proteins")
     (description "DomainFinder is an interactive program for the determination
 and characterization of dynamical domains in proteins.  It can infer dynamical
@@ -229,13 +244,14 @@ analogy is that InChI is the bar-code for chemistry and chemical structures.")
     (version "3.0.11")
     (source
      (origin
-       (method url-fetch)
-       (uri (string-append "https://bitbucket.org/khinsen/"
-                           "nmoldyn3/downloads/nMOLDYN-"
-                           version ".tar.gz"))
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/khinsen/nMOLDYN3")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
        (sha256
         (base32
-         "1mvmz3lkr217kdrd8cvdr1d82y58wp1403c9rnd943mijgq8xb5a"))))
+         "016h4bqg419p6s7bcx55q5iik91gqmk26hbnfgj2j6zl0j36w51r"))))
     (build-system python-build-system)
     (inputs
      `(("python-matplotlib" ,(with-numpy-1.8 python2-matplotlib))
@@ -275,7 +291,7 @@ analogy is that InChI is the bar-code for chemistry and chemical structures.")
                ;; Show documentation as PDF
                (("PREFERENCES\\['documentation_style'\\] = 'html'")
                 "PREFERENCES['documentation_style'] = 'pdf'") ))))))
-    (home-page "http://dirac.cnrs-orleans.fr/nMOLDYN/")
+    (home-page "http://dirac.cnrs-orleans.fr/nMOLDYN.html")
     (synopsis "Analysis software for Molecular Dynamics trajectories")
     (description "nMOLDYN is an interactive analysis program for Molecular Dynamics
 simulations.  It is especially designed for the computation and decomposition of