Re: Grub installation and configuration

2023-03-07 Thread Felix Lechner via
Hi Vagrant,

On Tue, Mar 7, 2023 at 2:52 PM Vagrant Cascadian  wrote:
>
> Kind of related, with EFI you could actually install additional system
> generations as entirely separate EFI boot entries
> (e.g. /boot/efi/efi/guix-N and /boot/efi/efi/guix-N+1) in case the most
> recent grub was broken for some reason.

Great timing! I had the same thought today for unrelated reasons. (I
saw embedded equipment that daisy-chained Grub from U-Boot.) Would we
then ship rEFInd with all installations or just rely on the general
EFI variables mechanism to facilitate the selection of the desired
Grub version by the user?

Kind regards,
Felix Lechner



Re: Help-Guix Digest, Vol 88, Issue 4

2023-03-07 Thread 宋文武
Gottfried  writes:

> Hi,

Hello!

> 1.
>> GUIX_PROFILE="~/guix-profiles/emacs/emacs"
>>> . "$GUIX_PROFILE"/etc/profile
>
> As unexperienced in Scheme I am asking
>  if the second line beginning with the "dot" is separated for easier
>  read, but everything is one command?

Those 2 line are bash commands,
  GUIX_PROFILE="~/guix-profiles/emacs/emacs" will set a shell variable
  GUIX_PROFILE with a value of "$HOME/guix-profiles/emacs/emacs".

  . "$GUIX_PROFILE"/etc/profile will 'source' the /etc/profile in the
  $GUIX_PROFILE directory.

You can find them in 'info bash' at: "5 Shell Variables" and "4.1 Bash Shell 
Builtins".

>
> 2.
> I have got already many packages in my profile and
> updating takes a long time.
>
> So I am thinking of splitting of some packages to create several
> profiles and AFAIU updating with
> sudo guix system reconfigure /etc/config.scm
> it will take less time because it will not automatically update all my
> profiles at once. (Is this right?)

Yes, the system profile (via config.scm) and user profile already do a
split, and you can split the user profile into multiple profiles for
more control.

See 'info guix-cookbook' for "Guix Profiles in Practice".

>
> 3.
> I was creating a profile with "Musescore"
> and a profile with "Emacs".
> I want to create still other profiles.

No problem.
>
> 4.
> Now I still don’t understand everything concerning profiles.
> If I enable all profiles at login time
> how will it work?
Enable a profile mean source ('.' command in your first question) its
profile file to add its search-paths to the current shell environment:

  PATH for making binaries from profiles's bin directory available to the
  current shell.
  MANPATH for making manpages from profile's share/man dinectory
  available to the current shell's 'man' command.
  XDG_DATA_DIRS for making desktop applicatinons available to the
  current desktop environment (launcher, etc).
  And so on...

> How can I enter the different profiles?
If you enable all at login time (via ~/.bash_profile), there is no need
to switch.  If you didn't enable a profile, you can switch it with 'guix
shell -p' or '.' its profile.


> How do I know in which profile I am and to switch to an other?
You can run 'env' find out what profiles are activated now.

>
> e.g. I have emacs installed in my main profile.
> I have got a manifest with emacs with additional emacs packages.
> When entering this separate profile with guix shell
> I get to  guix shell (env)...
> but when I entered:  "emacs"
> it opened emacs with the package "Icicles" which I don’t have in my
> emacs manifest, only in my emacs in the main profile.
> So I concluded, it is the emacs in my main profile and not the one in
> my emacs manifest profile.
> How are both connected? Are they separated?
Run 'which emacs' return the emacs executable location, it maybe the one
in your main profile or the emacs profile.  There are some environment
variables / search-paths (EMACSLOADPATH) for emacs, emacs will load its
packages from this EMACSLOADPATH.  When combine profiles via source
('.') the search-paths are merged (see 'export' in the 'profile' bash
script),  so they're connected via those search-paths.

They can also be separated if you don't combine those search-paths.
eg: via 'guix shell --pure -p ...'


> But this emacs manifest doesn’t have a init.el file etc.
Emacs's init.el are at ~/.emacs.d/init.el (or ~/.emacs), it's out of
guix's control, so shared with every emacs.

> May be profiles are not completely separated in Guix like I understood
> until now.
Well, you can combine them (by default the system profile and user
profile are combined), or use them in a separated way.


Basic are shell, environment variables, and the effects of environment
variables.  Hope this helps!





Re: Grub installation and configuration

