unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Zelphir Kaltstahl <zelphirkaltstahl@posteo.de>
To: help-guix@gnu.org
Subject: usage of guix import / adding a package
Date: Fri, 17 Jul 2020 00:10:36 +0200	[thread overview]
Message-ID: <85cf6cfd-5bc1-d04a-7fbb-28e012c40215@posteo.de> (raw)

Hello Guix Users!

I read on
https://guix.gnu.org/manual/en/html_node/Invoking-guix-import.html:

"The guix import command is useful for people who would like to add a
package to the distribution with as little work as possible—a legitimate
demand. The command knows of a few repositories from which it can
“import” package metadata. The result is a package definition, or a
template thereof, in the format we know (see Defining Packages)."

I've recently tried this, for example for MyPy:

~~~~
guix import pypi -r mypy
~~~~

This will result in Guile code printed to my terminal. However, I do not
understand how to make use of that code. I do not understand how I can
load it. For example I tried using the -l argument with guix environment:

~~~~
guix import pypi -r mypy > additional_file.scm
guix environment --pure --load=additional_file.scm --ad-hoc python@3.8.2
/home/user/dev/Python/additional_file.scm:2:2: error: package: unbound variable
hint: Did you forget `(use-modules (guix packages))'?
~~~~

So that seems to be the wrong way of trying to make use of it.

Do I need to provide a patch to the project of the Guix package manager
to add this to Guix packages in general and then be able to use it in my
local setup?

I do not find the info, how I can now use MyPy inside an environment or
add it to the available packages on any of the following pages:

-
https://guix.gnu.org/manual/en/html_node/Python-Modules.html#Python-Modules

- https://guix.gnu.org/manual/en/html_node/Invoking-guix-import.html

While https://guix.gnu.org/manual/en/html_node/Submitting-Patches.html
makes me think, that perhaps I need to submit it as patch to be able to
use MyPy.

If so, how would I test, whether guix import did its thing correctly? I
could try running MyPy in an environment, but for that I would have to
somehow make use of what guix import gives me, before submitting a patch.

Also, if I need to submit a patch adding the guix import output
somewhere, is there a guide on how to create such a patch for the Guix
project?

Regards,
Zelphir

-- 
repositories: https://notabug.org/ZelphirKaltstahl


             reply	other threads:[~2020-07-16 22:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-16 22:10 Zelphir Kaltstahl [this message]
2020-07-16 22:27 ` usage of guix import / adding a package Julien Lepiller
2020-10-12 17:43   ` Zelphir Kaltstahl
2020-10-13  6:25     ` Efraim Flashner
2020-10-13 19:44       ` Zelphir Kaltstahl

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=85cf6cfd-5bc1-d04a-7fbb-28e012c40215@posteo.de \
    --to=zelphirkaltstahl@posteo.de \
    --cc=help-guix@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.
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).