Re: Release progress, week 8

2022-12-02 Thread Vagrant Cascadian
On 2022-12-02, Ludovic Courtès wrote:
> Release progress: week 8.
>
> Apologies for not sending this one on time this Thursday; instead we got
> RC1, which is nice.  :-)
>
>   https://lists.gnu.org/archive/html/guix-devel/2022-12/msg0.html

Yay, love not having to build the source tarball to test it! :)


> The RC was made from ‘version-1.4.0’ branch, which only takes important
> fixes now (if in doubt, please ask).

Must not fix trivial known guix lint typo fixes, check! :)


With more seriousness... here come the test suite failures!

When building on Debian there are a number of tests that fail with the
same symptoms, notably something wrong with how "scm_to_utf8_stringn" is
called:

  test-name: find-packages-by-name with cache
  location: /build/guix-HqZNpM/guix-1.4.0~rc1/tests/packages.scm:1760
  source:
  + (test-equal
  +   "find-packages-by-name with cache"
  +   (find-packages-by-name "guile")
  +   (call-with-temporary-directory
  + (lambda (cache)
  +   (generate-package-cache cache)
  +   (mock ((guix describe) current-profile (const cache))
  + (mock ((gnu packages)
  +cache-is-authoritative?
  +(const #t))
  +   (find-packages-by-name "guile"))
  expected-value: (# 
# # # # #)
  actual-value: #f
  actual-error:
  + (wrong-type-arg
  +   "scm_to_utf8_stringn"
  +   "Wrong type argument in position ~A (expecting ~A): ~S"
  +   (1 "string" #f)
  +   (#f))
  result: FAIL


Tests that appear affected by this issue:

  tests/graph.log:test-name: reverse bag DAG
  tests/graph.log:result: FAIL

  tests/packages.log:test-name: fold-available-packages with/without cache
  tests/packages.log:result: FAIL

  tests/packages.log:test-name: find-packages-by-name with cache
  tests/packages.log:result: FAIL

  tests/packages.log:test-name: find-packages-by-name + version, with cache
  tests/packages.log:result: FAIL

  tests/packages.log:test-name: find-package-locations with cache
  tests/packages.log:result: FAIL

And tests/inferiors.scm dies with a backtrace, and stops processing any
further tests so it is hard to know if those fail too:

  Backtrace:
17 (primitive-load-path "tests/inferior.scm")
  In ice-9/eval.scm:
  619:8 16 (_ #(#(# #) #))
 293:34 15 (_ #(#(# #) #))
  159:9 14 (_ #(#(# #) #))
  159:9 13 (_ #(#(# #) #))
  In guix/discovery.scm:
  189:3 12 (fold-module-public-variables _ _ _)
  In guix/combinators.scm:
  48:26 11 (fold2 # …)
  48:26 10 (fold2 # …)
  In guix/discovery.scm:
 192:33  9 (_ # …)
  In gnu/packages.scm:
 233:37  8 (_ # …)
  In guix/packages.scm:
1317:17  7 (supported-package? # …)
  In guix/memoization.scm:
  101:0  6 (_ # # …)
  In guix/packages.scm:
1295:37  5 (_)
1555:16  4 (package->bag _ _ _ #:graft? _)
1652:22  3 (thunk)
  In guix/gexp.scm:
 523:11  2 (lower "python-gwcs-0.18.2" #:source _ #:inputs _ # _ . #)
 460:52  1 (%local-file #f # …)
  In unknown file:
 0 (basename #f #)

  ERROR: In procedure basename:
  In procedure scm_to_utf8_stringn: Wrong type argument in position 1 
(expecting string): #f


Other than that, it seems to build fine. I haven't actually tested it
yet.


signature.asc
Description: PGP signature


guix emacs package MELPA/ELPA

2022-12-02 Thread Arvid Krein

Hello guix-devel,

this is my first time writing to this list so I hope I am at the right 
place.
I noticed that the guix package for emacs was moved from being developed 
at Github/Gitlab to Savannah. There is the guix package 'emacs-guix'. 
Some people (including me) would rather use the MELPA or ELPA package 
repositories for emacs. I noticed that the guix.el package in MELPA is 
still refering to the old locations on github/gitlab which are 
unmaintained and do not work.
I will try to get the location fixed in MELPA. But since the package has 
moved closer to the guix project (if I understood it right) would it 
maybe make more sense to host it on ELPA (since it is the GNU 
repository)? I do not really know anything about emacs packaging which 
is why I am asking.


Greetings

Arvid



Re: GNU Guix 1.4.0rc1 available for testing!

2022-12-02 Thread (
On Fri Dec 2, 2022 at 10:17 PM GMT, Ahmed Khanzada wrote:
> How can I switch my current GNU Guix installation over to 1.4?
> Afterwards, how could I switch it back? Is that all safe to do so?

You'd just set your channels.scm to point to the version-1.4.0 branch or use
the ``--commit'' ``guix pull'' flag for the same.

-- (


signature.asc
Description: PGP signature


Release progress, week 8

2022-12-02 Thread Ludovic Courtès
Hello Guix!

Release progress: week 8.

Apologies for not sending this one on time this Thursday; instead we got
RC1, which is nice.  :-)

  https://lists.gnu.org/archive/html/guix-devel/2022-12/msg0.html

The RC was made from ‘version-1.4.0’ branch, which only takes important
fixes now (if in doubt, please ask).

Now we need reports from users to act upon.  I’d say we can decide next
week whether we need an RC2 or not.  I can handle the next release
candidate or the release itself, but I’ll be unavailable on Dec. 12–15.

I started writing super long release notes (a book!), comments welcome:

  
https://git.savannah.gnu.org/cgit/guix/guix-artwork.git/tree/website/drafts/gnu-guix-1.4.0-released.md

Comments?  Suggestions?  Happiness?  Excitement?  You tell!

Ludo’.

Week 7: https://lists.gnu.org/archive/html/guix-devel/2022-11/msg00274.html
Week 6: https://lists.gnu.org/archive/html/guix-devel/2022-11/msg00161.html
Week 5: https://lists.gnu.org/archive/html/guix-devel/2022-11/msg00026.html
Week 4: https://lists.gnu.org/archive/html/guix-devel/2022-11/msg00026.html
Week 3: https://lists.gnu.org/archive/html/guix-devel/2022-10/msg00293.html
Week 2: https://lists.gnu.org/archive/html/guix-devel/2022-10/msg00210.html
Week 1: https://lists.gnu.org/archive/html/guix-devel/2022-10/msg00137.html


signature.asc
Description: PGP signature


Re: Help with G-expression

2022-12-02 Thread zimoun
Hi Ludo,

Thanks for your patience. :-)

On Fri, 02 Dec 2022 at 22:30, Ludovic Courtès  wrote:

> Oops, that one is a new bug due to
> 54003af85cc5b689bd328b30617c93ed2f5fd647.  I’ll look into it.

Ah, a good news. :-)

>> Below the log file – missing (gcrypt hash).
>
> So (with-extensions (list guile-gcrypt) …), as in ‘video-ges-project’ in
> ‘render-videos.scm’¹.
>
> In essence, the gexp you want to run must specify all the Guile modules
> and extensions it depends on; this is what ‘with-imported-modules’ and
> ‘with-extensions’ let you express.

Not here.  What I running is this:

--8<---cut here---start->8---
(with-imported-modules '((guix build utils))  ;import it
  (computed-file "empty-tree"
 #~(begin
 ;; Put it in scope.
 (use-modules (guix build utils))

 ;; Happily use its 'mkdir-p' procedure.
 (mkdir-p (string-append #$output "/a/b/c")
--8<---cut here---end--->8---

And it perfectly works. :-)  As explained in the very first email in
this thread.

The issue is when I am adding (guix profiles) and nothing more to the
previous perfectly working ’computed-file’.  How can I guess that this
module (guix profiles) requires (gcrypt hash) as extension?  Just to be
loaded since it is not used.

Sorry I am missing the obvious.

Cheers,
simon



Re: match-record

2022-12-02 Thread Ludovic Courtès
Hi Aleksandr,

Aleksandr Vityazev  skribis:

> Before cc9ee514e37f6ec74dd9cab91a13d51f7b8d47e7 commit the code below
> worked:
>
> #+begin_src scheme :scheme guile :season guile
>
> (define (iwd-etc-service config)
>   (match-record config  (config)
> `(("iwd/main.conf"
>,(apply mixed-text-file
>"main.conf"
>(serialize-ini-config config))
> #+end_src
>
>
> then this lead to an error:
> Syntax error:
> test.scm:109:44: lookup-field: unknown record type field in subform
> config of (lookup-field config (+ 1 (+ 1 (+ 1 0))) ())
>
>
> If you fix the code to the following one, it will work. 
>
> #+begin_src scheme :scheme guile :season guile
>
> (define (iwd-etc-service cfg)
>   (match-record cfg  (config)

[...]

> Should the code from the first block work, or should I not write it that
> way?

You have to write it that way.  (Though I would recommend a different
name for the field anyway, maybe ‘raw-file’?)

This is due to how “literals” are matched in syntax-{case,rules} (info
"(guile) Syntax Rules"):

 A literal matches an input expression if the input expression is an
  identifier with the same name as the literal, and both are unbound(1).

Here, because of the ‘config’ parameter, one of the two identifiers was
bound while the other is not, hence the match error.

HTH!

Ludo’.



Re: Help with G-expression

2022-12-02 Thread Ludovic Courtès
Hi,

zimoun  skribis:

> scheme@(guix-user)> ,build (fail-again-not-fixed)
> While executing meta-command:
> Throw to key `match-error' with args `("match" "no matching pattern" 
> (#:declarative? #f #:export (%guix-package-name %guix-version 
> %guix-bug-report-address %guix-home-page-url %channel-metadata %system 
> %store-directory %state-directory %store-database-directory %config-directory 
> %gzip %bzip2 %xz)))'.

Oops, that one is a new bug due to
54003af85cc5b689bd328b30617c93ed2f5fd647.  I’ll look into it.

> Below the log file – missing (gcrypt hash).

So (with-extensions (list guile-gcrypt) …), as in ‘video-ges-project’ in
‘render-videos.scm’¹.

In essence, the gexp you want to run must specify all the Guile modules
and extensions it depends on; this is what ‘with-imported-modules’ and
‘with-extensions’ let you express.

HTH,
Ludo’.

¹ 
https://gitlab.inria.fr/guix-hpc/website/-/blob/6977da4618814c790e767618da5cf9ec2cab0742/doc/atelier-reproductibilit%C3%A9/render-videos.scm



match-record

2022-12-02 Thread Aleksandr Vityazev
Hi,

Before cc9ee514e37f6ec74dd9cab91a13d51f7b8d47e7 commit the code below
worked:

#+begin_src scheme :scheme guile :season guile

(define (iwd-etc-service config)
  (match-record config  (config)
`(("iwd/main.conf"
   ,(apply mixed-text-file
   "main.conf"
   (serialize-ini-config config))
#+end_src

then this lead to an error:
Syntax error:
test.scm:109:44: lookup-field: unknown record type field in subform
config of (lookup-field config (+ 1 (+ 1 (+ 1 0))) ())


If you fix the code to the following one, it will work. 

#+begin_src scheme :scheme guile :season guile

(define (iwd-etc-service cfg)
  (match-record cfg  (config)
`(("iwd/main.conf"
   ,(apply mixed-text-file
   "main.conf"
   (serialize-ini-config config))
#+end_src

Should the code from the first block work, or should I not write it that
way?

-- 
Best regards, 
Aleksandr Vityazev



Re: Status of hibernation (suspend to disk) in Guix

2022-12-02 Thread Tobias Geerinckx-Rice

Ivan Vilata i Balaguer 写道:
But then I wonder if I may have rushed to post the patch, as I 
don't know
whether hibernation is supposed to be more or less mature or 
supported in Guix
(we may not want to encourage people to use a feature which may 
easily cause

data loss)…  Though it works quite well for me!


OTOH, I deliberately hadn't documented ‘resume=’ so far.

OTOH, I have been hibernating multiple times a day for years now, 
only ever rebooting my laptop for kernel updates.


So the feature is probably safe, and we should probably consider 
it supported at this point.  Thanks for bringing it up!


So the TL;DR would be: Is it worth adding such documentation, 
given the

current state of hibernation support in Guix?


I think documenting the current status quo in time for 1.4.0 is a 
good idea.


The next step is to automate things so ‘resume=’ becomes optional. 
This should have landed already, but hasn't for personal reasons. 
The code is basically ready, but won't be in the release.


Kind regards,

T G-R


signature.asc
Description: PGP signature


Status of hibernation (suspend to disk) in Guix

2022-12-02 Thread Ivan Vilata i Balaguer
(I'm not subscribed to the list, please CC me in replies.  Thanks!)

Hi everyone!  As I had promised to myself and some guixers at Capitole du
Libre (salut les collègues !), I finally installed the Guix System in my
laptop (already time after 6+ years of using Guix packages!).  Although my
setup is still in need of some ironing, I was very impressed to see that most
things worked within just a few days of tweaking…  Everyone has done such a
great work! `:)`

In particular, I was very happy to see that hibernation was (nearly) working!
It was sure writing system state to swap then powering off, but then on boot
it routinely ignored the saved state and started a new OS run.  I didn't find
how to fix that in the docs, but by delving into `gnu/build/linux-boot.scm` I
found that I just had to set the kernel argument `resume=`, then
resuming worked like a charm. `:)`

In  I propose some documentation on how to
set the `resume` kernel argument for hibernation (under the Swap Space
section), so that people is at least able to find some useful indications if
they search for "hibernation" or "suspend to disk".

But then I wonder if I may have rushed to post the patch, as I don't know
whether hibernation is supposed to be more or less mature or supported in Guix
(we may not want to encourage people to use a feature which may easily cause
data loss)…  Though it works quite well for me!

(To be honest, I didn't yet test creating a new system generation with a new
kernel, hibernating, and trying to boot the new kernel.)

Also, since I installed the system manually from a custom `config.scm`, I'm
not sure whether this works out of the box with an installer-made setup, but
my impression was that such an installation on a VM didn't even create a swap
space.  Though installer support may be a whole different discussion. `:P`

So the TL;DR would be: Is it worth adding such documentation, given the
current state of hibernation support in Guix?

Thanks!

-- 
Ivan Vilata i Balaguer -- https://elvil.net/


signature.asc
Description: PGP signature


Re: File search

2022-12-02 Thread Antoine R. Dumont (@ardumont)
Hello again,

As mentioned previously, I have iterated on the work @civodul started.
After discussing it a bit over irc, I proposed to try and push a bit
forward the discussion and the implementation [2] to see where this
goes.

After toying a bit with the initial code, I took the liberty to make it
a guix extension (we discussed it a bit with @zimoun). It was mostly to
get started with Guile (I know some lisp implems but not this one so i
had to familiarize myself with tools and whatnot ;). Anyway, that can be
reverted if you feel like it can be integrated as a Guix cli directly.

Currently, the implementation scans and indexes whatever package is
present in the local store of the machine's user. From nix/guix's
design, it makes sense to do it that way as it's likely that even though
you don't have all the tools locally, it may be already present as a
dependency of some high level tools you already use (it's just not
exposed because not declared in config.scm or home-configuration.scm).

You will find inlines (at the bottom) some cli usage calls [1] and the
current implementation [2].

Thanks in advance for any feedback ;)

Cheers,
--
tony / Antoine R. Dumont (@ardumont)

-
gpg fingerprint BF00 203D 741A C9D5 46A8 BE07 52E2 E984 0D10 C3B8


[1] Usage sample:
--8<---cut here---start->8---
$ env | grep GUIX_EXTENSION
GUIX_EXTENSIONS_PATH=$HOME/repo/public/guix/guix/guix/extensions

$ guix index
;;; (package 1 "acl")
;;; (package 595 "shepherd")
;;; (package 596 "guile2.2-shepherd")
;;; (package 2 "htop")
;;; (package 7 "shadow")
;;; (package 6 "shepherd")
;;; (package 5 "autojump")
...
^C

$ guix index search shepherd
guile2.2-shepherd@0.9.3 
/gnu/store/cq8r2vzg56ax0iidgs4biz3sv0b9jxp3-guile2.2-shepherd-0.9.3/bin/shepherd
shepherd@0.9.3   
/gnu/store/a9jdd8kgckwlq97yw3pjqs6sy4lqgrfq-shepherd-0.9.3/bin/shepherd
shepherd@0.8.1   
/gnu/store/vza48khbaq0fdmcsrn27xj5y5yy76z6l-shepherd-0.8.1/bin/shepherd
shepherd@0.9.1   
/gnu/store/gxz67p4gx9g6rpxxpsgmhsybczimdlx5-shepherd-0.9.1/bin/shepherd

guix help | grep -C3 extension
repl   read-eval-print loop (REPL) for interactive programming

  extension commands
index  Index packages to allow searching package for a given filename

Report bugs to: bug-g...@gnu.org.
$ guix help index  # or: guix index [--help|-h]
Usage: guix index [OPTIONS...] [search FILE...]
Without FILE, index (package, file) relationships in the local store.
With 'search FILE', search for packages installing FILE.

Note: The internal cache is located at ~/.config/guix/locate-db.sqlite.
See --db-path for customization.

The valid values for OPTIONS are:

  -h, --help  Display this help and exit
  -V, --version   Display version information and exit
  --db-path=DIR   Change default location of the cache db

The valid values for ARGS are:

  search FILE Search for packages installing the FILE (from cache db)

Report bugs to: bug-g...@gnu.org.
GNU Guix home page: 
General help using Guix and GNU software: 
$ guix index --version # or guix index -V
guix locate (GNU Guix) 5ccb5837ccfb39af4e3e6399a0124997a187beb1
Copyright (C) 2022 the Guix authors
License GPLv3+: GNU GPL version 3 or later 
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
--8<---cut here---start->8---

[2] The code:
--8<---cut here---start->8---
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2022 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 extensions index)
  #:use-module (guix config)  ;; %guix-package-name, ...
  #:use-module (guix ui)  ;; display G_
  #:use-module (guix scripts)
  #:use-module (sqlite3)
  #:use-module (ice-9 match)
  #:use-module (guix describe)
  #:use-module (guix store)
  #:use-module (guix monads)
  #:autoload   (guix grafts) (%graft?)
  #:use-module (guix derivations)
  #:use-module (guix packages)
  #:autoload   (guix build utils) (find-files)
  #:autoload   (gnu packages) (fold-packages)
  #:use-module (srfi srfi-1)
  #:use-module (srfi srfi-9)
  #:export  

Re: File search

2022-12-02 Thread antoine . romain . dumont
Hello Guix!

Guix is top so thanks for the awesome work!

Just to give some feedback on this thread. That's a good news that the
file search functionality in the radar.

> Lately I found myself going several times to
>  to look for packages providing a given
> file and I thought it’s time to do something about it.

I've finally started to set up my machine with Guix system (and
Guix Home). Finding out where such program or cli is packaged is
definitely something that I need to port my existing use (from mainly
nixified debian or nixos machines) to Guix.

And to answer such question, I used existing "offline" programs in my
machines. I've bounced back and forth between `nix-locate` and `apt-file
search` to determine approximately the packages in Guix (names aren't
usually that different).

Hence, as a user, it's one of my expectation that the Guix cli provides
some equivalent program to lookup from file to package ;).

> The script below creates an SQLite database for the current set of
> packages, but only for those already in the store:
>
>   Guix repl file-database.scm populate
>
> That creates /tmp/db; it took about 25mn on berlin, for 18K packages.
> Then you can run, say:
>
>   Guix repl file-database.scm search boot-9.scm
>
> to find which packages provide a file named ‘boot-9.scm’.  That part is
> instantaneous.
>
> The database for 18K packages is quite big:
>
> --8<---cut here---start->8---
> $ du -h /tmp/db*
> 389M/tmp/db
> 82M /tmp/db.gz
> 61M /tmp/db.zst
> --8<---cut here---end--->8---

For information, in a most recent implementation (@civodul provided me
in #guix-devel), I noticed multiple calls to the indexation step would
duplicate information (at all levels packages, files, directories). So
that might have had an impact in the extracted values above (if ludo had
triggered multiple times the script at the time).

Jsyk, I have started iterating a bit over that provided implementation
(and fixed the current caveat mentioned), added some help message...
I'll follow up with it in a bit (same thread) to have some more feedback
on it.

> How do we expose that information?  There are several criteria I can
> think of: accuracy, freshness, privacy, responsiveness, off-line
> operation.
>
> I think accuracy (making sure you get results that correspond precisely
> to, say, your current channel revisions and your current system) is not
> a high priority: some result is better than no result.

I definitely agree with this. At least from the offline use perspective.
I did not focus at all on the second part of the problematic ("online"
and distribution use).

> Likewise for freshness: results for an older version of a given
> package may still be valid now.

Indeed.

Cheers,
--
tony / Antoine R. Dumont (@ardumont)

-
gpg fingerprint BF00 203D 741A C9D5 46A8 BE07 52E2 E984 0D10 C3B8


signature.asc
Description: PGP signature


Re: Stay Together For The Kids

2022-12-02 Thread jgart
On Fri, 02 Dec 2022 13:42:39 + Luis Felipe  
wrote:
> Hi jgart, the talk looks interesting, I'll watch it later.

Cool, let me know what you think here if you'd like.

I think it's a very relevant talk to Guixers by the BDFL of zig who uses NixOS.

> "mpv" is a really nice piece of software :)

Oh ya!

$ mpv https://www.youtube.com/watch?v=stChOsejLEQ

or

guix shell ytfzf -- ytfzf https://www.youtube.com/watch?v=stChOsejLEQ

;()



FOSDEM tracks: deadlines are approaching!

2022-12-02 Thread Ludovic Courtès
Hi!

To complement what you wrote Simon, here’s a subset of the devrooms at
 that
I think could be good venues for Guix talks:

  • Containers, Dec. 10th

https://discuss.linuxcontainers.org/t/fosdem-2023-containers-devroom-call-for-papers/15597

  • CI/CD, Dec. 12th
https://lists.fosdem.org/pipermail/fosdem/2022q4/003457.html

  • Declarative & minimalist computing (don’t miss it!), Dec. 3rd
https://lists.fosdem.org/pipermail/fosdem/2022q4/003446.html

  • HPC, big data, and data science, Dec. 16th
https://hpc-bigdata-fosdem23.github.io/

  • Nix & NixOS :-), Dec. 7th
https://lists.fosdem.org/pipermail/fosdem/2022q4/003463.html

  • Open research tools & technologies, Dec. 4th
https://lists.fosdem.org/pipermail/fosdem/2022q4/003470.html

  • RISC-V, Dec. 10th
https://lists.fosdem.org/pipermail/fosdem/2022q4/003474.html

  • Security, Dec. 1st (oops!)
https://github.com/security-devroom/fosdem-2023

It looks like Simon or myself will submit to the Open research tools
devroom.  It would be nice to have talks in some of these, it’s a good
way to engage with broader communities.

Ludo’.



Re: Help with G-expression

2022-12-02 Thread zimoun
Hi Ludo,

On Fri, 02 Dec 2022 at 10:09, Ludovic Courtès  wrote:
> zimoun  skribis:
>
>> no code for module (guix config)
>
> (guix config) is added by using ‘make-config.scm’; there’s an example in
> (gnu services base).
>
> For the rest, make sure to use ‘source-module-closure’ or you’ll miss
> modules (info "(guix) G-Expressions").

I have read this section. :-) Something is not clear for me.

Note that ’make-config.scm’ does not appear in the manual.

The only difference between the previous ’work’ example and all the
’fail’ as ’fail-again-not-fixed’ is only the part ’with-imported-modules’.

Well, I am somehow surprised how difficult is to find the correct.

--8<---cut here---start->8---
scheme@(guix-user)> (define (fail-again-not-fixed)
  (with-imported-modules (source-module-closure
  '((guix build utils)
(guix config)
(guix profiles)))  ;import it
(computed-file "empty-tree"
   #~(begin
   ;; Put it in scope.
   (use-modules (guix build utils))

   ;; Happily use its 'mkdir-p' procedure.
   (mkdir-p (string-append #$output "/a/b/c"))
scheme@(guix-user)> ,build (fail-again-not-fixed)
While executing meta-command:
Throw to key `match-error' with args `("match" "no matching pattern" 
(#:declarative? #f #:export (%guix-package-name %guix-version 
%guix-bug-report-address %guix-home-page-url %channel-metadata %system 
%store-directory %state-directory %store-database-directory %config-directory 
%gzip %bzip2 %xz)))'.
--8<---cut here---end--->8---

Here it is the same error as ’fail-again’.  And I do not understand the
magic invocation.  Well, what I tried next:

--8<---cut here---start->8---
scheme@(guix-user)> (define (fail-again-bis)
  (with-imported-modules `(((guix config) => ,(make-config.scm))
   ,@(source-module-closure '((guix build utils)
  (guix profiles))
#:select? not-config?))
(computed-file "empty-tree"
   #~(begin
   ;; Put it in scope.
   (use-modules (guix build utils))

   ;; Happily use its 'mkdir-p' procedure.
   (mkdir-p (string-append #$output "/a/b/c"))
;;; : warning: possibly unbound variable `make-config.scm'
;;; : warning: possibly unbound variable `not-config?'
scheme@(guix-user)> ,build (fail-again-bis)
While executing meta-command:
error: make-config.scm: unbound variable
scheme@(guix-user)> ,use(guix self)
scheme@(guix-user)> ,build (fail-again-bis)
While executing meta-command:
error: not-config?: unbound variable
scheme@(guix-user)> (define not-config?
  ;; Select (guix …) and (gnu …) modules, except (guix config).
  (match-lambda
(('guix 'config) #f)
(('guix rest ...) #t)
(('gnu rest ...) #t)
(rest #f)))
scheme@(guix-user)> ,build (fail-again-bis)
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://ci.guix.gnu.org'... 100.0%
substitute: updating substitutes from 'https://bordeaux.guix.gnu.org'... 100.0%
building /gnu/store/xjvjrkl3559jrlm0bnvdj29c838y81x3-config.scm.drv...
building /gnu/store/slwgyy4vnxprz0cj73vyq6psr7bqmbwz-module-import.drv...
building 
/gnu/store/cfjpfzph97dsishvr7g1bqxqw5kynns8-module-import-compiled.drv...
 20% [# 

]builder for 
`/gnu/store/cfjpfzph97dsishvr7g1bqxqw5kynns8-module-import-compiled.drv' failed 
with exit code 1
build of /gnu/store/cfjpfzph97dsishvr7g1bqxqw5kynns8-module-import-compiled.drv 
failed
View build log at 
'/var/log/guix/drvs/cf/jpfzph97dsishvr7g1bqxqw5kynns8-module-import-compiled.drv.gz'.
cannot build derivation 
`/gnu/store/pr3qqw26jilyhyn650i3w7z13i7k6p40-empty-tree.drv': 1 dependencies 
couldn't be built
While executing meta-command:
ERROR:
  1. :
  message: "build of 
`/gnu/store/pr3qqw26jilyhyn650i3w7z13i7k6p40-empty-tree.drv' failed"
  status: 100
--8<---cut here---end--->8---
  
Below the log file – missing (gcrypt hash).

Well, I give up because the try-error does not explain me how it
works. :-)

Any pointers?

Cheers,
simon

--8<---cut here---start->8---
[ 1/56] Loading './guix/base16.scm'...
[ 2/56] Loading './guix/base32.scm'...
[ 3/56] Loading './guix/base64.scm'...
[ 4/56] Loading './guix/build/syscalls.scm'...
[ 5/56] Loading './guix/build/utils.scm'...
[ 6/56] Loading './guix/build-system.scm'...
[ 7/56] 

Re: Licence of the Guix blog posts

2022-12-02 Thread zimoun
Hi Ludo,

Thanks for this clarification.  It reminds me hpc.guix.info posts. :-)

On Mon, 28 Nov 2022 at 18:22, Ludovic Courtès  wrote:

> Simon, what do you think about emailing the authors of the “10 years of
> stories” post asking if they agree with the licensing?  :-)  No rush,
> though the sooner the more likely we are to get an answer.

I will do my best this week-end.


Cheers,
simon



Re: Licence of the Guix blog posts

2022-12-02 Thread Ludovic Courtès
Hi!

Ludovic Courtès  skribis:

> Therefore, I propose to apply the following patch, which leaves out a
> couple of posts as “unlicensed”.  From there on, we’ll have consistent
> free licensing by default.

Thanks to everyone who provided feedback.  I pushed the patch.

Let’s see if we can eventually address the remaining unlicensed posts,
in particular the 10 years one.

Ludo’.



Re: PMB integrated Library System

2022-12-02 Thread Ludovic Courtès
Hi,

Joshua Branson  skribis:

>> +   (synopsis "Integrated Library System")
>> +   (description "PMB is an Integrated Library System for librarians, 
>> documentalists and 
>> +information managers.
>> +
>> +PMB features include:
>> +@itemize
>> +@item Management of physical and digital collections
>> +@item Standardization of the document collection
>> +@item Native integration of RFID solutions
>> +@item Enhancement of the collection with a personalized document portal
>> +@item Management of acquisitions
>> +@item Monitoring of activities with statistical tools
>> +@item Communication with users (ISD, monitoring, documentary products, etc.)
>> +@item Internal management of users or synchronization with an LDAP/AD 
>> directory.
>> +@end itemize
>> +
>> +This contains only the PMB archive (html, php and css files), you will need 
>> a web
>> +server, php and a SQL database server. See the guix pmb service.")
>>
>
> Your description is a little long.  I would limit myself to one sentence.

It’s a bit long but OK; the guidelines say “between five and ten lines”:

  https://guix.gnu.org/manual/devel/en/html_node/Synopses-and-Descriptions.html

Ludo’.



Re: PMB integrated Library System

2022-12-02 Thread Joshua Branson
"yarl baudig"  writes:

> Hello guix,
> I would like to ask for comments on this, please.
> A relative asked me to install pmb (www.sigb.net) on his linux computer.
> I thought that trying to package this for guix would be a good way to make it
> easier for me to maintain it, to contribute to guix, and to learn more about
> guix.
> I won't comment the software or the lack of documentation.
> Anyway, this was not as easy as I thought.
> I prefer sending this on this list first to have some comments. I am still 
> learning.
> Does this fit in guix? What mistakes did I do? Is my english good enough? I 
> take all comments. Thank you!
> I am also planning to package koha (koha-community.org) after pmb, for 
> comparison.
>

Your english seems pretty fine to me!

> +(define-module (gnu packages ils)
> +  #:use-module (guix packages)
> +  #:use-module (guix download)
> +  #:use-module (guix build-system copy)
> +  #:use-module (guix licenses)
> +  #:use-module (gnu packages gawk)
> +  #:use-module (gnu packages compression)
> +  #:use-module (gnu packages php)
> +  #:use-module (gnu packages perl))
> +
> +;;; Commentary
> +;;;
> +;;; Integrated Library Systems packages.
> +;;;
> +;;; Code
> +
> +(define-public pmb
> +  (package
> +   (name "pmb")
> +   (version "7.4.6")
> +   (source (origin
> +(method url-fetch)
> +(uri
> +  (string-append
> +   "https://forge.sigb.net/attachments/download/3968/pmb;
> +   version
> +  ".zip"))
> +(sha256
> + (base32
> +  "0ana1w8d60n2gznhh1zyjdld4xi4p2pm2hc05m8n7fh2bvlmw0cr"
> +   (build-system copy-build-system)
> +   (arguments '(#:install-plan '(("." "share/http/pmb"
> +   (native-inputs (list unzip))
> +   (propagated-inputs (list php perl))
> +   (synopsis "Integrated Library System")
> +   (description "PMB is an Integrated Library System for librarians, 
> documentalists and 
> +information managers.
> +
> +PMB features include:
> +@itemize
> +@item Management of physical and digital collections
> +@item Standardization of the document collection
> +@item Native integration of RFID solutions
> +@item Enhancement of the collection with a personalized document portal
> +@item Management of acquisitions
> +@item Monitoring of activities with statistical tools
> +@item Communication with users (ISD, monitoring, documentary products, etc.)
> +@item Internal management of users or synchronization with an LDAP/AD 
> directory.
> +@end itemize
> +
> +This contains only the PMB archive (html, php and css files), you will need 
> a web
> +server, php and a SQL database server. See the guix pmb service.")
>

Your description is a little long.  I would limit myself to one sentence.

> +   (home-page "https://www.sigb.net;)
> +   (license cecill)))
> +
> -- 
>



Re: Stay Together For The Kids

2022-12-02 Thread Luis Felipe
Hi jgart, the talk looks interesting, I'll watch it later.


On Friday, December 2nd, 2022 at 08:50, jgart  wrote:

> https://www.youtube.com/watch?v=stChOsejLEQ
> 

> paste above url into an invidious instance to protect your four essential
> freedoms and watch a talk about packaging, Debian, and NixOS:
> 

> https://redirect.invidious.io/

Or run the following in your machine:

  mpv https://www.youtube.com/watch?v=stChOsejLEQ

"mpv" is a really nice piece of software :)

publickey - luis.felipe.la@protonmail.com - 0x12DE1598.asc
Description: application/pgp-keys


signature.asc
Description: OpenPGP digital signature


PMB integrated Library System

2022-12-02 Thread yarl baudig
Hello guix,
I would like to ask for comments on this, please.
A relative asked me to install pmb (www.sigb.net) on his linux computer.
I thought that trying to package this for guix would be a good way to make it 
easier for me to maintain it, to contribute to guix, and to learn more about 
guix.
I won't comment the software or the lack of documentation.
Anyway, this was not as easy as I thought.
I prefer sending this on this list first to have some comments. I am still 
learning.
Does this fit in guix? What mistakes did I do? Is my english good enough? I 
take all comments. Thank you!
I am also planning to package koha (koha-community.org) after pmb, for 
comparison.

>From 43e08c4d5fc903411c7609a1e7d899ec43a85e56 Mon Sep 17 00:00:00 2001
From: Yarl Baudig 
Date: Fri, 25 Nov 2022 13:22:17 +0100
Subject: [PATCH 1/4] gnu: php: Add '--enable-soap' configure option.

* gnu/packages/php.scm: Add '--enable-soap' configure option.
---
 gnu/packages/php.scm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/php.scm b/gnu/packages/php.scm
index 645a8edee1..9bc4af5092 100644
--- a/gnu/packages/php.scm
+++ b/gnu/packages/php.scm
@@ -134,7 +134,8 @@ (define-public php
"--enable-intl"
"--enable-mbstring"
"--enable-pcntl"
-   "--enable-sockets"))
+   "--enable-sockets"
+  "--enable-soap"))
#:phases
(modify-phases %standard-phases
  (add-after 'unpack 'do-not-record-build-flags
-- 
2.38.1

>From b9e7abdf982cadebec3f0899ef36deeb6f5e24b4 Mon Sep 17 00:00:00 2001
From: Yarl Baudig 
Date: Fri, 25 Nov 2022 23:28:44 +0100
Subject: [PATCH 2/4] gnu: Add PMB.

* gnu/packages/ils.scm: New file.
* gnu/local.mk: Add it.
---
 gnu/local.mk |  1 +
 gnu/packages/ils.scm | 73 
 2 files changed, 74 insertions(+)
 create mode 100644 gnu/packages/ils.scm

diff --git a/gnu/local.mk b/gnu/local.mk
index f543a9350d..e6ad51ae78 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -323,6 +323,7 @@ GNU_SYSTEM_MODULES =\
   %D%/packages/icu4c.scm   \
   %D%/packages/idris.scm   \
   %D%/packages/idutils.scm \
+  %D%/packages/ils.scm \
   %D%/packages/image.scm   \
   %D%/packages/image-processing.scm\
   %D%/packages/image-viewers.scm   \
diff --git a/gnu/packages/ils.scm b/gnu/packages/ils.scm
new file mode 100644
index 00..8bdec05980
--- /dev/null
+++ b/gnu/packages/ils.scm
@@ -0,0 +1,73 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2022 Yarl Baudig 
+;;;
+;;; 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 (gnu packages ils)
+  #:use-module (guix packages)
+  #:use-module (guix download)
+  #:use-module (guix build-system copy)
+  #:use-module (guix licenses)
+  #:use-module (gnu packages gawk)
+  #:use-module (gnu packages compression)
+  #:use-module (gnu packages php)
+  #:use-module (gnu packages perl))
+
+;;; Commentary
+;;;
+;;; Integrated Library Systems packages.
+;;;
+;;; Code
+
+(define-public pmb
+  (package
+   (name "pmb")
+   (version "7.4.6")
+   (source (origin
+(method url-fetch)
+(uri
+(string-append
+ "https://forge.sigb.net/attachments/download/3968/pmb;
+ version
+  ".zip"))
+(sha256
+ (base32
+  "0ana1w8d60n2gznhh1zyjdld4xi4p2pm2hc05m8n7fh2bvlmw0cr"
+   (build-system copy-build-system)
+   (arguments '(#:install-plan '(("." "share/http/pmb"
+   (native-inputs (list unzip))
+   (propagated-inputs (list php perl))
+   (synopsis "Integrated Library System")
+   (description "PMB is an Integrated Library System for librarians, 
documentalists and 
+information managers.
+
+PMB features include:
+@itemize
+@item Management of physical and digital collections
+@item Standardization of the document collection
+@item Native integration of RFID solutions
+@item Enhancement of the collection with a personalized document portal
+@item Management of acquisitions
+@item Monitoring of activities with statistical tools
+@item Communication with users (ISD, monitoring, documentary products, etc.)
+@item 

Re: branch master updated: doc: Recommend avoiding execl, execle or execlp in mcron job specifications.

2022-12-02 Thread Ludovic Courtès
Hello,

guix-comm...@gnu.org skribis:

> diff --git a/doc/guix.texi b/doc/guix.texi
> index e547d469f4..caa6976a82 100644
> --- a/doc/guix.texi
> +++ b/doc/guix.texi
> @@ -18940,9 +18940,8 @@ gexps to introduce job definitions that are passed to 
> mcron
>;; job's action as a Scheme procedure.
>#~(job '(next-hour '(3))
>   (lambda ()
> -   (execl (string-append #$findutils "/bin/updatedb")
> -  "updatedb"
> -  "--prunepaths=/tmp /var/tmp /gnu/store"))
> +   (system* (string-append #$findutils "/bin/updatedb")
> +"--prunepaths=/tmp /var/tmp /gnu/store"))
>   "updatedb"))
>  
>  (define garbage-collector-job
> @@ -18980,6 +18979,12 @@ the job would appear as ``Lambda function'' in the 
> output of
>  @command{herd schedule mcron}, which is not nearly descriptive enough!
>  @end quotation
>  
> +@quotation Tip
> +Avoid calling the Guile procedures @code{execl}, @code{execle} or
> +@code{execlp} inside a job specification, else mcron won't be able to
> +output the completion status of the job.
> +@end quotation

The problem is that this creates an additional process and the first one
now just sits there in ‘waitpid’.

Could mcron return the completion status of the process that calls the
thunk?  It suppose it’s already monitoring it (via SIGCHLD or a direct
‘waitpid’ call) so it should have that info available, no?

I hope this makes sense.

Ludo’.



Re: Help with G-expression

2022-12-02 Thread Ludovic Courtès
Hi,

zimoun  skribis:

> no code for module (guix config)

(guix config) is added by using ‘make-config.scm’; there’s an example in
(gnu services base).

For the rest, make sure to use ‘source-module-closure’ or you’ll miss
modules (info "(guix) G-Expressions").

HTH!

Ludo’.



Re: GNU Guix 1.4.0rc1 available for testing!

2022-12-02 Thread Ludovic Courtès
Hi,

Luis Felipe  skribis:

> Just to report that I installed the Guix System successfully in my new-old 
> machine using 
> https://alpha.gnu.org/gnu/guix/guix-system-install-1.4.0rc1.x86_64-linux.iso:

Excellent, thanks!

Ludo’.



Re: Potential minor API change notice

2022-12-02 Thread Ludovic Courtès
Maxim Cournoyer  skribis:

> Ludovic Courtès  writes:
>
>> Hi,
>>
>> Maxim Cournoyer  skribis:
>>
>>> This is a heads up to let you know that the
>>> %BASE-PACKAGES-DISK-UTILITIES public variable exported from (gnu system)
>>> may be removed in the near future.
>>
>> If the patch eventually gets consensus, I would suggest making that
>> variable an alias using ‘define-deprecated’: that way people will know
>> about it and code won’t break.
>
> An deprecated alias to what?

To ‘%base-packages’ for example?  It doesn’t really matter.

What’s important is to never ever remove a public variable, or change
the signature of a public procedure, without prior deprecation period
(at least for interfaces that one may use in their System or Home config
files.)

gnu/{services,packages}/*.scm contain bindings that have been deprecated
for years.  That’s probably excessive, but lack of a deprecation period
would unnecessarily upset fellow users and then we’d have to channel
their anger.  :-)

Ludo’.



Re: how to customize mirror list used in custom channels?

2022-12-02 Thread Ludovic Courtès
Hi,

zimoun  skribis:

> Does something like that would make sense?

Yes, that’s the idea.

> diff --git a/guix/download.scm b/guix/download.scm
> index 2e9ecb43fc..2497ea0f75 100644
> --- a/guix/download.scm
> +++ b/guix/download.scm
> @@ -499,6 +499,7 @@ (define %download-fallback-test
>  (define* (url-fetch* url hash-algo hash
>   #:optional name
>   #:key (system (%current-system))
> + (mirrors %mirrors)
>   (guile (default-guile))
>   executable?)
>"Return a fixed-output derivation that fetches data from URL (a string, or 
> a
> @@ -519,7 +520,8 @@ (define file-name
>(_
> (basename url
>  
> -  (let ((uri (and (string? url) (string->uri url
> +  (let ((uri (and (string? url) (string->uri url)))
> +(mirror-file (plain-file "mirrors" (object->string mirrors

There are subtleties though: we don’t want to create a new 
at each call as this would lead to poor performance (lack of
memoization).

> This change would a world rebuild, right?

No, not at all.

Thanks,
Ludo’.



Stay Together For The Kids

2022-12-02 Thread jgart
https://www.youtube.com/watch?v=stChOsejLEQ

paste above url into an invidious instance to protect your four essential
freedoms and watch a talk about packaging, Debian, and NixOS:

https://redirect.invidious.io/