2023-03-07 Thread Vagrant Cascadian
On 2023-03-07, Ludovic Courtès wrote:
> Emmanuel Beffara  skribis:
>
>> - Install the keymaps in the EFI partition like the Grub modules, so that the
>>   proper keymap is setup early in the boot process.
>
> [...]
>
>> - Set the terminal_output before any user input is required (and in 
>> particular
>>   the passphrase request), for proper interaction.
>
> [...]
>
>> - Offer the option to put kernels and initrds in the EFI partition (and also
>>   any resource needed by Grub like the background picture, locales etc), so
>>   that Grub can be fully functional without decrypting. Apart from solving 
>> the
>>   issue of having to enter the passphrase twice and with different keymaps,
>>   this would also allow having Guix System in an encrypted partition while
>>   allowing to boot other systems without requiring its passphrase.
>>
>> I would love to propose patches for that but I am too much of a beginner with
>> Guix to be able to do that right now…
>
> All good points!
>
> Maybe what you can do, then, is report each issue to bug-g...@gnu.org
> separately and provide guidance for the GRUB side of things: what should
> the generated ‘grub.cfg’ look like after each of these points is
> addressed?
>
> In return, an experienced Guix person can provide guidance on the Guix
> side of things so we converge towards an actual patch set.

Kind of related, with EFI you could actually install additional system
generations as entirely separate EFI boot entries
(e.g. /boot/efi/efi/guix-N and /boot/efi/efi/guix-N+1) in case the most
recent grub was broken for some reason.

Space for EFI variables will eventually run out if you have too many of
these, but would at least allow reverting to the last two or three or
maybe more generations of grub and their corresponding configurations.

This might be a violation of EFI specs, as I think you are supposed to
use the vendor name as the directory name, but technically ought to work
just fine.


Someone, who is whistling innocently right now, recently had a few too
many misadventures with EFI, but maybe some good can come of it. :)


live well,
  vagrant


signature.asc
Description: PGP signature


Online accounts in evolution

2023-03-07 Thread Christophe Pisteur
Hi,

I did a fresh install of Guix system 1.4, installed the evolution
package and then imported an evolution-backup archive made on a
previous guix system, which I did in the past several times
successfully, but this time the online accounts (Nextcloud: calendar,
address book) were not taken into evolution account (nor Calendar),
although I defined my Nextcloud account in gnome-settings.

I then checked if the evolution-data-server and gnome-online-accounts
packages were installed, which they apparently were not, and installed
them, but the result is the same: online accounts are not taken into
evolution account. 

Do you have any suggestions?

Thanks,

Christophe


Re: streamlining custom package development

2023-03-07 Thread Simon Tournier
Hi,

On Tue, 07 Mar 2023 at 16:57, Przemysław Kamiński  wrote:

> Starting download of /tmp/guix-file.TykbjO
>  From 
> https://hackage.haskell.org/package/servant-examples/servant-examples-0.1.0.0.tar.gz...
> download failed 
> "https://hackage.haskell.org/package/servant-examples/servant-examples-0.1.0.0.tar.gz;
>  
> 404 "Not Found"

>From , I read,

0.4.2, 0.4.3, 0.4.3.1, 0.4.4, 0.4.4.2, 0.4.4.3, 0.4.4.4, 0.4.4.5, 0.4.4.6, 
0.4.4.7

and 0.1.0.0 is not listed.  For instance, just tweak the Cabal file,

--8<---cut here---start->8---
$ git diff
diff --git a/servant-examples.cabal b/servant-examples.cabal
index f31e2a4..8861cf2 100644
--- a/servant-examples.cabal
+++ b/servant-examples.cabal
@@ -1,5 +1,5 @@
 name:servant-examples
-version: 0.1.0.0
+version: 0.4.2
 -- synopsis:
 -- description:
 homepage:https://github.com/githubuser/servant-examples#readme
--8<---cut here---end--->8---

then Guix finds it in the Hackage infrastructure.

--8<---cut here---start->8---
$ cat servant-examples.cabal | guix import hackage -s -r 

Starting download of /tmp/guix-file.yrblu1
>From 
>https://hackage.haskell.org/package/servant-examples/servant-examples-0.4.2.tar.gz...
 …es-0.4.2.tar.gz  1.7MiB/s 00:00 | 7KiB transferred
