all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* How to pack development inputs from a package
@ 2024-09-20 13:46 Reza Housseini
  2024-09-21  3:21 ` Ian Eure
  2024-09-23 14:08 ` Greg Hogan
  0 siblings, 2 replies; 4+ messages in thread
From: Reza Housseini @ 2024-09-20 13:46 UTC (permalink / raw)
  To: help-guix

Hi Guixers

From guix shell I can call

  guix shell -D -f guix.scm

Now I want to pack those into a container with guix pack, but there is
no equivalent command there, how would I achieve this, is there an
expression I could use?

Something along the way

  guix pack -f docker -e '(package->development-manifest (from-file "guix.scm"))'

Thanks for any help,
Best Reza


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

* Re: How to pack development inputs from a package
  2024-09-20 13:46 How to pack development inputs from a package Reza Housseini
@ 2024-09-21  3:21 ` Ian Eure
  2024-09-23 14:08 ` Greg Hogan
  1 sibling, 0 replies; 4+ messages in thread
From: Ian Eure @ 2024-09-21  3:21 UTC (permalink / raw)
  To: Reza Housseini; +Cc: help-guix

Hi Reza,

Reza Housseini <reza.housseini@gmail.com> writes:

> Hi Guixers
>
> From guix shell I can call
>
>   guix shell -D -f guix.scm
>
> Now I want to pack those into a container with guix pack, but 
> there is
> no equivalent command there, how would I achieve this, is there 
> an
> expression I could use?
>
> Something along the way
>
>   guix pack -f docker -e '(package->development-manifest 
>   (from-file "guix.scm"))'
>

I believe you just need to bring the package’s inputs and 
native-inputs along.  This probably isn’t quite right, but should 
be close:

    guix pack -f docker -e '(let ((pkg (from-file "guix.scm"))) 
    (append (package-inputs pkg) (package-native-inputs pkg)))'

  — Ian


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

* Re: How to pack development inputs from a package
  2024-09-20 13:46 How to pack development inputs from a package Reza Housseini
  2024-09-21  3:21 ` Ian Eure
@ 2024-09-23 14:08 ` Greg Hogan
  2024-09-23 18:56   ` Reza Housseini
  1 sibling, 1 reply; 4+ messages in thread
From: Greg Hogan @ 2024-09-23 14:08 UTC (permalink / raw)
  To: Reza Housseini; +Cc: help-guix

On Fri, Sep 20, 2024 at 9:47 AM Reza Housseini <reza.housseini@gmail.com> wrote:
>
> Hi Guixers
>
> From guix shell I can call
>
>   guix shell -D -f guix.scm
>
> Now I want to pack those into a container with guix pack, but there is
> no equivalent command there, how would I achieve this, is there an
> expression I could use?
>
> Something along the way
>
>   guix pack -f docker -e '(package->development-manifest (from-file "guix.scm"))'

You have a manifest for the package, why not create a second manifest
for the container which includes guix.scm and returns the result of
package->development-manifest (or returns that concatenated with
additional useful development packages)?


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

* Re: How to pack development inputs from a package
  2024-09-23 14:08 ` Greg Hogan
@ 2024-09-23 18:56   ` Reza Housseini
  0 siblings, 0 replies; 4+ messages in thread
From: Reza Housseini @ 2024-09-23 18:56 UTC (permalink / raw)
  To: Greg Hogan; +Cc: help-guix

Greg Hogan <code@greghogan.com> writes:

Hi Ian, hi Greg

Thanks for your inputs, I tried to come up with an expression, but
failed to find one working, I got stuck with

guix pack -f docker -e '(@ (guix packages) (package-development-inputs (load "guix.scm")))'

but it does not seem to work.

I managed to make it work with an additional manifest.scm file with the
following content

(package->development-manifest (load "guix.scm"))

although I would have prefered the command line approach as I need to
call guix pack inside a script.

Thanks and all the best,
Reza


> On Fri, Sep 20, 2024 at 9:47 AM Reza Housseini <reza.housseini@gmail.com> wrote:
>>
>> Hi Guixers
>>
>> From guix shell I can call
>>
>>   guix shell -D -f guix.scm
>>
>> Now I want to pack those into a container with guix pack, but there is
>> no equivalent command there, how would I achieve this, is there an
>> expression I could use?
>>
>> Something along the way
>>
>>   guix pack -f docker -e '(package->development-manifest (from-file "guix.scm"))'
>
> You have a manifest for the package, why not create a second manifest
> for the container which includes guix.scm and returns the result of
> package->development-manifest (or returns that concatenated with
> additional useful development packages)?


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

end of thread, other threads:[~2024-09-23 18:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-20 13:46 How to pack development inputs from a package Reza Housseini
2024-09-21  3:21 ` Ian Eure
2024-09-23 14:08 ` Greg Hogan
2024-09-23 18:56   ` Reza Housseini

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.