me
/
guix
Archived
1
0
Fork 0

gnu: Add ringdecomposerlib.

* gnu/packages/chemistry.scm (ringdecomposerlib): New variable.

Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
master
David Elsing 2022-10-13 21:04:23 +00:00 committed by Liliana Marie Prikler
parent a3844f8a18
commit 175d1a0151
No known key found for this signature in database
GPG Key ID: 442A84B8C70E2F87
1 changed files with 80 additions and 0 deletions

View File

@ -999,3 +999,83 @@ calculations and analyzing the results.")
canonicalization of SMILES and MOL files, molecular structure fingerprinting
and rendering molecules.")
(license license:bsd-3)))
(define-public ringdecomposerlib
(package
(name "ringdecomposerlib")
(version "1.1.3")
(source (origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/rareylab/RingDecomposerLib")
(commit (string-append "v" version "_rdkit"))))
(file-name (git-file-name name version))
(sha256
(base32
"1rxzs2wpkkdi40wdzxc4sn0brk7dm7ivgqyfh38gf2f5c7pbg0wi"))))
(build-system cmake-build-system)
(arguments
(list
#:configure-flags
#~(list "-DBUILD_PYTHON_WRAPPER=ON"
"-DPYTHON_EXECUTABLE=python3"
(string-append "-DPYTHON_FLAGS=;--prefix=" #$output ";--root=/"))
#:imported-modules (append %cmake-build-system-modules
'((guix build python-build-system)))
#:modules '((guix build cmake-build-system)
(guix build utils)
((guix build python-build-system)
#:select (add-installed-pythonpath)))
#:phases
#~(modify-phases %standard-phases
(add-before 'configure 'patch-cmake
(lambda _
(substitute* (list "src/Test/CMakeLists.txt"
"src/RingDecomposerLib/CMakeLists.txt")
(("build_.*STATIC") "#"))
(substitute* "test/CMakeLists.txt"
(("STATIC_TEST") "SHARED_TEST"))
;; Link Python library against shared library
(substitute* "src/python/CMakeLists.txt"
(("RingDecomposerLibStatic") "RingDecomposerLib"))
(substitute* "src/python/setup.py.in"
(("static_libs =.*") "static_libs = []\n")
(("shared_libs\\s*=.*")
(string-append
"shared_libs = ['RingDecomposerLib']"))
(("library_dirs\\s*=\\s*\\[\\]")
"library_dirs = ['${CMAKE_BINARY_DIR}/src/RingDecomposerLib']")
(("extra_objects=.*")
(string-append
"extra_link_args=['-Wl,-rpath=" #$output "/lib'],\n")))))
(add-after 'build 'build-doc
(lambda _
;; Disable redundant LaTeX documentation
(substitute* "../source/documentation/sphinx/conf.py"
(("^(subprocess.*latex|shutil).*") ""))
(substitute* "../source/documentation/doxygen.cfg"
(("GENERATE_LATEX.*YES") "GENERATE_LATEX = NO"))
;; Build HTML documentation
(invoke "sphinx-build" "-b" "html"
"../source/documentation/sphinx" "html")))
(add-after 'install 'install-doc
(lambda _
;; Not reproducible
(delete-file-recursively "html/.doctrees")
(copy-recursively "html"
(string-append #$output "/share/doc/"
#$name "-" #$version "/html"))))
(delete 'check)
(add-after 'install 'check
(assoc-ref %standard-phases 'check))
(add-before 'check 'set-pythonpath
(lambda* (#:key inputs outputs #:allow-other-keys)
(add-installed-pythonpath inputs outputs))))))
(inputs (list python))
(native-inputs (list doxygen python python-cython python-sphinx))
(home-page "https://github.com/rareylab/RingDecomposerLib")
(synopsis "Calculate ring topology descriptions")
(description "RingDecomposerLib is a library for the calculation of
unique ring families, relevant cycles, the smallest set of smallest rings and
other ring topology descriptions.")
(license license:bsd-3)))