From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id OMC7I1dt5WB+ngAAgWs5BA (envelope-from ) for ; Wed, 07 Jul 2021 11:01:11 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id aBByH1dt5WBVUgAAB5/wlQ (envelope-from ) for ; Wed, 07 Jul 2021 09:01:11 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 2E98F10BE9 for ; Wed, 7 Jul 2021 11:01:11 +0200 (CEST) Received: from localhost ([::1]:38318 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m13Qb-0002gk-RS for larch@yhetil.org; 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 Content-Transfer-Encoding: 8bit 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+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1625648471; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=nGY8mzcCcAbcOssuvBFvKdt8mPaTdQJPWOO4An/Yra4=; b=UUUjlVuKnh7vKxHmX8qAiBAMDt1HLtPJHcxCkk/EvffkVjE3mHfw93JphCIPZmjXkY/i0d kcd2UQR5a20gtMGS1jXJ+BUWSgbHwgZ5Pwj8oGm420JDWWP/FkED1Sw/kBxIkWzmamaGMX 5TWqlN1tdCtuU2qddemff2nkL6ryw/EpvvdIsu/fEm5AsM8R8TB9UW+4V2yClUJWq2bwcG Tw+V83KIqR4hAAyGcEUDYjDQjDX5ldtpSZjyinWX7V0J0UiVdzpcUdZstcGweb9s+9UBkf o0BZejpoJajDHDL+nJuZjKQhltBLbv/11LCDL9mJQzlhQhbcmMEyst3wxB3wHA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1625648471; a=rsa-sha256; cv=none; b=KkGHNd0Wbg6nk2lfysuPA1Ua5uDQy36qA3vzeI/eBtI3SUH7jiBrHft2gGxSnwJJ2iiN5K rDKrR0vo2Sozob1ujj4Jhz7PoJKXCLGMMQMf3Eu8angYCq902aHvqCLQnQVsF1t+NFqd7y 6DOGJg9BR5wOvIHAoL5tPaIwAktDt0+XogsdhMcgWvo39UDvJXNhPq0K+Gq8pX2MhQyL+d rB2v5bTTFmCigqwaJ3s8DnbjwEn0Rq9+UQbLeCwiN0ntMJKYJc/KzGkqxgdG21aPNFXjWP 6uCcT+kk5NaZTB5vMDuXMgMBJYy2/Ke24XtZ6FuktgIRdG9V4E3R0PNyb4z0uw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=spbu.ru header.s=20180812 header.b=wbZLzI2B; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: 3.59 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=spbu.ru header.s=20180812 header.b=wbZLzI2B; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 2E98F10BE9 X-Spam-Score: 3.59 X-Migadu-Scanner: scn0.migadu.com X-TUID: Tjs64shUufyd --- 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