unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* question on setting up guix.scm for project development
@ 2022-11-14  6:29 Andy Tai
  2022-11-18 16:53 ` Ludovic Courtès
  0 siblings, 1 reply; 2+ messages in thread
From: Andy Tai @ 2022-11-14  6:29 UTC (permalink / raw)
  To: help-guix

Hi, guix allows setting up an environment containing all the
dependencies for development of a package; this can be done via a
guix.scm file containing the package definition.

My question is, if I am developing a package which has dependencies
with newer versions than what is available in the guix repo, how can I
use the guix.scm file to bring in the new version of the dependencies?
 As an example:

Say  my package "my-package" has dependencies d1, d2, d3
where d2 in the current guix package repo is at version 0.1.2 but I
need a later release version 0.1.4; so I tried something like this:

----guix.scm---
(use-modules (guix packages)
   ....)

(define-public d2-0.1.4
   (package
       (name "d2")
       (version "0.1.4")

   ...
)


(define-public my-package
   (package
      (name "my-package")
      (version "0.1")
     ...


     (input (list d1 d2-0.1.4 d3...)
    ....
))

my-package

---end guix.scm--


and if I use

guix shell -f -d ./guix.scm

this does not seem to generate an environment that contains the new
dependency, that is d2 version 0.1.4

I wonder how can this made to work?  Ideally no need to create a
private channel or such..  Thanks for info on this.


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

* Re: question on setting up guix.scm for project development
  2022-11-14  6:29 question on setting up guix.scm for project development Andy Tai
@ 2022-11-18 16:53 ` Ludovic Courtès
  0 siblings, 0 replies; 2+ messages in thread
From: Ludovic Courtès @ 2022-11-18 16:53 UTC (permalink / raw)
  To: Andy Tai; +Cc: help-guix

Hi,

Andy Tai <atai@atai.org> skribis:

> ----guix.scm---
> (use-modules (guix packages)
>    ....)
>
> (define-public d2-0.1.4
>    (package
>        (name "d2")
>        (version "0.1.4")
>
>    ...
> )
>
>
> (define-public my-package
>    (package
>       (name "my-package")
>       (version "0.1")
>      ...
>
>
>      (input (list d1 d2-0.1.4 d3...)
>     ....
> ))
>
> my-package
>
> ---end guix.scm--
>
>
> and if I use
>
> guix shell -f -d ./guix.scm
>
> this does not seem to generate an environment that contains the new
> dependency, that is d2 version 0.1.4

‘guix shell -f guix.scm’ generates an environment that contains the
package returned by ‘guix.scm’.

Conversely, ‘guix shell -D -f guix.scm’ produces the development
environment of the package returned by ‘guix.scm’.

HTH!

Ludo’.


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

end of thread, other threads:[~2022-11-18 16:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-14  6:29 question on setting up guix.scm for project development Andy Tai
2022-11-18 16:53 ` Ludovic Courtès

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).