all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Trouble with adding a package
@ 2018-03-26 17:49 Nadezhda Voronova
  2018-03-26 19:07 ` Leo Famulari
  2018-03-26 21:11 ` Ricardo Wurmus
  0 siblings, 2 replies; 7+ messages in thread
From: Nadezhda Voronova @ 2018-03-26 17:49 UTC (permalink / raw)
  To: help-guix

[-- Attachment #1: Type: text/plain, Size: 1423 bytes --]

Hi!

I'm trying to add one simple package.
I've already know that it installes by "guix package -f" so it seems like
my package definition is ok. Or not? (definition for "guix package -f"
https://paste.debian.net/1016791/ , definition https://paste.debian.net/
1016770/)

I've got guix source code from repository, added my definition in
"gnu/package" and run "guix environment guix", "./bootstrap", "./configure
--localstatedir=/var" and "make" and then tried "./pre-inst-env guix build
my-package". And it doesn't see my package. Also when i looked into
Makefile i've seen a bunch of "gnu/packages/---.scm" and there was not
"gnu/packages/my-package.scm" and it doesn't look right. Anyway, after that
i tried to add my definition to some random existing definition with right
dependencies (this idea sounds terribly wrong but i wanted to give it a
shot) and repeated all starting from "./bootstrap" again. And it did not
work.
Also i tried "./pre-inst-env guix build my-package --keep-failed". Still no
effects, unknown package.

So right now i'm totally confused about what i'm doing wrong and
don't even understand what's output may be relevant to problem and i'll be
very glad for help.


Also i have this thing appear almost every time i use guix:
guile: warning: failed to install locale
warning: failed to install locale: Invalid argument
Don't think that's relevant but it's a little bit annoying.


Thanks,
Nadya

[-- Attachment #2: Type: text/html, Size: 1896 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Trouble with adding a package
  2018-03-26 17:49 Trouble with adding a package Nadezhda Voronova
@ 2018-03-26 19:07 ` Leo Famulari
  2018-03-26 21:11 ` Ricardo Wurmus
  1 sibling, 0 replies; 7+ messages in thread
From: Leo Famulari @ 2018-03-26 19:07 UTC (permalink / raw)
  To: Nadezhda Voronova; +Cc: help-guix


[-- Attachment #1.1: Type: text/plain, Size: 2410 bytes --]

On Mon, Mar 26, 2018 at 08:49:28PM +0300, Nadezhda Voronova wrote:
> I'm trying to add one simple package.
> I've already know that it installes by "guix package -f" so it seems like
> my package definition is ok. Or not? (definition for "guix package -f"
> https://paste.debian.net/1016791/ , definition https://paste.debian.net/
> 1016770/)

Overall it looks like it should work. I've attached your package from
paste.debian.org for anyone else reading along.

> I've got guix source code from repository, added my definition in
> "gnu/package" and run "guix environment guix", "./bootstrap", "./configure
> --localstatedir=/var" and "make" and then tried "./pre-inst-env guix build
> my-package". And it doesn't see my package. Also when i looked into
> Makefile i've seen a bunch of "gnu/packages/---.scm" and there was not
> "gnu/packages/my-package.scm" and it doesn't look right.

It sounds like you hadn't yet registered your package module in
'gnu/local.mk'. If you want to add a new source file to Guix, you need
to register it there so that Make knows to build it. For example:

https://git.savannah.gnu.org/cgit/guix.git/commit/?id=6cf2ac3cd6a42ded34814ac9120c7637cf3f8c7f

> Anyway, after that
> i tried to add my definition to some random existing definition with right
> dependencies (this idea sounds terribly wrong but i wanted to give it a
> shot) and repeated all starting from "./bootstrap" again. And it did not
> work.
> Also i tried "./pre-inst-env guix build my-package --keep-failed". Still no
> effects, unknown package.

It's hard to know exactly what went wrong here; we'd need a patch of your
changes and the Git commit you are working from in order to reproduce
the issue.

But, I think you should try again adding a new module and registering it
in 'gnu/local.mk'.

> Also i have this thing appear almost every time i use guix:
> guile: warning: failed to install locale
> warning: failed to install locale: Invalid argument
> Don't think that's relevant but it's a little bit annoying.

Yes, this shouldn't have any effect on your issue. It's warning you
about an incomplete locales setup. Instructions on finishing the setup
are here:

https://www.gnu.org/software/guix/manual/html_node/Application-Setup.html#Locales-1

Basically, you'll need to export GUIX_LOCPATH in the environment where
you use Guix, and where the guix-daemon runs (that's why you see the
warning twice).

[-- Attachment #1.2: paste_1016791 --]
[-- Type: text/plain, Size: 582 bytes --]

(use-modules (guix)
             (guix build-system gnu)
             (gnu packages)
             (guix licenses))

(package
  (name "tcalc")
  (version "2.0")
  (source
    (origin
      (method url-fetch)
      (uri (string-append
             "https://sites.google.com/site/mohammedisam2000/tcalc/tcalc-"
             version
             ".tar.gz"))
      (sha256
        (base32
          "0jq806m4dqfia85nppfm75mml9w57g0cgv4cdw9bp3zymda83s0m"))))
  (build-system gnu-build-system)
  (synopsis
    "none")
  (description
    "none")
  (home-page
    "none")
  (license gpl3+))

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Trouble with adding a package
  2018-03-26 17:49 Trouble with adding a package Nadezhda Voronova
  2018-03-26 19:07 ` Leo Famulari
@ 2018-03-26 21:11 ` Ricardo Wurmus
  2018-03-27  1:10   ` Nadya Voronova
  1 sibling, 1 reply; 7+ messages in thread
From: Ricardo Wurmus @ 2018-03-26 21:11 UTC (permalink / raw)
  To: Nadezhda Voronova; +Cc: help-guix


Hi Nadya,

> I've got guix source code from repository, added my definition in
> "gnu/package" and run "guix environment guix", "./bootstrap", "./configure
> --localstatedir=/var" and "make" and then tried "./pre-inst-env guix build
> my-package". And it doesn't see my package.

Please add the package to an existing package module (one of the files
in “gnu/packages/”).  Modules usually hold more than a single package.

To make this work with your package definition you need to bind your
package expression to a public variable:

    (define-public tcalc
      (package
        (name "tcalc")
        …))

> Also i have this thing appear almost every time i use guix:
> guile: warning: failed to install locale
> warning: failed to install locale: Invalid argument
> Don't think that's relevant but it's a little bit annoying.

This is unrelated.  You should be able to remove these warnings by
installing the glibc-locales package and setting the GUIX_LOCPATH
environment variable to “$HOME/.guix-profile/lib/locale”.

--
Ricardo

GPG: BCA6 89B6 3655 3801 C3C6  2150 197A 5888 235F ACAC
https://elephly.net

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Trouble with adding a package
  2018-03-26 21:11 ` Ricardo Wurmus
@ 2018-03-27  1:10   ` Nadya Voronova
  2018-03-27  7:41     ` Ricardo Wurmus
  0 siblings, 1 reply; 7+ messages in thread
From: Nadya Voronova @ 2018-03-27  1:10 UTC (permalink / raw)
  To: help-guix

[-- Attachment #1: Type: text/plain, Size: 1833 bytes --]

Yep, i tried to do it.
I tried to add it to another file (with (define-public tcal)). And i tried
to add my file to "" (and it appeared in the Makefile). In both cases,
nothing happened, still unknown package.
So i tried "./pre-inst-env guix build hello" to confirm that this is the
problem of my package. And my terminal just froze. It seems that this is
not what should have happened.
Also, while I was experimenting I tried "sudo ./pre-inst-env guix-daemon
--build-users-group = guixbuild". And it froze my terminal too.



2018-03-27 0:11 GMT+03:00 Ricardo Wurmus <rekado@elephly.net>:

>
> Hi Nadya,
>
> > I've got guix source code from repository, added my definition in
> > "gnu/package" and run "guix environment guix", "./bootstrap",
> "./configure
> > --localstatedir=/var" and "make" and then tried "./pre-inst-env guix
> build
> > my-package". And it doesn't see my package.
>
> Please add the package to an existing package module (one of the files
> in “gnu/packages/”).  Modules usually hold more than a single package.
>
> To make this work with your package definition you need to bind your
> package expression to a public variable:
>
>     (define-public tcalc
>       (package
>         (name "tcalc")
>         …))
>
> > Also i have this thing appear almost every time i use guix:
> > guile: warning: failed to install locale
> > warning: failed to install locale: Invalid argument
> > Don't think that's relevant but it's a little bit annoying.
>
> This is unrelated.  You should be able to remove these warnings by
> installing the glibc-locales package and setting the GUIX_LOCPATH
> environment variable to “$HOME/.guix-profile/lib/locale”.
>
> --
> Ricardo
>
> GPG: BCA6 89B6 3655 3801 C3C6  2150 197A 5888 235F ACAC
> https://elephly.net
>
>
>

[-- Attachment #2: Type: text/html, Size: 2524 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Trouble with adding a package
  2018-03-27  1:10   ` Nadya Voronova
@ 2018-03-27  7:41     ` Ricardo Wurmus
  2018-03-28  0:56       ` Nadya Voronova
  0 siblings, 1 reply; 7+ messages in thread
From: Ricardo Wurmus @ 2018-03-27  7:41 UTC (permalink / raw)
  To: Nadya Voronova; +Cc: help-guix


Hi Nadya,

> Also, while I was experimenting I tried "sudo ./pre-inst-env guix-daemon
> --build-users-group = guixbuild". And it froze my terminal too.

If you meant

    sudo ./pre-inst-env guix-daemon --build-users-group=guixbuild

then “freezing” is expected.  This is a daemon, so it won’t exit.  It
will keep running and accepting requests.  Usually it is started by a
service manager or it is backgrounded manually when it is run in a
terminal session.

But you should only run it once.  After installing Guix you probably
already started the daemon (confirm with “pgrep -fa guix-daemon”), so
starting it again won’t work.

> Yep, i tried to do it.
> I tried to add it to another file (with (define-public tcal)). And i tried
> to add my file to "" (and it appeared in the Makefile). In both cases,
> nothing happened, still unknown package.

Was there any more output?

Could you send us the complete diff compared to the original sources you
downloaded?

--
Ricardo

GPG: BCA6 89B6 3655 3801 C3C6  2150 197A 5888 235F ACAC
https://elephly.net

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Trouble with adding a package
  2018-03-27  7:41     ` Ricardo Wurmus
@ 2018-03-28  0:56       ` Nadya Voronova
  2018-03-28 20:01         ` Ricardo Wurmus
  0 siblings, 1 reply; 7+ messages in thread
From: Nadya Voronova @ 2018-03-28  0:56 UTC (permalink / raw)
  To: help-guix

[-- Attachment #1: Type: text/plain, Size: 1416 bytes --]

I'm so sorry. I did probably the dumbest mistake.
I have package named "tcalc" and i was using "tcal" instead. Of course it
was unknown package.
And now everything is working.

2018-03-27 10:41 GMT+03:00 Ricardo Wurmus <rekado@elephly.net>:

>
> Hi Nadya,
>
> > Also, while I was experimenting I tried "sudo ./pre-inst-env guix-daemon
> > --build-users-group = guixbuild". And it froze my terminal too.
>
> If you meant
>
>     sudo ./pre-inst-env guix-daemon --build-users-group=guixbuild
>
> then “freezing” is expected.  This is a daemon, so it won’t exit.  It
> will keep running and accepting requests.  Usually it is started by a
> service manager or it is backgrounded manually when it is run in a
> terminal session.
>
> But you should only run it once.  After installing Guix you probably
> already started the daemon (confirm with “pgrep -fa guix-daemon”), so
> starting it again won’t work.
>
> > Yep, i tried to do it.
> > I tried to add it to another file (with (define-public tcal)). And i
> tried
> > to add my file to "" (and it appeared in the Makefile). In both cases,
> > nothing happened, still unknown package.
>
> Was there any more output?
>
> Could you send us the complete diff compared to the original sources you
> downloaded?
>
> --
> Ricardo
>
> GPG: BCA6 89B6 3655 3801 C3C6  2150 197A 5888 235F ACAC
> https://elephly.net
>
>
>

[-- Attachment #2: Type: text/html, Size: 2042 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Trouble with adding a package
  2018-03-28  0:56       ` Nadya Voronova
@ 2018-03-28 20:01         ` Ricardo Wurmus
  0 siblings, 0 replies; 7+ messages in thread
From: Ricardo Wurmus @ 2018-03-28 20:01 UTC (permalink / raw)
  To: Nadya Voronova; +Cc: help-guix


Hi Nadya,

> I'm so sorry. I did probably the dumbest mistake.
> I have package named "tcalc" and i was using "tcal" instead. Of course it
> was unknown package.

I’m glad you figured it out.

This happened to me more often than I’d like to admit.  Often this
message is just a symptom of a different error, but sometimes it really
does mean that you’ve mistyped the name of a package.

--
Ricardo

GPG: BCA6 89B6 3655 3801 C3C6  2150 197A 5888 235F ACAC
https://elephly.net

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-03-28 20:01 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-26 17:49 Trouble with adding a package Nadezhda Voronova
2018-03-26 19:07 ` Leo Famulari
2018-03-26 21:11 ` Ricardo Wurmus
2018-03-27  1:10   ` Nadya Voronova
2018-03-27  7:41     ` Ricardo Wurmus
2018-03-28  0:56       ` Nadya Voronova
2018-03-28 20:01         ` Ricardo Wurmus

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.