all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ivan Gankevich <i.gankevich@spbu.ru>
To: 49456@debbugs.gnu.org
Cc: Ivan Gankevich <i.gankevich@spbu.ru>
Subject: [bug#49456] [PATCH] gnu: add environment-modules
Date: Wed,  7 Jul 2021 11:59:33 +0300	[thread overview]
Message-ID: <20210707085932.20751-1-i.gankevich@spbu.ru> (raw)

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





             reply	other threads:[~2021-07-07  9:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-07  8:59 Ivan Gankevich [this message]
2021-07-20 20:34 ` [bug#49456] [PATCH] gnu: add environment-modules 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210707085932.20751-1-i.gankevich@spbu.ru \
    --to=i.gankevich@spbu.ru \
    --cc=49456@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.