* Fwd: question on setting up guix.scm for project development
[not found] <CAJsg1E8Ay1v7=XYSQhCHDPZq5Ra9XpLbzf0G7o44d6Eh7m8Eiw@mail.gmail.com>
@ 2022-11-14 18:41 ` Andy Tai
2022-11-15 2:02 ` Pjotr Prins
2022-11-15 6:15 ` Julien Lepiller
0 siblings, 2 replies; 5+ messages in thread
From: Andy Tai @ 2022-11-14 18:41 UTC (permalink / raw)
To: guix-devel
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] 5+ messages in thread
* Re: Fwd: question on setting up guix.scm for project development
2022-11-14 18:41 ` Fwd: question on setting up guix.scm for project development Andy Tai
@ 2022-11-15 2:02 ` Pjotr Prins
2022-11-15 6:15 ` Julien Lepiller
1 sibling, 0 replies; 5+ messages in thread
From: Pjotr Prins @ 2022-11-15 2:02 UTC (permalink / raw)
To: Andy Tai; +Cc: guix-devel
It is a good idea. Best way is to create your own packages in a
channel and include those.
On Mon, Nov 14, 2022 at 10:41:58AM -0800, Andy Tai wrote:
> 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] 5+ messages in thread
* Re: Fwd: question on setting up guix.scm for project development
2022-11-14 18:41 ` Fwd: question on setting up guix.scm for project development Andy Tai
2022-11-15 2:02 ` Pjotr Prins
@ 2022-11-15 6:15 ` Julien Lepiller
2022-11-15 15:40 ` Andy Tai
1 sibling, 1 reply; 5+ messages in thread
From: Julien Lepiller @ 2022-11-15 6:15 UTC (permalink / raw)
To: guix-devel, Andy Tai
[-- Attachment #1: Type: text/plain, Size: 1580 bytes --]
I think you got it right, I've used thas in the past. Maybe your cli options are out of order? Instead of -f -d, try -D -f. Do you even have d1 or d3 in your current shell? Could they come from outside?
Le 14 novembre 2022 19:41:58 GMT+01:00, Andy Tai <atai@atai.org> a écrit :
>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.
>
[-- Attachment #2: Type: text/html, Size: 1891 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Fwd: question on setting up guix.scm for project development
2022-11-15 6:15 ` Julien Lepiller
@ 2022-11-15 15:40 ` Andy Tai
2022-11-15 16:46 ` Julien Lepiller
0 siblings, 1 reply; 5+ messages in thread
From: Andy Tai @ 2022-11-15 15:40 UTC (permalink / raw)
To: Julien Lepiller; +Cc: guix-devel
[-- Attachment #1: Type: text/plain, Size: 1119 bytes --]
Hi, thanks.
guix shell -D -f guix.scm
did work for me.... I did not see d2 0.1.4 from
guix package --list-installed
or
guix package --list-available
but
pkg-config --modversion d2
did show 0.1.4 So it is there, in this guix shell.
Thanks for all the replies to this question.
On Mon, Nov 14, 2022 at 10:15 PM Julien Lepiller <julien@lepiller.eu> wrote:
> I think you got it right, I've used thas in the past. Maybe your cli
> options are out of order? Instead of -f -d, try -D -f. Do you even have d1
> or d3 in your current shell? Could they come from outside?
>
> Le 14 novembre 2022 19:41:58 GMT+01:00, Andy Tai <atai@atai.org> a écrit :
>>
>>
>> ----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---
>>
>>
[-- Attachment #2: Type: text/html, Size: 3135 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Fwd: question on setting up guix.scm for project development
2022-11-15 15:40 ` Andy Tai
@ 2022-11-15 16:46 ` Julien Lepiller
0 siblings, 0 replies; 5+ messages in thread
From: Julien Lepiller @ 2022-11-15 16:46 UTC (permalink / raw)
To: Andy Tai; +Cc: guix-devel
[-- Attachment #1: Type: text/plain, Size: 1475 bytes --]
To be clear, guix package always operates on the list of installed packages in your user profile (~/.guix-profile), not packages from your environment. Don't rely on its information to look at what's in a guix shell :)
Le 15 novembre 2022 16:40:05 GMT+01:00, Andy Tai <atai@atai.org> a écrit :
>Hi, thanks.
>
>guix shell -D -f guix.scm
>
>did work for me.... I did not see d2 0.1.4 from
>
>
>guix package --list-installed
>or
>guix package --list-available
>but
>
>pkg-config --modversion d2
>
>did show 0.1.4 So it is there, in this guix shell.
>
>Thanks for all the replies to this question.
>
>On Mon, Nov 14, 2022 at 10:15 PM Julien Lepiller <julien@lepiller.eu> wrote:
>
>> I think you got it right, I've used thas in the past. Maybe your cli
>> options are out of order? Instead of -f -d, try -D -f. Do you even have d1
>> or d3 in your current shell? Could they come from outside?
>>
>> Le 14 novembre 2022 19:41:58 GMT+01:00, Andy Tai <atai@atai.org> a écrit :
>>>
>>>
>>> ----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---
>>>
>>>
[-- Attachment #2: Type: text/html, Size: 3625 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-11-15 16:46 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <CAJsg1E8Ay1v7=XYSQhCHDPZq5Ra9XpLbzf0G7o44d6Eh7m8Eiw@mail.gmail.com>
2022-11-14 18:41 ` Fwd: question on setting up guix.scm for project development Andy Tai
2022-11-15 2:02 ` Pjotr Prins
2022-11-15 6:15 ` Julien Lepiller
2022-11-15 15:40 ` Andy Tai
2022-11-15 16:46 ` Julien Lepiller
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).