Syntax error: unexpected end of input
Syntax error: unexpected end of input
Syntax error: unexpected end of input
Syntax error: unexpected end of input
(define-public ghc-servant-examples
  (package
(name "ghc-servant-examples")
(version "0.4.2")
(source (origin
  (method url-fetch)
  (uri (hackage-uri "servant-examples" version))
  (sha256
   (base32
"1nmgzkn0nv3p0bzr5ny0yx0g45fzf5qx7s868jp1nq7wbfd3yc0i"
(build-system haskell-build-system)
(inputs (list ghc-servant
  ghc-servant-server
  ghc-servant-swagger
  ghc-swagger2
  ghc-wai
  ghc-aeson
  ghc-warp))
(home-page "https://github.com/githubuser/servant-examples#readme;)
(synopsis "")
(description "")
(license license:bsd-3)))
--8<---cut here---end--->8---


> My guess the "Syntax error" is from the missing "ghc-servant-swagger" 
> package.

Hum, I guess is that it comes from the option ’-s’.  For instance,

guix import hackage servant-examples -r

does not display it.  However, I do not find what is the code that
display “Syntax error”.  Maybe a bug here, indeed.



Cheers,
simon



Re: Guix can't find substitutes, even though guix weather claims they exist

2023-03-07 Thread Timo Wilken
Hi,

I've just run into this problem again... I ran guix pull, then guix
home reconfigure two minutes ago. This time aerc and hledger are
rebuilt from scratch, even though guix weather claims substitutes
exist for both (both on bordeaux; only aerc on ci.guix.gnu.org).

--8<---cut here---start->8---
$ guix home reconfigure ~/src/guix-decls/tw/home/lap.scm  
guix home: warning: duplicate definition for `_JAVA_OPTIONS' environment 
variable 
substitute: updating substitutes from 'https://substitutes.nonguix.org'... 
100.0%
substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100.0%
46.8 MB will be downloaded
 guix-1.4.0-4.01fd830  44.6MiB1003KiB/s 00:46 [###] 100.0%
substitute: updating substitutes from 'https://substitutes.nonguix.org'... 
100.0%
substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100.0%
substitute: updating substitutes from 'https://bordeaux.guix.gnu.org'... 100.0%
The following derivations will be built:
  /gnu/store/rncvsdiix28bmg7hlhlh94fbgdqggcb5-aerc-0.14.0.drv
  
/gnu/store/y40xbjqr39frkaryc2d62lfvd044nd8h-go-github-com-zenhack-go-notmuch-0.0.0-20211022191430-4d57e8ad2a8b.drv
  /gnu/store/ag2byrfpvyc8fvvgxig6xjs7zydschbp-hledger-1.27.1.drv
  /gnu/store/yykmpic61mhx2kz9bbx74fw2axj7jil4-ghc-githash-0.1.6.3.drv

4.0 MB will be downloaded
 [substitute downloads omitted]
building /gnu/store/yykmpic61mhx2kz9bbx74fw2axj7jil4-ghc-githash-0.1.6.3.drv...
applying 6 grafts for notmuch-0.37 ...
building /gnu/store/ag2byrfpvyc8fvvgxig6xjs7zydschbp-hledger-1.27.1.drv...
building 
/gnu/store/y40xbjqr39frkaryc2d62lfvd044nd8h-go-github-com-zenhack-go-notmuch-0.0.0-20211022191430-4d57e8ad2a8b.drv...
building /gnu/store/rncvsdiix28bmg7hlhlh94fbgdqggcb5-aerc-0.14.0.drv...

$ guix weather aerc 
computing 1 package derivations for x86_64-linux...
looking for 1 store items on https://ci.guix.gnu.org...
https://ci.guix.gnu.org ☀
  100.0% substitutes available (1 out of 1)
  at least 9.3 MiB of nars (compressed)
  14.4 MiB on disk (uncompressed)
  0.226 seconds per request (0.2 seconds in total)
  4.4 requests per second

  at least 1,000 queued builds
  aarch64-linux: 225 (22.5%)
  x86_64-linux: 644 (64.4%)
  powerpc64le-linux: 49 (4.9%)
  i686-linux: 82 (8.2%)
  build rate: 39.66 builds per hour
  x86_64-linux: 10.55 builds per hour
  powerpc64le-linux: 14.13 builds per hour
  i686-linux: 11.62 builds per hour
  aarch64-linux: 4.14 builds per hour
  armhf-linux: 0.06 builds per hour
looking for 1 store items on https://bordeaux.guix.gnu.org...
https://bordeaux.guix.gnu.org ☀
  100.0% substitutes available (1 out of 1)
  4.4 MiB of nars (compressed)
  14.4 MiB on disk (uncompressed)
  0.213 seconds per request (0.2 seconds in total)
  4.7 requests per second
  (continuous integration information unavailable)

$ guix weather hledger
computing 1 package derivations for x86_64-linux...
looking for 1 store items on https://ci.guix.gnu.org...
https://ci.guix.gnu.org ⛈
  0.0% substitutes available (0 out of 1)
  unknown substitute sizes
  0.0 MiB on disk (uncompressed)
  0.244 seconds per request (0.2 seconds in total)
  4.1 requests per second

  100.0% (1 out of 1) of the missing items are queued
  at least 1,000 queued builds
  aarch64-linux: 225 (22.5%)
  x86_64-linux: 644 (64.4%)
  powerpc64le-linux: 49 (4.9%)
  i686-linux: 82 (8.2%)
  build rate: 39.65 builds per hour
  x86_64-linux: 10.55 builds per hour
  powerpc64le-linux: 14.12 builds per hour
  i686-linux: 11.62 builds per hour
  aarch64-linux: 4.14 builds per hour
  armhf-linux: 0.06 builds per hour
looking for 1 store items on https://bordeaux.guix.gnu.org...
https://bordeaux.guix.gnu.org ☀
  100.0% substitutes available (1 out of 1)
  2.3 MiB of nars (compressed)
  13.4 MiB on disk (uncompressed)
  0.215 seconds per request (0.2 seconds in total)
  4.7 requests per second
  (continuous integration information unavailable)

$ guix describe 
   
Generation 74   Mar 07 2023 20:26:56(current)
  [two non-free channels omitted]
  guix 42b2766
repository URL: https://git.savannah.gnu.org/git/guix.git
branch: master
commit: 42b2766e3af756e17f7b1dee880a8148f4c7f4f1

GUIX_PACKAGE_PATH="/home/timo/src/guix-decls"
--8<---cut hereend-->8---

Cheers,
Timo



Re: Wrong type argument: package-input-rewriting/spec with inferior

2023-03-07 Thread Greg Hogan
On Tue, Mar 7, 2023 at 10:56 AM Ludovic Courtès  wrote:
>
> But then again, I wonder why you end up rebuilding glibc.  For example,
> this would only rebuild LLVM and everything above:
>
> --8<---cut here---start->8---
> $ guix build clang --with-c-toolchain=llvm=gcc-toolchain@12 -n
> substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100.0%
> substitute: updating substitutes from 'https://bordeaux.guix.gnu.org'... 
> 100.0%
> substitute: updating substitutes from 'https://guix.bordeaux.inria.fr'... 
> 100.0%
> The following derivations would be built:
>   /gnu/store/hrpn8c11x52b9yax44x0spya90q6c3z0-clang-15.0.7.drv
>   /gnu/store/f95nrszbdj72wbb22irvq230nm6ci07h-clang-runtime-15.0.7.drv
>   /gnu/store/kxbjlkv9yjyg149aj6zc0w0sdgpdwhzn-llvm-15.0.7.drv
> 109.4 MB would be downloaded:
>   /gnu/store/66sfk0k8419xvl7kg7r631z9yf9cpy3f-llvm-project-15.0.7-checkout
>   
> /gnu/store/i291yk8ka6hamma955zgr2jh6cn21ybf-clang-tools-extra-15.0.7.src.tar.xz
>   /gnu/store/gm15qsiiy3jz3ainp6nv082m7lh9nx4p-rhash-1.4.2
>   /gnu/store/j65q3aw414010gdfvmsynwpzfb2jyyd3-cmake-minimal-3.21.4
>   /gnu/store/1yq0yi6hjbfhw578c4973454iwxc248n-module-import-compiled
> --8<---cut here---end--->8---

That build fails for me, and looks to be the same error as from last
year [0][1] (not sure why the mail server threads are not updated
across months).

[0] https://lists.gnu.org/archive/html/guix-devel/2022-02/msg00359.html
[1] https://lists.gnu.org/archive/html/guix-devel/2022-03/msg00043.html

--8<---cut here---start->8---
$ guix describe
Generation 4 Mar 06 2023 17:59:09 (current)
  guix a0d22c4
repository URL: https://git.savannah.gnu.org/git/guix.git
branch: master
commit: a0d22c41989e529859c813fb64a78250bde76991

$ guix build clang --with-c-toolchain=llvm=gcc-toolchain@12 --verbosity=1
The following derivations will be built:
  /gnu/store/gwj14wybh4q4x8lpdy8cr57sp3v4x1nd-clang-15.0.7.drv
  /gnu/store/4f7cwjhfwnkqbmxmfpi7z3gvag9axidl-clang-runtime-15.0.7.drv
  /gnu/store/fl1m72g5zw1scrmvrhq0yrm44z70ia59-llvm-15.0.7.drv

building /gnu/store/fl1m72g5zw1scrmvrhq0yrm44z70ia59-llvm-15.0.7.drv...
building /gnu/store/4f7cwjhfwnkqbmxmfpi7z3gvag9axidl-clang-runtime-15.0.7.drv...
building /gnu/store/gwj14wybh4q4x8lpdy8cr57sp3v4x1nd-clang-15.0.7.drv...
\builder for `/gnu/store/gwj14wybh4q4x8lpdy8cr57sp3v4x1nd-clang-15.0.7.drv'
failed with exit code 1
build of /gnu/store/gwj14wybh4q4x8lpdy8cr57sp3v4x1nd-clang-15.0.7.drv failed
View build log at
'/var/log/guix/drvs/gw/j14wybh4q4x8lpdy8cr57sp3v4x1nd-clang-15.0.7.drv.gz'.
guix build: error: build of
`/gnu/store/gwj14wybh4q4x8lpdy8cr57sp3v4x1nd-clang-15.0.7.drv' failed

$ zcat /var/log/guix/drvs/gw/j14wybh4q4x8lpdy8cr57sp3v4x1nd-clang-15.0.7.drv.gz
Backtrace:
  14 (primitive-load "/gnu/store/vshmhk54i0jgg6xbglbiklw2d1c?")
In ice-9/eval.scm:
   214:21 13 (_ #f)
   217:50 12 (lp (# ?))
   217:50 11 (lp (# ?))
   217:50 10 (lp (# ?))
   217:50  9 (lp (# ?))
   217:50  8 (lp (# ?))
   217:50  7 (lp (# ?))
   217:50  6 (lp (# ?))
   217:50  5 (lp (# ?))
   217:50  4 (lp (# ?))
   217:50  3 (lp (# ?))
   217:33  2 (lp (# ?))
   213:45  1 (_ #f)
In unknown file:
   0 (string-append "-DC_INCLUDE_DIRS=" #f "/include")

ERROR: In procedure string-append:
In procedure string-append: Wrong type (expecting string): #f
--8<---cut here---end--->8---



Re: Grub installation and configuration

2023-03-07 Thread Emmanuel Beffara
De Ludovic Courtès le 07/03/2023 à 17:12:
> Maybe what you can do, then, is report each issue to bug-g...@gnu.org
> separately and provide guidance for the GRUB side of things: what should
> the generated ‘grub.cfg’ look like after each of these points is
> addressed?
> 
> In return, an experienced Guix person can provide guidance on the Guix
> side of things so we converge towards an actual patch set.
> 
> Deal?  :-)

All right! I'm by no means a Grub expert, but I will do my best…

-- 
Emmanuel



Re: streamlining custom package development

2023-03-07 Thread Przemysław Kamiński

As for an example. Clone this repository

https://github.com/sras/servant-examples

Then cd into it and run

cat servant-examples.cabal | guix import hackage -s -r

The '-s' option reads from stdin, the '-r' option imports everything 
recursively.


It throws this output:

Starting download of /tmp/guix-file.TykbjO
From 
https://hackage.haskell.org/package/servant-examples/servant-examples-0.1.0.0.tar.gz...
download failed 
"https://hackage.haskell.org/package/servant-examples/servant-examples-0.1.0.0.tar.gz; 
404 "Not Found"


Starting download of /tmp/guix-file.TykbjO
From 
https://web.archive.org/web/20230307175126/https://hackage.haskell.org/package/servant-examples/servant-examples-0.1.0.0.tar.gz...
download failed 
"https://web.archive.org/web/20230307175126/https://hackage.haskell.org/package/servant-examples/servant-examples-0.1.0.0.tar.gz; 
404 "NOT FOUND"

Trying to use Disarchive to assemble /tmp/guix-file.TykbjO...
could not find its Disarchive specification
failed to download "/tmp/guix-file.TykbjO" from 
"https://hackage.haskell.org/package/servant-examples/servant-examples-0.1.0.0.tar.gz;

Syntax error: unexpected end of input
Syntax error: unexpected end of input
(define-public ghc-servant-examples
  (package
(name "ghc-servant-examples")
(version "0.1.0.0")
(source (origin
  (method url-fetch)
  (uri (hackage-uri "servant-examples" version))
  (sha256
   (base32
"failed to download tar archive"
(build-system haskell-build-system)
(properties '((upstream-name . "servant-examples")))
(inputs (list ghc-servant
  ghc-servant-server
  ghc-servant-swagger
  ghc-swagger2
  ghc-wai
  ghc-aeson
  ghc-warp))
(home-page "https://github.com/githubuser/servant-examples#readme;)
(synopsis "")
(description "")
(license license:bsd-3)))


My guess the "Syntax error" is from the missing "ghc-servant-swagger" 
package.


Also, the source should be changed to (local-file "./" #:recursive? #t) 
but I guess the stdin option can't guess that. I guess one should add an 
'-f' option to read the .cabal file.


Anyways, it seems the "-r" option doesn't work here. I was expecting 
"ghc-servant-swagger" to be defined as well.


P.

On 7.03.2023 17:02, Ludovic Courtès wrote:

Hi,

Przemysław Kamiński  skribis:


3. I run `guix build -L  -m manifest.scm
(manifest only contains a reference to ghc-stuff.scm)
4. I get an error which looks like this:
View build log at
'/var/log/guix/drvs/j2/wa3vw49l78m85z74x91sklqxwhx87y-ghc-hwodr-0.1.0.drv.bz2'

so I fire up

bunzip --stdout
'/var/log/guix/drvs/j2/wa3vw49l78m85z74x91sklqxwhx87y-ghc-hwodr-0.1.0.drv.bz2'

and see that I am missing some Haskell packages.


Note that the build log should be just above the “View build log” line
if you scroll up a little bit.  :-)

Otherwise, like Simon said, I’d recommend getting package definitions by
running ‘guix import hackage -r’, assuming said packages are on Hackage.
That should simplify things.

HTH,
Ludo’.


OpenPGP_0xF39440D7C4D6E158.asc
Description: OpenPGP public key


OpenPGP_signature
Description: OpenPGP digital signature


publickey - cgenie@pm.me - 9cc42b0a.asc
Description: application/pgp-keys


signature.asc
Description: OpenPGP digital signature


Re: Help-Guix Digest, Vol 88, Issue 4

2023-03-07 Thread Gottfried

Hi,

1.

GUIX_PROFILE="~/guix-profiles/emacs/emacs"

. "$GUIX_PROFILE"/etc/profile


As unexperienced in Scheme I am asking
 if the second line beginning with the "dot" is separated for easier 
read, but everything is one command?


2.
I have got already many packages in my profile and
updating takes a long time.

So I am thinking of splitting of some packages to create several 
profiles and AFAIU updating with

sudo guix system reconfigure /etc/config.scm
it will take less time because it will not automatically update all my 
profiles at once. (Is this right?)


3.
I was creating a profile with "Musescore"
and a profile with "Emacs".
I want to create still other profiles.

4.
Now I still don’t understand everything concerning profiles.
If I enable all profiles at login time
how will it work?
How can I enter the different profiles?
How do I know in which profile I am and to switch to an other?

e.g. I have emacs installed in my main profile.
I have got a manifest with emacs with additional emacs packages.
When entering this separate profile with guix shell
I get to  guix shell (env)...
but when I entered:  "emacs"
it opened emacs with the package "Icicles" which I don’t have in my 
emacs manifest, only in my emacs in the main profile.
So I concluded, it is the emacs in my main profile and not the one in my 
emacs manifest profile.
How are both connected? Are they separated? (I understood it like this, 
because it is a different profile). But this emacs manifest doesn’t have 
a init.el file etc.
May be profiles are not completely separated in Guix like I understood 
until now.


My aim was to have a separate emacs profile then I can delete the emacs 
in my main profile. But If the separate Emacs profile uses the init.el 
file etc. from the emacs in my main profile, I can’t delete this emacs.

So how are both connected?

I wanted to create several profiles with certain packages
and then delete/uninstall those packages in my main profile to get less 
packages.
But I don’t know if this works, because it’s unclear to me how they are 
connected.


I hope you understand me
( I can’t describe my problems in terms of a developer’s language)

Kind regards,

Gottfried



Am 06.03.23 um 02:35 schrieb Gary Johnson:

Gottfried  writes:


thank you very much for sharing your Emacs manifest.

I tried to do what you said.

I created a manifest for Emacs only.

After doing it, Guix asked me to set the PATH.

I did it and after that this Emacs Manifest changed my general profile.
It became my general profile.
I couldn’t use my other programmes any more.
So I had to do a rollback.

1. I don’t know what I did wrong.


You didn't do anything wrong. The command I provided will create the
next generation of your profile from the manifest file. Any packages not
included in the manifest will be missing from that generation. It sounds
like that's what happened in this case. If you want other packages
installed into your profile as well, you could add them to your manifest
file.


2. AFAIK to create a manifest is not yet a profile.
I have to create a manifest and then to create a profile with it.
Am I right?


Correct. A manifest is a file of Scheme code that lists the packages
which you would like to install into a profile (or environment).

(Well, technically the manifest is the Scheme object produced by that
code, but in practice we can think of the file as the manifest with
little loss of information.)

You can create a temporary environment which contains the packages in a
manifest with this command:

```
guix shell -m manifest.scm
```

To make this environment persistent, you have to create a profile like
so:

```
guix package -m manifest.scm
```


2. If so, after creating a manifest, which commands do I have to use to
make it a separate profile?

Probably to generate a manifest and make it a separate profile goes
together, but I don’t know how to do it.


Note that `guix package` will create a new profile generation in your
user profile by default. To override this, you can specify a different
profile that you want the generation added to instead:

```
guix package -m manifest.scm -p $YOUR_NEW_PROFILE_DIR
```

One of the perhaps slightly odd things to remember with this command is
that $YOUR_NEW_PROFILE_DIR should repeat its final directory name twice.

Here's an example for creating a new emacs profile. In this setup, we
assume that you have the following directory structure in your home
directory:

~/
├── guix-manifests/
│   ├── emacs.scm
├── guix-profiles/
│   ├── emacs/

You would issue the following command to install a new profile
generation under the ~/guix-profiles/emacs/ directory, containing all
the packages defined in ~/guix-manifests/emacs.scm:

```
guix package -m ~/guix-manifests/emacs.scm -p ~/guix-profiles/emacs/emacs
```

To activate this profile (thereby making its contents available in your
shell environment), you would issue these commands:

```
GUIX_PROFILE="~/guix-profiles/emacs/emacs"
. 

Re: Grub installation and configuration

2023-03-07 Thread Ludovic Courtès
Hi Emmanuel,

Emmanuel Beffara  skribis:

> - Install the keymaps in the EFI partition like the Grub modules, so that the
>   proper keymap is setup early in the boot process.

[...]

> - Set the terminal_output before any user input is required (and in particular
>   the passphrase request), for proper interaction.

[...]

> - Offer the option to put kernels and initrds in the EFI partition (and also
>   any resource needed by Grub like the background picture, locales etc), so
>   that Grub can be fully functional without decrypting. Apart from solving the
>   issue of having to enter the passphrase twice and with different keymaps,
>   this would also allow having Guix System in an encrypted partition while
>   allowing to boot other systems without requiring its passphrase.
>
> I would love to propose patches for that but I am too much of a beginner with
> Guix to be able to do that right now…

All good points!

Maybe what you can do, then, is report each issue to bug-g...@gnu.org
separately and provide guidance for the GRUB side of things: what should
the generated ‘grub.cfg’ look like after each of these points is
addressed?

In return, an experienced Guix person can provide guidance on the Guix
side of things so we converge towards an actual patch set.

Deal?  :-)

Ludo’.



Re: %current-system and --system

2023-03-07 Thread Ludovic Courtès
Hi,

Greg Hogan  skribis:

> From my x86_64 machine I am executing offload builds targeting an
> aarch64 machine:
>
> $ guix build --system=aarch64-linux --manifest=manifest.scm
>
> Several packages do not build for aarch64 and need to be filtered out.
> %current-target-system is #f as these are offload builds not cross
> compilation, and %current-system is reported as "x86_64-linux". How
> can I access the current "build system"?

Not via ‘%current-system’ because at the time the manifest is evaluated,
it can be bound to anything, as you saw.

What you could do is wrap packages in ‘let-system’, which lets you check
the “current system” as the time the object is “lowered” (untested):

  (define (package-or-emptiness p)
(let-system system
  (if (supported-package? p system)
  p
  (plain-file "emptyness" "Nothing to see here."

   (manifest
(map (lambda (p)
   (manifest-entry
 (inherit (package->manifest-entry p))
 (item (package-or-emptiness p
 the-packages))

Obviously that’s not great because you still end up with entries for
non-existing packages.  It’s good enough for ‘guix build -m’ though.

HTH!

Ludo’.



Re: streamlining custom package development

2023-03-07 Thread Ludovic Courtès
Hi,

Przemysław Kamiński  skribis:

> 3. I run `guix build -L  -m manifest.scm
> (manifest only contains a reference to ghc-stuff.scm)
> 4. I get an error which looks like this:
> View build log at
> '/var/log/guix/drvs/j2/wa3vw49l78m85z74x91sklqxwhx87y-ghc-hwodr-0.1.0.drv.bz2'
>
> so I fire up
>
> bunzip --stdout
> '/var/log/guix/drvs/j2/wa3vw49l78m85z74x91sklqxwhx87y-ghc-hwodr-0.1.0.drv.bz2'
>
> and see that I am missing some Haskell packages.

Note that the build log should be just above the “View build log” line
if you scroll up a little bit.  :-)

Otherwise, like Simon said, I’d recommend getting package definitions by
running ‘guix import hackage -r’, assuming said packages are on Hackage.
That should simplify things.

HTH,
Ludo’.



Re: Wrong type argument: package-input-rewriting/spec with inferior

2023-03-07 Thread Ludovic Courtès
Hi Greg,

Greg Hogan  skribis:

> Having failed a year ago to build the latest gcc and latest clang
> together using "with-c-toolchain",

Is there a bug report on this?  I’m curious what might be wrong;
‘with-c-toolchain’ should be the tool of choice for this use case.

[...]

> On master I modify the manifest to create an inferior for glibc@2.35
> from core-updates, but receive the following error when attempting to
> use the inferior as a package. A similar question went unanswered on
> StackOverflow last year
> (https://unix.stackexchange.com/questions/699148/how-to-use-an-inferior-when-input-rewriting-in-guix).

[...]

> ice-9/boot-9.scm:1685:16: In procedure raise-exception:
> In procedure package-properties: Wrong type argument:
> #

As you found, package input rewriting doesn’t work with inferior
packages.

However it’s a case where it may be easier to provide a glibc@2.35
package on ‘master’ and to use that.

But then again, I wonder why you end up rebuilding glibc.  For example,
this would only rebuild LLVM and everything above:

--8<---cut here---start->8---
$ guix build clang --with-c-toolchain=llvm=gcc-toolchain@12 -n
substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100.0%
substitute: updating substitutes from 'https://bordeaux.guix.gnu.org'... 100.0%
substitute: updating substitutes from 'https://guix.bordeaux.inria.fr'... 100.0%
The following derivations would be built:
  /gnu/store/hrpn8c11x52b9yax44x0spya90q6c3z0-clang-15.0.7.drv
  /gnu/store/f95nrszbdj72wbb22irvq230nm6ci07h-clang-runtime-15.0.7.drv
  /gnu/store/kxbjlkv9yjyg149aj6zc0w0sdgpdwhzn-llvm-15.0.7.drv
109.4 MB would be downloaded:
  /gnu/store/66sfk0k8419xvl7kg7r631z9yf9cpy3f-llvm-project-15.0.7-checkout
  
/gnu/store/i291yk8ka6hamma955zgr2jh6cn21ybf-clang-tools-extra-15.0.7.src.tar.xz
  /gnu/store/gm15qsiiy3jz3ainp6nv082m7lh9nx4p-rhash-1.4.2
  /gnu/store/j65q3aw414010gdfvmsynwpzfb2jyyd3-cmake-minimal-3.21.4
  /gnu/store/1yq0yi6hjbfhw578c4973454iwxc248n-module-import-compiled
--8<---cut here---end--->8---

Maybe I’m overlooking something though.

HTH,
Ludo’.



Re: streamlining custom package development

2023-03-07 Thread Simon Tournier
Hi,

On Fri, 03 Mar 2023 at 10:44, Przemysław Kamiński  wrote:

> This is tedious. Is there a way to automate this a bit more?

Nothing I am aware of.  Because Guix relies on some LTS, there is no
easy way, to my knowledge, to achieve what you would like.  Somehow you
have to package by yourself and manually your package “ghc-stuff”. :-)


> cat /stuff.cabal | guix import hackage -s -r
>
> but it complains with
>
> failed to download "/run/user/1000/guix-file.0hKo9A" from 
> "https://hackage.haskell.org/package/stuff/stuff-0.1.0.0.tar.gz;

That’s expected.  Well, IIUC, you are interested only in the
dependencies and not the package itself.  Maybe it misses an option to
“guix import hackage” for excluding the direct package of the Cabal
file.


> then throws a bunch of "Syntax error: unexpected end of input" and then 
> spits out the manifest, but only for my  code so some packages 
> are still missing and I need to add them manually.

It is hard to tell more without more specific details. :-)

Maybe could you share some more details?



Cheers,
simon



Re: Newbie user: Feedback on custom package definition

2023-03-07 Thread Simon Tournier
Hi,

On Thu, 02 Mar 2023 at 19:57, "("  wrote:
> On Thu Mar 2, 2023 at 6:54 PM GMT, Vagrant Cascadian wrote:
>> I often wonder if the name "trivial-build-system" should not be
>> something more like:
>>
>>   diy-get-your-hands-messy-with-a-lot-of-effort-build-system
>
> Maybe PRIMITIVE-BUILD-SYSTEM?

Well, I am not convinced that we should change the name.  It is there
since some many years. :-)

However, we could improve the manual.  For instance, it reads [1] «A
notable exception is the “bare-bones” trivial-build-system (see Build
Systems).»

Then under “Build System“ section [2], this “bare-bones” could be more
explicit.  For example, extend a bit its documentation [3].

Well, it will mitigate a bit the common “trap” about the most
non trivial build system. :-)

