GNU bug report logs -
#49456
[PATCH] gnu: add environment-modules
Previous Next
Reported by: Ivan Gankevich <i.gankevich <at> spbu.ru>
Date: Wed, 7 Jul 2021 09:01:01 UTC
Severity: normal
Tags: patch
Done: Ludovic Courtès <ludo <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your message dated Fri, 23 Jul 2021 17:04:53 +0200
with message-id <87lf5xax62.fsf_-_ <at> gnu.org>
and subject line Re: bug#49456: [PATCH] gnu: add environment-modules
has caused the debbugs.gnu.org bug report #49456,
regarding [PATCH] gnu: add environment-modules
to be marked as done.
(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)
--
49456: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=49456
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
---
gnu/packages/parallel.scm | 64 +++++++++++++++++++++++++++++++++++++++
1 file changed, 64 insertions(+)
diff --git a/gnu/packages/parallel.scm b/gnu/packages/parallel.scm
index 42826f49d6..f07ce02d33 100644
--- a/gnu/packages/parallel.scm
+++ b/gnu/packages/parallel.scm
@@ -41,8 +41,10 @@
#:use-module (gnu packages admin)
#:use-module (gnu packages autotools)
#:use-module (gnu packages base)
+ #:use-module (gnu packages dejagnu)
#:use-module (gnu packages flex)
#:use-module (gnu packages freeipmi)
+ #:use-module (gnu packages less)
#:use-module (gnu packages linux)
#:use-module (gnu packages mpi)
#:use-module (gnu packages perl)
@@ -378,3 +380,65 @@ and output captured in the notebook. Whatever arguments are accepted by a
SLURM command line executable are also accepted by the corresponding magic
command---e.g., @code{%salloc}, @code{%sbatch}, etc.")
(license license:bsd-3))))
+
+(define-public environment-modules
+ (package
+ (name "environment-modules")
+ (version "4.7.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "mirror://sourceforge/modules/Modules/modules-"
+ version "/modules-" version ".tar.bz2"))
+ (sha256 (base32 "07r03vqskjxyjy5m2b6p2px42djnd2z1k4b5j9dxqv8prin01ax6"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:configure-flags
+ (list (string-append "--with-bin-search-path="
+ (assoc-ref %build-inputs "tcl") "/bin" ":"
+ (assoc-ref %build-inputs "procps") "/bin" ":"
+ (assoc-ref %build-inputs "less") "/bin" ":"
+ (assoc-ref %build-inputs "coreutils") "/bin")
+ (string-append "--with-tcl=" (assoc-ref %build-inputs "tcl") "/lib")
+ "--disable-compat-version")
+ #:test-target "test"
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'configure 'patch-scripts-for-python-3
+ (lambda _
+ ;; patch the script for python-3
+ (substitute* "script/createmodule.py.in"
+ (("pathkeys.sort\\(\\)") "pathkeys = sorted(pathkeys)")
+ (("print\\(\"\\\\t\"\\*") "print(\"\\t\"*int")
+ (("@PYTHON@") (which "python3")))
+ #t))
+ (add-after 'configure 'patch-/bin/sh-in-tests
+ (lambda _
+ (for-each
+ (lambda (file)
+ (substitute* file
+ (("/bin/sh") (which "bash"))
+ ;; For some reason "kvm" group cannot be resolved for
+ ;; "nixbld" user. We remove "-n" switch here to not
+ ;; resolve the groups at all.
+ (("exec id -G -n -z") "exec id -G -z")
+ (("exec id -G -n") "exec id -G")
+ ))
+ '("testsuite/modules.00-init/005-init_ts.exp"
+ "testsuite/install.00-init/005-init_ts.exp"))
+ #t)))))
+ (native-inputs
+ `(("dejagnu" ,dejagnu)
+ ("autoconf" ,autoconf)
+ ("which" ,which)))
+ (inputs
+ `(("tcl" ,tcl)
+ ("less" ,less)
+ ("procps" ,procps)
+ ("coreutils" ,coreutils)
+ ("python" ,python-3)))
+ (home-page "http://modules.sourceforge.net/")
+ (synopsis "Shell environment variables and aliases management")
+ (description "A tool that simplify shell initialization and lets users
+easily modify their environment during the session with modulefiles.")
+ (license license:gpl2+)))
--
2.32.0
[Message part 3 (message/rfc822, inline)]
Hi,
Ivan Gankevich <i.gankevich <at> spbu.ru> skribis:
> * gnu/packages/package-management.scm (modules): New variable.
Pushed as 8bcd920c71ffa3bcd1f4290e6c252cc59bc9be52. I followed up with
a patch that removes FHS assumptions from the ‘add.modules’ script.
Thanks!
Ludo’.
This bug report was last modified 3 years and 364 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.