Re: EXWM: file or program not found, ls

2021-01-05 Thread Gary Johnson
Hi Olivier,

I'm also on GuixSD, using EXWM as my window manager. It sounds like you
have an issue with your PATH environment variable.

I set my environment variables in ~/.bash_profile, so that they are
automatically set on login and are therefore propagated to Emacs when it
is started by EXWM.

Here's an excerpt from my ~/.bash_profile to get you started:

#
# Shell variables
export MYPROFILE=$HOME/.guix-profile
GUIX_PROFILE=$MYPROFILE source $MYPROFILE/etc/profile
export ASPELL_DICT_DIR=$MYPROFILE/lib/aspell
export GIT_EXEC_PATH=$MYPROFILE/libexec/git-core
export PATH=$MYPROFILE/bin:$MYPROFILE/sbin:$PATH
export CPATH=$MYPROFILE/include${CPATH:+:}$CPATH
export LIBRARY_PATH=$MYPROFILE/lib${LIBRARY_PATH:+:}$LIBRARY_PATH
export LD_LIBRARY_PATH=$MYPROFILE/lib${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH
export 
PKG_CONFIG_PATH=$MYPROFILE/lib/pkgconfig:$MYPROFILE/share/pkgconfig${PKG_CONFIG_PATH:+:}$PKG_CONFIG_PATH
export 
GIO_EXTRA_MODULES=$MYPROFILE/lib/gio/modules${GIO_EXTRA_MODULES:+:}$GIO_EXTRA_MODULES
export ACLOCAL_PATH=$MYPROFILE/share/aclocal${ACLOCAL_PATH:+:}$ACLOCAL_PATH
export NODE_PATH=$MYPROFILE/lib/node_modules${NODE_PATH:+:}$NODE_PATH

# Remove duplicates from *PATH* variables
export PATH=`awk -F: '{for(i=1;i<=NF;i++){if(!($i in a)){a[$i];printf 
s$i;s=":"}}}'<<<$PATH`
export INFOPATH=`awk -F: '{for(i=1;i<=NF;i++){if(!($i in a)){a[$i];printf 
s$i;s=":"}}}'<<<$INFOPATH`
export CPATH=`awk -F: '{for(i=1;i<=NF;i++){if(!($i in a)){a[$i];printf 
s$i;s=":"}}}'<<<$CPATH`
export LIBRARY_PATH=`awk -F: '{for(i=1;i<=NF;i++){if(!($i in a)){a[$i];printf 
s$i;s=":"}}}'<<<$LIBRARY_PATH`
export LD_LIBRARY_PATH=`awk -F: '{for(i=1;i<=NF;i++){if(!($i in 
a)){a[$i];printf s$i;s=":"}}}'<<<$LD_LIBRARY_PATH`
export PKG_CONFIG_PATH=`awk -F: '{for(i=1;i<=NF;i++){if(!($i in 
a)){a[$i];printf s$i;s=":"}}}'<<<$PKG_CONFIG_PATH`
export GIO_EXTRA_MODULES=`awk -F: '{for(i=1;i<=NF;i++){if(!($i in 
a)){a[$i];printf s$i;s=":"}}}'<<<$GIO_EXTRA_MODULES`
export ACLOCAL_PATH=`awk -F: '{for(i=1;i<=NF;i++){if(!($i in a)){a[$i];printf 
s$i;s=":"}}}'<<<$ACLOCAL_PATH`
export NODE_PATH=`awk -F: '{for(i=1;i<=NF;i++){if(!($i in a)){a[$i];printf 
s$i;s=":"}}}'<<<$NODE_PATH`
#

I also make ~/.bashrc a symlink to ~/.bash_profile since these variable
definitions are idempotent. I don't do any other fancy magic with
~/.profile, ~/.xsession, or ~/.xinitrc other than using xsetroot, xset,
setxkbmap, xrdb, and friends to tweak my X setup in .xsession and then
call exwm on its final line.

Hope that helps!
  Gary

Olivier Rojon  writes:

> Hello everyone,
>
> I am on GuixSD, using EXWM as my window manager.  Though I really
> appreciate the way it works, it seems that it does not find many of
> the programs which are required for emacs to function properly.
>
> I would like to, but cannot:
>
>  * use dmenu and see (recently used) programs
>  * open dired in a specific folder
>  * open a file
>  * use run-geiser / geiser / guile / mit-scheme / ...
>
>
> On the surface, most of these problems appear to be of the same
> nature: in many cases, the error message is (translated from german)!
>
> "Searching for program: file or directory not found, $PROGNAME", where
> $PROGNAME is one of the following:
>
>  * ls (in case of dired)
>  * git (open a file)
>  * guile (run-geiser / guile)
>
> dmenu is a bit different, because while I can start it just fine via
> keyboard shortcut, it finds only two programs, "env" and "sh".
>
>
> I have been asking several times on #guix if anyone can help me, but
> was not able to successfully put what I was told into practice.
>
> Essentially, I was told to "source /etc/profile". I tried to do that
> for .bashrc and .profile, but that didnt help, because I dont have
> similar problems in the command-line/shell, only in emacs.
>
> Then I was told to "source /etc/profile" from a file such as .xinitrc
> / .xsessions, which I tried but which also didnt work because gdm
> stayed in place via the system configuration (there has been a helpful
> HOWTO by Alex Kost, which I might try as well if nothing else helps).
>
> Before writing, I have experimented with the (extra-arguments
> '("source /etc/profile")) in the (xorg-configuration), but this led my
> system to not start anymore, so I rolled back.
>
>
> Any help or pointer is greatly appreciated. I hope I have provided the
> necessary information, otherwise feel free to ask.
>
> Thank you guys in advance, so far I am stoked by how great a community
> guix is, and how awesome guix itself is :)
>
> Greetings,
>
> Olivier


-- 
GPG Key ID: 7BC158ED
Use `gpg --search-keys lambdatronic' to find me
Protect yourself from surveillance: https://emailselfdefense.fsf.org
===
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments

Why is HTML 

Re: No Explicit Python Version Dependency In Package Definitions?

2021-01-05 Thread Ricardo Wurmus


Hi Phil,

> So I have a system say with python3.8 and python-scipy, and I decide I
> want to then install python-pandas (for example).  Will it not then
> build this for python 3.9 (due to the new definition), if the version of
> python has incremented between the installs of python-scipy and
> python-pandas?  Would I then have to manually reinstall python-scipy to
> have it under 3.9 (as well as 3.8) (or do a guix upgrade)?

Yes.  It’s important to upgrade your Python packages together to avoid
weirdness.  I suggest using a manifest.

> Last question, if today I wanted to create a profile that installed
> python-scipy against the python 3.9 package definition (which already
> exists in Guix it's just not the default).  Do I have to change the
> python-3 definition as per above, or is there another way of saying "use
> python3.9 just for this profile".
>
> I suspect I could use a manifest to install 3.9 rather than the default,
> but won't any packages still depend on 3.8 unless I switch the python-3
> definition?

Inside a manifest you can use the Guix package transformation API to
replace all instances of one Python variant with another — recursively
throughout the whole package graph.  You’ll have to compile all those
packages locally, though, because these package variants haven’t been
built by the build farm.  Luckily Guix does this for you.  It just takes
time (and electricity).

-- 
Ricardo



Re: Fast `guix environment --container' switch

2021-01-05 Thread Christopher Lemmer Webber
This is very cool.  We need something like this!

I'm replying partly to make a note that here's where some of this
conversation is... but I'm going to try to write an email over the next
couple of weeks of how to lead the way for making users safe through
Guix.  This is a useful reference starting point.

 - Chris


Ludovic Courtès writes:

> Hi!
>
> Pierre Neidhardt  skribis:
>
>> `guix environment --container ... -- my-foo-program` is great but a bit
>> slow to start.
>>
>> Is there a way to speed this up?
>
> The attached program (based on an experiment from 2018¹ with exciting
> yet to date mythical prospects) picks a program from $PATH (typically
> from your profile) and runs it in a container.  As in:
>
>   guix run inkscape
>
> It has less work to do compared to ‘guix environment’ so it is faster.
>
> HTH!
>
> Ludo’.
>
> ¹ https://lists.gnu.org/archive/html/help-guix/2018-01/msg00117.html
>
> ;;; GNU Guix --- Functional package management for GNU
> ;;; Copyright © 2018, 2019, 2020 Ludovic Courtès 
> ;;;
> ;;; This file is part of GNU Guix.
> ;;;
> ;;; GNU Guix is free software; you can redistribute it and/or modify it
> ;;; under the terms of the GNU General Public License as published by
> ;;; the Free Software Foundation; either version 3 of the License, or (at
> ;;; your option) any later version.
> ;;;
> ;;; GNU Guix is distributed in the hope that it will be useful, but
> ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
> ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> ;;; GNU General Public License for more details.
> ;;;
> ;;; You should have received a copy of the GNU General Public License
> ;;; along with GNU Guix.  If not, see .
>
> (define-module (guix scripts run)
>   #:use-module (guix ui)
>   #:use-module (guix utils)
>   #:use-module (guix scripts)
>   #:use-module (guix store)
>   #:use-module (guix packages)
>   #:use-module (guix derivations)
>   #:use-module ((guix build utils) #:select (which mkdir-p))
>   #:use-module (gnu build linux-container)
>   #:use-module (gnu system file-systems)
>   #:use-module (gnu packages)
>   #:use-module (srfi srfi-1)
>   #:use-module (srfi srfi-9 gnu)
>   #:use-module (srfi srfi-11)
>   #:use-module (srfi srfi-26)
>   #:use-module (srfi srfi-37)
>   #:use-module (ice-9 match)
>   #:export (guix-run))
>
> (define %options
>   (list (option '(#\h "help") #f #f
> (lambda args
>   (show-help)
>   (exit 0)))
> (option '(#\V "version") #f #f
> (lambda args
>   (show-version-and-exit "guix run")
>
> (define (show-help)
>   (display (G_ "Usage: guix run PACKAGE COMMAND...
> Run COMMAND from PACKAGE in a container.\n"))
>   (newline)
>   (display (G_ "
>   -h, --help display this help and exit"))
>   (display (G_ "
>   -V, --version  display version information and exit"))
>   (newline)
>   (show-bug-report-information))
>
>
>
> (define (bind-mount-spec/ro item)
>   (and (file-exists? item)
>(file-system
>  (device item)
>  (mount-point item)
>  (type "none")
>  (flags '(bind-mount read-only))
>  (check? #f
>
> (define (bind-mount-spec/rw item)
>   (and (file-exists? item)
>(file-system
>  (inherit (bind-mount-spec/ro item))
>  (flags '(bind-mount)
>
> ;; Safe in which applications run.
> (define-immutable-record-type 
>   (safe namespaces mappings)
>   safe?
>   (namespaces  safe-namespaces)
>   (mappingssafe-mappings))
>
> (define (application-safe items)
>   "Return safe corresponding to the application whose dependencies are listed
> in ITEMS."
>   (define packages
> (map (compose (cut package-name->name+version <> #\-)
>   store-path-package-name)
>  items))
>
>   (define x11? (member "libx11" packages))
>   (define dbus? (member "dbus" packages))
>   (define alsa? (member "alsa-lib" packages))
>   (define pulseaudio? (member "pulseaudio" packages))
>
>   (define mappings
> (let-syntax ((if (syntax-rules ()
>((_ condition body)
> (if condition
> (or (and=> body list) '())
> '()
>  (ro (identifier-syntax bind-mount-spec/ro))
>  (rw (identifier-syntax bind-mount-spec/rw)))
>   `(,(rw "/var/run/nscd/socket")
> ,@(if x11? (rw (string-append (getenv "HOME") "/.Xauthority")))
> ,@(if x11? (rw "/tmp/.X11-unix"))
> ,@(if x11? (rw (string-append "/run/user/"
>   (number->string (getuid)
> ,@(if dbus? (ro "/etc/machine-id"))
> ,@(if alsa? (rw "/dev/snd"))
> ,@(if pulseaudio? (rw (string-append (getenv "HOME") "/.pulse"))
>
>   (define namespaces
> ;; X11 applications need to run in the same IPC namespace as
> ;; the server.
> 

Re: How can I have a static IP on one NIC and DHCP on the other?

2021-01-05 Thread divoplade
Hello Katherine,

Le mardi 05 janvier 2021 à 15:49 -0600, Katherine Cox-Buday a écrit :
> Is it possible to define an operating-system which runs DHCP on one
> NIC,
> and has a static address on the other?

For a slightly different problem (adding a static ipv6 on the same
interface, [1]), I ended up creating a service that just did "ip
address add dev  " on startup, and it seems to work.
Maybe you can do something similar? The "ip" program is from the
iproute package, defined in (gnu packages linux).

[1] https://debbugs.gnu.org/cgi/bugreport.cgi?bug=44571

Hoping that it helps.

divoplade
(define-module (gnu services static-ipv6)
  #:use-module (gnu services)
  #:use-module (gnu services shepherd)
  #:use-module (guix gexp)
  #:use-module (guix modules)
  #:use-module (guix records)
  #:use-module (gnu packages linux)
  #:use-module (ice-9 match)
  #:use-module (ice-9 optargs))

(define-record-type* 
  static-ipv6-configuration
  make-static-ipv6-configuration
  static-ipv6-configuration?
  (iproute static-ipv6-configuration-iproute (default iproute))
  (address static-ipv6-configuration-address)
  (interface static-ipv6-configuration-interface))

(export 
	static-ipv6-configuration
	make-static-ipv6-configuration
	static-ipv6-configuration?
	static-ipv6-configuration-iproute
	static-ipv6-configuration-address
	static-ipv6-configuration-interface)

(define static-ipv6-shepherd-service
  (match-lambda
(($ 
	iproute address interface)
 (list
  (shepherd-service
   (provision '(static-ipv6))
   (documentation (format #f "Add ~a/128 to interface ~a"
			  address interface))
   (requirement '(user-processes loopback syslogd))
   (start
	#~(lambda _
	(system*
	 (string-append #$iproute "/sbin/ip")
	 "address"
	 "add"
	 "dev"
	 #$interface
	 (string-append #$address "/128"
   (stop
	#~(lambda _
	(system*
	 (string-append #$iproute "/sbin/ip")
	 "address"
	 "delete"
	 "dev"
	 #$interface
	 (string-append #$address "/128")

(define-public static-ipv6-service-type
  (service-type (name 'static-ipv6)
		(extensions
		 (list
		  (service-extension
		   shepherd-root-service-type
		   static-ipv6-shepherd-service)


How can I have a static IP on one NIC and DHCP on the other?

2021-01-05 Thread Katherine Cox-Buday
Is it possible to define an operating-system which runs DHCP on one NIC,
and has a static address on the other?

I'm getting:

guix system: error: service 'networking' provided more than once

if i try and define service for dhcp-client-service-type and
static-networking-service.

-- 
Katherine



Re: No Explicit Python Version Dependency In Package Definitions?

2021-01-05 Thread Christopher Baines

Phil  writes:

> Thanks for the reply.
>
> Christopher Baines writes:
>
>> Build systems are a mechanic to deduplicate common steps, but also
>> common inputs between packages, and the python-build-system will include
>> a default Python as an input.
>>
>> https://git.savannah.gnu.org/cgit/guix.git/tree/guix/build-system/python.scm#n138
>
> Got it - so the version is set behind the scenes depending on the
> current python package definition.
>
>> So, you can't have this particular python-scipy output in your store
>> without python as well, as it's referenced by some shared libraries,
>> which I guess makes sense.
>
> Yep - so even tho python 3.8 is not installed by installing eg
> python-scipy, the package is made available in the store as it's referenced.
>
>> When the default python version is changed, the build system will change
>> accordingly.
>
> Yep makes sense - so the python package will now reference the 3.9
> package here instead of 3.8:
>
> ;; Current 3.x version.
> (define-public python-3 python-3.8)
>
> I'm guessing my local Guix would stay on 3.8 until I did a guix
> upgrade.  At this point the new version of python-3 would force any
> python packages I had to reinstall against 3.9.  I assume my local 3.8 system
> would be left untouched, such that I could rollback both the python
> version and my packages if I wanted?

What you say is roughly right, but it's not very representative of what
happens. Upgrading to Guix that has Python 3.9 as the default from a
version where 3.8 is the default will affect the build system behaviour
as you've seen. Upgrading your profile will generate you a new
generation where the Python packages are built with 3.9 (as that's what
the updated Guix provides).

Changes to profiles are not destructive, so you can roll back.

> What would happen if I installed a new python package after pulling the
> latest package definitions tho?

Guix profiles work with search paths, and the PYTHONPATH is version
specifc, so python@3.9 will look in lib/python3.9/site-packages. You can
see this in action here:

→ guix environment --ad-hoc python python-pandas --search-paths
export 
PATH="/gnu/store/08y11hsyflh1fdpkvs8f8snydkr9vq36-profile/bin${PATH:+:}$PATH"
export 
PYTHONPATH="/gnu/store/08y11hsyflh1fdpkvs8f8snydkr9vq36-profile/lib/python3.8/site-packages${PYTHONPATH:+:}$PYTHONPATH"

If you have a python@3.8 plus one python library built with python@3.8
and another python library built with python@3.9, the PYTHONPATH Guix
generates will just include lib/python3.8/site-packages.

> So I have a system say with python3.8 and python-scipy, and I decide I
> want to then install python-pandas (for example).  Will it not then
> build this for python 3.9 (due to the new definition), if the version of
> python has incremented between the installs of python-scipy and
> python-pandas?  Would I then have to manually reinstall python-scipy to
> have it under 3.9 (as well as 3.8) (or do a guix upgrade)?

Yep.

> Last question, if today I wanted to create a profile that installed
> python-scipy against the python 3.9 package definition (which already
> exists in Guix it's just not the default).  Do I have to change the
> python-3 definition as per above, or is there another way of saying "use
> python3.9 just for this profile".

You can pass the python package to use to the python-build-system
through the #:python argument. Look for examples of this in Guix,
there's plenty for Python 2 only libraries.

There are quite a few transformation options that you can use when
building/installing packages, but I'm not aware of one that works with
build system arguments. Maybe that could be added though. Without that,
you'd need to either change the default python, or generate a variant of
the library which uses the python you intend.

> I suspect I could use a manifest to install 3.9 rather than the default,
> but won't any packages still depend on 3.8 unless I switch the python-3
> definition?

Yes.


signature.asc
Description: PGP signature


stumpwm contrib modules have been broken

2021-01-05 Thread Katherine Cox-Buday
Sometime recently, the way Common Lisp code is compiled was changed (for
the better, I think), and now my StumpWM contrib modules won't load.
Here's why:

StumpWM looks[1] for .asd files to determine what is a module. Guix's
Common Lisp build system used to combine an entire system into a single
.fasl file and then produce a .asd file for loading it. Now -- as far as
I can tell -- it looks like `lib/common-lisp/sbcl` is more like the
Common Lisp cache: one .fasl file per .lisp file.

If I point StumpWM at `lib/common-lisp/sbcl` via `set-module-dir`, it
finds no modules. If I point StumpWM at `share/common-lisp/sbcl`, it
finds modules, tries to compile them, and then gives me a permissions
error about writing to the `/gnu` store.

Is anyone using StumpWM contrib modules successfully with Guix's new
layout? How?

[1] - https://github.com/stumpwm/stumpwm/blob/master/module.lisp#L70

-- 
Katherine



Re: Channel details of profile generation

2021-01-05 Thread zimoun
Hi,

On Mon, 4 Jan 2021 at 18:29, Phil  wrote:

> > Could you share how you generated the profile ’my-profile’?
>
> Yes - the issue here appears to be the inclusion of a package from a
> private channel in the manifest.
>
> If I create a manifest only using Guix packages - everything looks OK - eg:
>
> ubuntu@test-image:~/guix-manifests$ cat test-manifest.scm
> (packages->manifest
>  (list (specification->package "python@3.8.2")))

[...]

> ubuntu@test-image:~/guix-manifests$ guix package -m test-manifest.scm -p 
> ~/guix-profiles/test-profile

[...]

> ubuntu@test-image:~/guix-manifests$ guix pull -p ~/guix-profiles/test-profile 
> -l
> \Generation 1   Jan 04 2021 17:00:58\   (current)
>   python 3.8.2

As I explained in the previous email, even if both are profiles, they
are not the same.  Basically, "guix pull" is for
"~/.config/guix/current" which is somehow special.  Therefore, I do
not know what you want to achieve with "guix pull -p
~/guix-profiles/test-profile -l".  Maybe, what you want is instead:
""guix package -p ~/guix-profiles/test-profile -l".  Otherwise, could
you explain which result you are expecting whatever the command to
use?


> But if I now also add a package from my private channel to the manifest:
>
> ubuntu@test-image:~/guix-manifests$ cat test-manifest-2.scm
> (packages->manifest
>  (list (specification->package "python@3.8.2")
>(@ (py-test-pkg) py-test-pkg-develop)))

This looks weird to me.  For example, I have 2 channels:

--8<---cut here---start->8---
$ guix describe
Generation 99   Jan 05 2021 16:56:39(current)
  guix-science cf87b05
repository URL: https://github.com/guix-science/guix-science.git
branch: master
commit: cf87b0501c4a38b96edf41025a27bf1cb91f521a
  guix 957f0c4
repository URL: https://git.savannah.gnu.org/git/guix.git
branch: master
commit: 957f0c40327ce00f53db22737e3775ce616ac258
--8<---cut here---end--->8---

and let consider this package from the extra channel:

--8<---cut here---start->8---
$ guix show python-nose-exclude | recsel -p location
location: guix-science/packages/jupyter.scm:71:2
--8<---cut here---end--->8---

then my manifest.scm file contains:

--8<---cut here---start->8---
$ cat /tmp/my-manifest.scm
(specifications->manifest
 (list
  "python"
  "python-nose-exclude"))
--8<---cut here---end--->8---

and "guix package -m /tmp/my-manifest.scm -p /tmp/test-profile" does the job

--8<---cut here---start->8---
$ guix package -p /tmp/test-profile -l
Generation 1Jan 05 2021 16:58:40(current)
  python-nose-exclude   0.5.0   out /gnu/store/...-python-nose-exclude-0.5.0
  python3.8.2   out /gnu/store/...-python-3.8.2
--8<---cut here---end--->8---

And even "guix pull -p /tmp/test-profile -l" works.  Now, I replace
the manifest to only contain the package hello.

--8<---cut here---start->8---
$ guix package -p /tmp/test-profile -l
Generation 1Jan 05 2021 16:58:40
  python-nose-exclude   0.5.0   out
/gnu/store/k3n4qxakw4rjjg81sfkaxcgln5xhaj3r-python-nose-exclude-0.5.0
  python3.8.2   out
/gnu/store/9h5pjxj879y9rzy04m1v9835l4fblw95-python-3.8.2

Generation 2Jan 05 2021 17:05:29(current)
 + hello2.10out
/gnu/store/a462kby1q51ndvxdv3b6p0rsixxrgx1h-hello-2.10
 - python   3.8.2   out
/gnu/store/9h5pjxj879y9rzy04m1v9835l4fblw95-python-3.8.2
 - python-nose-exclude  0.5.0   out
/gnu/store/k3n4qxakw4rjjg81sfkaxcgln5xhaj3r-python-nose-exclude-0.5.0
--8<---cut here---end--->8---

Then, I re-use the 2 pythons packages, re-upgrade the profile and then:

--8<---cut here---start->8---
$ guix pull -p /tmp/test-profile -l
Generation 1Jan 05 2021 16:58:40
  python-nose-exclude 0.5.0
  python 3.8.2
Generation 2Jan 05 2021 17:05:29
  hello 2.10
Generation 3Jan 05 2021 16:58:40(current)
  python-nose-exclude 0.5.0
  python 3.8.2
--8<---cut here---end--->8---



> ubuntu@test-image:~/guix-manifests$ guix pull -p ~/guix-profiles/test-profile 
> -l

Even if I am not sure to understand what you want to do, I am not able
to reproduce.  With /tmp/my-manifest-{1,2}.scm containing:

--8<---cut here---start->8---
(specifications->manifest (list "python"))
--8<---cut here---end--->8---

--8<---cut here---start->8---
(specifications->manifest (list "python" "python-nose-exclude"))
--8<---cut here---end--->8---

I get:

--8<---cut here---start->8---
$ guix package -p /tmp/foo -m 

Re: No Explicit Python Version Dependency In Package Definitions?

2021-01-05 Thread Phil
Thanks for the reply.

Christopher Baines writes:

> Build systems are a mechanic to deduplicate common steps, but also
> common inputs between packages, and the python-build-system will include
> a default Python as an input.
>
> https://git.savannah.gnu.org/cgit/guix.git/tree/guix/build-system/python.scm#n138

Got it - so the version is set behind the scenes depending on the
current python package definition.

> So, you can't have this particular python-scipy output in your store
> without python as well, as it's referenced by some shared libraries,
> which I guess makes sense.

Yep - so even tho python 3.8 is not installed by installing eg
python-scipy, the package is made available in the store as it's referenced.

> When the default python version is changed, the build system will change
> accordingly.

Yep makes sense - so the python package will now reference the 3.9
package here instead of 3.8:

;; Current 3.x version.
(define-public python-3 python-3.8)

I'm guessing my local Guix would stay on 3.8 until I did a guix
upgrade.  At this point the new version of python-3 would force any
python packages I had to reinstall against 3.9.  I assume my local 3.8 system
would be left untouched, such that I could rollback both the python
version and my packages if I wanted?

What would happen if I installed a new python package after pulling the
latest package definitions tho?

So I have a system say with python3.8 and python-scipy, and I decide I
want to then install python-pandas (for example).  Will it not then
build this for python 3.9 (due to the new definition), if the version of
python has incremented between the installs of python-scipy and
python-pandas?  Would I then have to manually reinstall python-scipy to
have it under 3.9 (as well as 3.8) (or do a guix upgrade)?

Last question, if today I wanted to create a profile that installed
python-scipy against the python 3.9 package definition (which already
exists in Guix it's just not the default).  Do I have to change the
python-3 definition as per above, or is there another way of saying "use
python3.9 just for this profile".

I suspect I could use a manifest to install 3.9 rather than the default,
but won't any packages still depend on 3.8 unless I switch the python-3
definition?

Thanks again!






Problem on packaging qt-light extension for Chicken

2021-01-05 Thread Reza Alizadeh Majd
Hi Guix,

trying to prepare package for qt-light[1] extension for chicken-scheme,
I faced an issue about finding the extension in cache. 

my package definition:

--8<---cut here---start->8---
(use-modules (gnu)
 (guix build-system chicken)
 (guix svn-download)
 (guix packages)
 (gnu packages chicken)
 (gnu packages qt)
 ((guix licenses) #:prefix license:))
(package
  (name "chicken-qt-light")
  (version "1.0")
  (source
   (origin
 (method svn-fetch)
 (uri (svn-reference
   (url (string-append
 "https://code.call-cc.org/svn/chicken-eggs/;
 "release/5/qt-light/tags/" version))
   (revision 39484)
   (user-name "anonymous")
   (password "")))
 (file-name (string-append "chicken-qt-light-" version "-checkout"))
 (sha256
  (base32
   "09mhv6d4zfc0n2vxaw1d8s3hr9bdh19iq389ajzsm2947988rs58"
  (build-system chicken-build-system)
  (arguments
   '(#:egg-name "qt-light"
 #:phases
 (modify-phases %standard-phases
   (add-before 'build 'setup-environment
 (lambda* (#:key inputs #:allow-other-keys)
   (setenv "QTDIR" (assoc-ref inputs "qt"))
   #t)))
 ))
  (inputs `(("qt" ,qtbase)))
  (home-page "https://wiki.call-cc.org/eggref/5/qt-light;)
  (synopsis "A lightweight Qt 5 interface")
  (description
   "This extension provides a lightweight and relatively easy to use
interface to Trolltech's Qt GUI toolkit.")
  (license license:bsd-3))
--8<---cut here---end--->8---

trying to install this pacakge, I receive following error:

--8<---cut here---start->8---
phase `unpack' succeeded after 0.0 seconds
starting phase `patch-usr-bin-file'
phase `patch-usr-bin-file' succeeded after 0.0 seconds
starting phase `patch-source-shebangs'
patch-shebang: ./qt-light/chicken-compile-qt-extension.scm: changing `/bin/sh' 
to `/gnu/store/pwcp239kjf7lnj5i4lkdzcfcxwcfyk72-bash-minimal-5.0.16/bin/sh'
phase `patch-source-shebangs' succeeded after 0.0 seconds
starting phase `setup-environment'
phase `setup-environment' succeeded after 0.0 seconds
starting phase `build'

Error: extension not cached
command "chicken-install" "-cached" "-no-install" "qt-light" failed with status 
70
--8<---cut here---end--->8---

could anyone help me about this issue? 


[1]: https://wiki.call-cc.org/eggref/5/qt-light

-- 
Reza Alizadeh Majd
PantherX Team
https://www.pantherx.org/