all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#49456] [PATCH] gnu: add environment-modules
@ 2021-07-07  8:59 Ivan Gankevich
  2021-07-20 20:34 ` Ludovic Courtès
  2021-07-21 12:27 ` [bug#49456] [PATCH] gnu: Add modules Ivan Gankevich
  0 siblings, 2 replies; 5+ messages in thread
From: Ivan Gankevich @ 2021-07-07  8:59 UTC (permalink / raw)
  To: 49456; +Cc: Ivan Gankevich

---
 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





^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-07-23 15:06 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-07-07  8:59 [bug#49456] [PATCH] gnu: add environment-modules Ivan Gankevich
2021-07-20 20:34 ` Ludovic Courtès
2021-07-21 12:46   ` Ivan Gankevich
2021-07-21 12:27 ` [bug#49456] [PATCH] gnu: Add modules Ivan Gankevich
2021-07-23 15:04   ` bug#49456: [PATCH] gnu: add environment-modules Ludovic Courtès

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.