Re: Shebang and python packages

2021-06-03 Thread Tobias Geerinckx-Rice

Phil,

Phil 写道:

As I understand it, as python is not propagated there is no
guarantee that the version of python will be persisted in the 
store for

the lifetime of the profile containing (just) the python app?


Inputs are used when *building* things, not to manage their 
outputs (artefacts) once installed to the store.


References, not inputs, are how Guix automatically keeps track of 
which installed store items are live and which ones can be safely 
garbage-collected.


A reference just means the string "/gnu/store/…-foo" occurs 
anywhere in "/gnu/store/…-bar".  A patched shebang would be such a 
reference, so Guix knows your application uses Python because 
/gnu/store/…-yourapp-a.b.c contains references to 
/gnu/store/…-python-x.y.z.


Propagated-inputs are a hack that says as much as ‘when the user 
installs package A, pretend like they also asked to install 
package B in the same profile’.  That is *not* a good thing!  It's 
a work-around for broken packages and packages that would be far 
too much work to package in a more Guixy way.  Propagation causes 
all sorts of problems and makes profiles more fragile.  Avoid it.



Have I misunderstood this?


I think so, or maybe I'm misunderstanding your problem.  Have you 
observed a problem?


Kind regards,

T G-R


signature.asc
Description: PGP signature


Re: Shebang and python packages

2021-06-03 Thread Phil
Thanks for the reply.

Tobias Geerinckx-Rice writes:

> If all shebangs and similar entry points have been properly patched,
> why would you need to bundle ‘Python itself to run the app’ at all?

As I understand it, as python is not propagated there is no
guarantee that the version of python will be persisted in the store for
the lifetime of the profile containing (just) the python app?  I thought that
was the point of propagated inputs?  However if the profile explicitly
contains both the app and python, both are persisted.

Have I misunderstood this?



Re: Shebang and python packages

2021-06-03 Thread Tobias Geerinckx-Rice

Hi Phil,

Phil 写道:

I tend to build manifests containing my python app, and python
itself to run the app.  Originally I thought this was necessary 
to decouple the
app from a specific version of python, but assuming I'm right 
about
the patching of shebangs, this seems to be misguided - as any 
entry points
within the app will have been hardcoded to use a version of 
python at

build time, irrespective of the python version in the manifest?


If all shebangs and similar entry points have been properly 
patched, why would you need to bundle ‘Python itself to run the 
app’ at all?


Kind regards,

T G-R


signature.asc
Description: PGP signature


Shebang and python packages

2021-06-03 Thread Phil
Hi all,

It seems to be convention not to include python itself as a
propagated-input in python packages?

However the default-python version is included as a native-input for the
python-build-system - this means any shebangs are hardcoded to whatever
the current version of python may be.

Given this hardcoding, why isn't it also convention to package the version
of python that has been used to patch the shebangs as part of the
package?

I tend to build manifests containing my python app, and python
itself to run the app.  Originally I thought this was necessary to decouple the
app from a specific version of python, but assuming I'm right about
the patching of shebangs, this seems to be misguided - as any entry points
within the app will have been hardcoded to use a version of python at
build time, irrespective of the python version in the manifest?

Can anyone clarify best practice and reasoning behind it?

Thanks,
Phil.




Re: using docker in guix

2021-06-03 Thread Bone Baboon


Adam Kandur writes:

> Hi Bone,
> thank you but this command didn't helped, i got 
> ```
> Service dockerd could not be started.
> herd: failed to start service dockerd
> ```
> Jun 3, 2021, 17:19 by bone.bab...@disroot.org:
>
>> Adam Kandur via writes:
>>
>>> i'm sorry, i mean this error "Cannot connect to the Docker daemon at 
>>> unix:///var/run/docker.sock. Is the docker daemon running?"
>>>
>>
>> You could try `sudo herd restart dockerd`.
>>

Did you try running `sudo guix system reconfigure
/path/to/system/configuration.scm` before running `sudo herd restart
dockerd`?



Re: using docker in guix

2021-06-03 Thread Adam Kandur via
Hi Bone,
thank you but this command didn't helped, i got 
```
Service dockerd could not be started.
herd: failed to start service dockerd
```




Jun 3, 2021, 17:19 by bone.bab...@disroot.org:

> Adam Kandur via writes:
>
>> i'm sorry, i mean this error "Cannot connect to the Docker daemon at 
>> unix:///var/run/docker.sock. Is the docker daemon running?"
>>
>
> You could try `sudo herd restart dockerd`.
>




Re: using docker in guix

2021-06-03 Thread Bone Baboon
Adam Kandur via writes:

> i'm sorry, i mean this error "Cannot connect to the Docker daemon at 
> unix:///var/run/docker.sock. Is the docker daemon running?"

You could try `sudo herd restart dockerd`.



using docker in guix

2021-06-03 Thread Adam Kandur via
i'm sorry, i mean this error "Cannot connect to the Docker daemon at 
unix:///var/run/docker.sock. Is the docker daemon running?"




using docker in guix

2021-06-03 Thread Adam Kandur via
hi everyone! i've added docker-service-type but cannot user docker and get this 
error "930e243adc9721e53ace815c19ba216c58a8f6b2b1d40d8d970b16046fbba37a"




Building Guix packages/derivations from within a `guix system container`

2021-06-03 Thread Arun Isaac

Hi,

Is it possible to build guix packages or derivations from inside a
container created by `guix system container`? When I try to, I get the
following error. Is there any way to work around this?

--8<---cut here---start->8---
# guix build hello
guix build: error: remounting /gnu/store writable: Operation not
permitted
--8<---cut here---end--->8---

My specific use case is that I have the Laminar CI service running in a
guix system container. From within the CI job (which is just a regular
script), I wish to invoke guix to create and build certain derivations.

Thanks in advance!
Arun


signature.asc
Description: PGP signature


how to use gccgo?

2021-06-03 Thread Adam Kandur via
hi guix!
how i can compile .go files using gccgo in guix? i've installed gcc-toolchain 
and gccgo, but this does not work for me.