gnu: avogadro: Don't hardcode python version.
* gnu/packages/chemistry.scm (avogadro)[arguments]: Replace hardcoded python version with parametrized one.
This commit is contained in:
parent
2f3977b9a7
commit
4ae16f9c4e
|
@ -1,6 +1,7 @@
|
||||||
;;; GNU Guix --- Functional package management for GNU
|
;;; GNU Guix --- Functional package management for GNU
|
||||||
;;; Copyright © 2018 Konrad Hinsen <konrad.hinsen@fastmail.net>
|
;;; Copyright © 2018 Konrad Hinsen <konrad.hinsen@fastmail.net>
|
||||||
;;; Copyright © 2018 Kei Kebreau <kkebreau@posteo.net>
|
;;; Copyright © 2018 Kei Kebreau <kkebreau@posteo.net>
|
||||||
|
;;; Copyright © 2018 Efraim Flashner <efraim@flashner.co.il>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
;;;
|
;;;
|
||||||
|
@ -19,6 +20,7 @@
|
||||||
|
|
||||||
(define-module (gnu packages chemistry)
|
(define-module (gnu packages chemistry)
|
||||||
#:use-module (guix packages)
|
#:use-module (guix packages)
|
||||||
|
#:use-module (guix utils)
|
||||||
#:use-module ((guix licenses) #:prefix license:)
|
#:use-module ((guix licenses) #:prefix license:)
|
||||||
#:use-module (guix download)
|
#:use-module (guix download)
|
||||||
#:use-module (gnu packages)
|
#:use-module (gnu packages)
|
||||||
|
@ -55,7 +57,7 @@
|
||||||
"avogadro-boost148.patch"))))
|
"avogadro-boost148.patch"))))
|
||||||
(build-system cmake-build-system)
|
(build-system cmake-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
'(#:tests? #f
|
`(#:tests? #f
|
||||||
#:configure-flags
|
#:configure-flags
|
||||||
(list "-DENABLE_GLSL=ON"
|
(list "-DENABLE_GLSL=ON"
|
||||||
(string-append "-DPYTHON_LIBRARIES="
|
(string-append "-DPYTHON_LIBRARIES="
|
||||||
|
@ -63,7 +65,9 @@
|
||||||
"/lib")
|
"/lib")
|
||||||
(string-append "-DPYTHON_INCLUDE_DIRS="
|
(string-append "-DPYTHON_INCLUDE_DIRS="
|
||||||
(assoc-ref %build-inputs "python")
|
(assoc-ref %build-inputs "python")
|
||||||
"/include/python2.7"))
|
"/include/python"
|
||||||
|
,(version-major+minor
|
||||||
|
(package-version python))))
|
||||||
#:phases
|
#:phases
|
||||||
(modify-phases %standard-phases
|
(modify-phases %standard-phases
|
||||||
(add-after 'unpack 'patch-python-lib-path
|
(add-after 'unpack 'patch-python-lib-path
|
||||||
|
@ -76,7 +80,10 @@
|
||||||
(("^.*OUTPUT_VARIABLE.*")
|
(("^.*OUTPUT_VARIABLE.*")
|
||||||
(string-append "set(PYTHON_LIB_PATH \""
|
(string-append "set(PYTHON_LIB_PATH \""
|
||||||
(assoc-ref outputs "out")
|
(assoc-ref outputs "out")
|
||||||
"/lib/python2.7/site-packages\")")))
|
"/lib/python"
|
||||||
|
,(version-major+minor
|
||||||
|
(package-version python))
|
||||||
|
"/site-packages\")")))
|
||||||
#t))
|
#t))
|
||||||
(add-after 'install 'wrap-program
|
(add-after 'install 'wrap-program
|
||||||
(lambda* (#:key inputs outputs #:allow-other-keys)
|
(lambda* (#:key inputs outputs #:allow-other-keys)
|
||||||
|
@ -85,7 +92,10 @@
|
||||||
(setenv "PYTHONPATH"
|
(setenv "PYTHONPATH"
|
||||||
(string-append
|
(string-append
|
||||||
(assoc-ref outputs "out")
|
(assoc-ref outputs "out")
|
||||||
"/lib/python2.7/site-packages:"
|
"/lib/python"
|
||||||
|
,(version-major+minor
|
||||||
|
(package-version python))
|
||||||
|
"/site-packages:"
|
||||||
(getenv "PYTHONPATH")))
|
(getenv "PYTHONPATH")))
|
||||||
(wrap-program (string-append out "/bin/avogadro")
|
(wrap-program (string-append out "/bin/avogadro")
|
||||||
`("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))))
|
`("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))))
|
||||||
|
|
Loading…
Reference in New Issue