unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: Ivan Gankevich <i.gankevich@spbu.ru>
Cc: 49456@debbugs.gnu.org
Subject: [bug#49456] [PATCH] gnu: add environment-modules
Date: Tue, 20 Jul 2021 22:34:55 +0200	[thread overview]
Message-ID: <87o8awk9lc.fsf@gnu.org> (raw)
In-Reply-To: <20210707085932.20751-1-i.gankevich@spbu.ru> (Ivan Gankevich's message of "Wed, 7 Jul 2021 11:59:33 +0300")

Hello,

Nice!  Overall LGTM, modulo cosmetic issues described below.

Ivan Gankevich <i.gankevich@spbu.ru> skribis:

> +++ b/gnu/packages/parallel.scm

How about ‘package-management.scm’ instead?

You probably need to add a copyright line for you too.

> +(define-public environment-modules
> +  (package
> +    (name "environment-modules")

Should the package name be “modules”, since that’s the name that
upstream seems to be using?

> +          (add-before 'configure 'patch-scripts-for-python-3
> +            (lambda _
> +              ;; patch the script for python-3

Nitpick: please capitalize sentences and end with a period.

> +              (substitute* "script/createmodule.py.in"
> +                (("pathkeys.sort\\(\\)") "pathkeys = sorted(pathkeys)")
> +                (("print\\(\"\\\\t\"\\*") "print(\"\\t\"*int")
> +                (("@PYTHON@") (which "python3")))
> +              #t))

You can omit the trailing #t (here and elsewhere).

> +          (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")

Is this change made for tests?  In the build environment, the build user
is potentially in the “kvm” group if it exists, but indeed, /etc/group
lacks “kvm” (see nix/libstore/build.cc:1777).

Should a post-check phase reinstate ‘-n’?

> +                    ))

Consider moving the parents on the previous line, as ‘guix lint’
suggests.  :-)

> +    (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.")

Please write full sentences for the description.

Could you send an updated patch?

Bonus points if you can provide a commit log that follows our
conventions.  :-)

  https://guix.gnu.org/manual/en/html_node/Submitting-Patches.html

Thanks!

Ludo’.




  reply	other threads:[~2021-07-20 20:36 UTC|newest]

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

  List information: https://guix.gnu.org/

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

  git send-email \
    --in-reply-to=87o8awk9lc.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=49456@debbugs.gnu.org \
    --cc=i.gankevich@spbu.ru \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).