From patchwork Wed Jul 7 08:59:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivan Gankevich X-Patchwork-Id: 31218 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 8859427BC81; Wed, 7 Jul 2021 10:01:10 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,SPF_HELO_PASS,T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 1D77C27BC78 for ; Wed, 7 Jul 2021 10:01:10 +0100 (BST) Received: from localhost ([::1]:38318 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m13Qb-0002gk-3D for patchwork@mira.cbaines.net; Wed, 07 Jul 2021 05:01:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60852) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m13QU-0002gC-5S for guix-patches@gnu.org; Wed, 07 Jul 2021 05:01:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:39298) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m13QT-00080j-Px for guix-patches@gnu.org; Wed, 07 Jul 2021 05:01:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m13QT-0003n1-P2 for guix-patches@gnu.org; Wed, 07 Jul 2021 05:01:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49456] [PATCH] gnu: add environment-modules Resent-From: Ivan Gankevich Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 07 Jul 2021 09:01:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 49456 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 49456@debbugs.gnu.org Cc: Ivan Gankevich X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.162564842114503 (code B ref -1); Wed, 07 Jul 2021 09:01:01 +0000 Received: (at submit) by debbugs.gnu.org; 7 Jul 2021 09:00:21 +0000 Received: from localhost ([127.0.0.1]:50842 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m13Po-0003lr-JM for submit@debbugs.gnu.org; Wed, 07 Jul 2021 05:00:20 -0400 Received: from lists.gnu.org ([209.51.188.17]:53988) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m13Pn-0003lj-4w for submit@debbugs.gnu.org; Wed, 07 Jul 2021 05:00:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60530) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m13Pl-0002TK-N9 for guix-patches@gnu.org; Wed, 07 Jul 2021 05:00:17 -0400 Received: from mail.spbu.ru ([195.70.197.23]:41468 helo=cgp2.pu.ru) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1m13Pe-0007ta-8C for guix-patches@gnu.org; Wed, 07 Jul 2021 05:00:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=simple/simple; d=spbu.ru; s=20180812; bh=qrN4/1Vnq4zKIICePkD7YfdwKnKrbNBda3wl3MM93Kc=; h=Content-Transfer-Encoding:MIME-Version:Message-Id:Date:Subject:Cc:To:From; b=wbZLzI2BWm1aCPJ/ysRY6zrDdNgv0V4DiiSTMjGiCKoMkPC+nwAT4wbyMgqhi7MNRpilXauRlq JZLdPxVk9tsM5lWll7/vA/kTqK7JJVQ0vH9V5jIPFmzZwtbGDsT+ZmjnjmKARVTCjKCC/I7/KElTo 8bWnyITpju5OYfnGMDDHWA+t18/RqBlAfGxiO+k81uoPL92e+DrFVKeG5/gPEtlFCgcS0o5Vze/G6 2KtuzwEpGOidMwmYt4voUKt3FwpbDgh1mMt35yoMPODofpavX3zaazQZlZ/H4f/ihLRmr3Hfsoo7w TqvtSnM9zuAVL4bUsfh4bG2rCTkBgZ7ZJpyKw== Received: from [172.27.221.159] (account st018947@spbu.ru HELO surge.ws.pu.ru) by spbu.ru (CommuniGate Pro SMTP 6.2.15) with ESMTPSA id 169995947; Wed, 07 Jul 2021 12:00:05 +0300 From: Ivan Gankevich Date: Wed, 7 Jul 2021 11:59:33 +0300 Message-Id: <20210707085932.20751-1-i.gankevich@spbu.ru> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Received-SPF: pass client-ip=195.70.197.23; envelope-from=i.gankevich@spbu.ru; helo=cgp2.pu.ru X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches --- 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+)))