1: 
2: 
3: 



Cheers,
simon




Re: %current-system and --system

2023-03-07 Thread Efraim Flashner
On Fri, Mar 03, 2023 at 10:37:44AM -0500, Greg Hogan wrote:
> Hi Guix,
> 
> From my x86_64 machine I am executing offload builds targeting an
> aarch64 machine:
> 
> $ guix build --system=aarch64-linux --manifest=manifest.scm
> 
> Several packages do not build for aarch64 and need to be filtered out.
> %current-target-system is #f as these are offload builds not cross
> compilation, and %current-system is reported as "x86_64-linux". How
> can I access the current "build system"?
> 
> If it helps, the manifest is defined at
> https://github.com/greghogan/guix-manifest
> 
> Thanks,
> Greg

Here's a (reduced) snippet I have from my home-config (and previously in
my manifest file):

(define %my-package-list
  (list "git"
"git:send-email"
"git-annex")

(define package-list
  (map (compose list specification->package+output)
   (filter (lambda (pkg)
 (member (or (%current-system)
 (%current-target-system))
 (package-transitive-supported-systems
   (specification->package+output pkg
  %my-package-list)))

(%current-target-system) doesn't currently work with guix-home but I
figured I'd have it ready. package-transitive-supported-systems makes it
so that git-annex, which shows as supported on aarch64-linux, isn't
added because ghc, one of its dependencies, isn't supported on
aarch64-linux.


-- 
Efraim Flashner  אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted


signature.asc
Description: PGP signature