bug#25327: windows-related dependencies in crates

2022-03-24 Thread Nicolas Graves via Bug reports for GNU Guix


Hi all,

I've delved into the subject the past week and now have a clearer view
on it :

- windows (and mac) dependencies are not needed when compiling a single
  package. It is possible to bypass it without changing the
  build-system, by a few means :

   - either by using the #:cargo-build-flags argument (doesn't
 work everytime, seems to work only seldomly with
 --target unix)
 In this option, one would also need to modify Cargo.toml
 file before the package phase, since `cargo package`
 vendors all possible dependencies to ensure a package on
 all environments.
 For instance (1) :
 #:phases
 (modify-phases %standard-phases
   (add-before 'package 'unix-cargo-toml
 (lambda _
   (delete-file "Cargo.toml")
   (substitute* "Cargo.toml.orig"
 (("^mac-notification-sys.*") "")
 (("^chrono.*") "")
 (("^winrt-notification.*") ""))
   (rename-file "Cargo.toml.orig" "Cargo.toml")
   #t)))

   - either by using the environment variable
 "CARGO_BUILD_RUSTFLAGS"  during the build phase, like that
 for instance (2) :
 #:phases
 (modify-phases %standard-phases
   (add-before 'build 'unix-cargo-toml
 (setenv
  "CARGO_BUILD_RUSTFLAGS"
  (string-append
   (getenv "CARGO_BUILD_RUSTFLAGS")
   "--cfg 'target_os=\"linux\"'"
 In this case, the package phase would also require the same
 change as in (1). Note that this might not be backward
 compatible further down the line (seen in the cargo
 manual).

For some reason, these two means don't seem to propagate when using such
packages as inputs.

There are also the options to use a snippet or a patch on the source
itself. The snippet on the source could look like (1), or the patch as
its effects, and we would still need to use (2). Haven't experimented
much with that yet.

In any case, all this seems kinda bulky for an edit on an imported base,
and since we have lots of information with `cargo metadata`, I imagine
it would be possible to modify the build-system itself, so that it only
considers `target_os = "linux"` or possibly redox / bsd / dragonfly if
guix considers porting to these platforms.

I have 2 possible ideas :

1) Maybe something like adding a phase after unpack, which would :

- parse `cargo metadata` to isolate only needed dependencies (by maybe
generating and applying a patch ? or maybe there's a cargo command for
generating a Cargo.toml based on modified metadata ?). In any case,
modifying the Cargo.toml to only keep relevant information.

2) Maybe rethinking the package phase entirely instead of relying on
`cargo package --no-verify --no-metadata` which seems to not allow
options without interferring with the Cargo.toml file.

In both cases, we would then need to :
- modify the phase were environment variables are defined to add (2).
- modify the crate import script accordingly (not trivial).

As for the second hypothesis, according to the cargo manual, what `cargo
package` does is the following :

1. Load and check the current workspace, performing some basic checks.
Path dependencies are not allowed unless they have a version key. Cargo
will ignore the path key for dependencies in published
packages. dev-dependencies do not have this restriction.

2. Create the compressed .crate file.
a. The original Cargo.toml file is rewritten and normalized.
b. [patch], [replace], and [workspace] sections are removed from the manifest.
c. Cargo.lock is automatically included if the package contains an
  executable binary or example target. cargo-install(1) will use the
  packaged lock file if the --locked flag is used.
d. A .cargo_vcs_info.json file is included that contains information about
  the current VCS checkout hash if available (not included with
  --allow-dirty).

3. Extract the .crate file and build it to verify it can build.
- This will rebuild your package from scratch to ensure that it can be
  built from a pristine state. The --no-verify flag can be used to skip
  this step.

4. Check that build scripts did not modify any source files.

Step 3 and 4 are actually not performed, since the build-system calls
cargo package with the --no-verify flag. The checks in step 1 doesn't
seem that essential on guix, but I imagine we could replicate
them. Clearly the essential step here is 2, but since we get a crate,
steps a. and b. should actually already be done at the source level, and
step d. is not essential because of origin's field version. Step 2c is
not essential either since Cargo.lock file is actually deleted during
the build system.

I might try to implement these changes, although I do not have 

bug#53342: Environmental variables for cuirass service ?

2022-01-18 Thread Nicolas Graves via Bug reports for GNU Guix
Hi,

(In short), I'm looking for a way to add environmental variables to a
cuirass register job.

I've recently setup a cuirass server to ease my contributions to guix.
While everything seems to work fine when not using the flat channel (for
emacs-pgtk), I get the following error when added to cuirass
specifications :

2022-01-18T09:59:09 error: fatal: uncaught exception 'wrong-type-arg' in 'r
estart-builds' fiber!
2022-01-18T09:59:09 error: exception arguments: ("struct-vtable" "Wrong typ
e argument in position 1 (expecting struct): ~S" (#f) (#f))
In ice-9/boot-9.scm:
  1747:15  7 (with-exception-handler # ?)
  1752:10  6 (with-exception-handler _ _ #:unwind? _ # _)
  1685:16  5 (raise-exception _ #:continuable? _)
  1780:13  4 (_ #< components: (#)
   2137:6  3 (_ _ . _)
  1747:15  2 (with-exception-handler # ?)
In cuirass/utils.scm:
   299:22  1 (_)
In unknown file:
   0 (make-stack #t)
ERROR: In procedure make-stack:
In procedure struct-vtable: Wrong type argument in position 1 (expecting st
ruct): #f

Some deprecated features have been used.  Set the environment
variable GUILE_WARN_DEPRECATED to "detailed" and rerun the
program to get more information.  Set it to "no" to suppress
this message.

Not very verbose. I took a look at the gnu/services/cuirass.scm file to
see if there was a way to add environment-variables, but it doesn't seem
that it's the case.

Is there another way to setup global environmental variables on the
server ? Or should I add such an option in the cuirass service
definition and commit a patch ?

Thanks in advance,
Cheers,

Nicolas Graves





bug#55618: Allow patching from mummi issues

2022-05-24 Thread Nicolas Graves via Bug reports for GNU Guix


Hi !

I was tring to fix a local build using an online patch on mummi, this
way :

(define-public my-emacs-list-utils
  (package
(inherit emacs-list-utils)
(name "my-emacs-list-utils")
(version "0.4.6")
(source
 (origin
   (method git-fetch)
   (uri (git-reference
 (url "https://github.com/rolandwalker/list-utils;)
 (commit (string-append "v" version
   (file-name (git-file-name name version))
   (sha256
(base32 "07hbz2md52ccy95gv4d5n6szrfmpfqf3w4kwqdg2cf54c7kgf7hw"))
   (patches
(list
 (origin
(method url-fetch)
(uri "https://issues.guix.gnu.org/issue/55498/attachment/0;)
(sha256
 (base32
  "1ysjb23g21m0jhkn63hq56snjd6skd9pl58c365g519q03hq5s87")

As it is a quick and convenient way to apply someone's work while the
patch is not upstream, I expected it to work, but it failed with the
following error during download:

Starting download of /gnu/store/v91i1m61skr42136vnxhzm4gzyidp11y-0
>From https://issues.guix.gnu.org/issue/55498/attachment/0...
Bad media-type header component: text

I don't now if the fix should come from mummi's or guix's side, but I
found it a relevant way to quickly test an existing patch for one's
needs.

Thanks if you can enable this type of patches, or get alternatives if
there are. Also thanks for all the work on guix, it's amazing.

Nicolas Graves





bug#55844: Dbus bug for Chromium extensions

2022-06-08 Thread Nicolas Graves via Bug reports for GNU Guix
Hi !

I was trying to package another chromium extension into Guix but I'm
getting stuck with these errors :

_XSERVTransmkdir: ERROR: euid != 0,directory /tmp/.X11-unix will not be created.
Fontconfig error: No writable cache directories
Fontconfig error: No writable cache directories
[10:28:0531/060100.449212:ERROR:bus.cc(398)] Failed to connect to the bus: 
Failed to connect to socket
/var/run/dbus/system_bus_socket: No such file or directory
[10:28:0531/060100.449297:ERROR:bus.cc(398)] Failed to connect to the bus: 
Failed to connect to socket
/var/run/dbus/system_bus_socket: No such file or directory
[10:26:0531/060100.452428:ERROR:bus.cc(398)] Failed to connect to the bus: 
Could not parse server address: Unknown address type
(examples of valid types are "tcp" and on UNIX "unix")
[10:26:0531/060100.452827:ERROR:bus.cc(398)] Failed to connect to the bus: 
Could not parse server address: Unknown address type
(examples of valid types are "tcp" and on UNIX "unix")
Backtrace:
   2 (primitive-load "/gnu/store/5kz6ghy2js3mcdbkbb5a2js6hxv?")
In ice-9/eval.scm:
619:8  1 (_ #(# "/gnu/st?" ?))
In guix/build/utils.scm:
762:6  0 (invoke "/gnu/store/jsglqylg94biv33jmnm1zfl0a9v0palh-u?" ?)

guix/build/utils.scm:762:6: In procedure invoke:
ERROR:
  1. :
  program: 
"/gnu/store/jsglqylg94biv33jmnm1zfl0a9v0palh-ungoogled-chromium-102.0.5005.61-1/bin/chromium"
  arguments: ("--user-data-dir=chromium-profile"
"--pack-extension=/tmp/guix-build-zotero-connectors-5.0.92.crx.drv-0/extension"
"--pack-extension-key=/gnu/store/8bj3i35kj9fwj4a3w1fv8skia1gh9b35-zotero-connectors-signing-key.pem")
  exit-status: 22
  term-signal: #f
  stop-signal: #f

So it seems that in my case, the browser is trying to connect to dbus
which is not a dependency.

Have you already run into these kind of errors ?
I'm running mainly under Sway implementation of wayland, does it have
something to do with it ?

I've tried adding dbus to the list of native-inputs, but only that
doesn't fix the issue. I've also tried adding a dbus deamon,

(invoke (string-append #$dbus "/bin/dbus-daemon")
   "--fork" "--session")

but I still get the same errors as chromium is trying to connect to
system bus.

I don't have enough dbus understanding to try and address the
issue.

In my particular case, I was trying to package zotero connectors, see my
WIP/dirty package here :
https://git.sr.ht/~ngraves/guix-channel/tree/master/item/ngraves/packages/zotero.scm

Thanks for your help !

Nicolas






bug#55844: fix upstreamed

2022-07-20 Thread Nicolas Graves via Bug reports for GNU Guix


Hi !

This issue can also be closed as a result of successfully pushed
commits c8f33b613e..cda3de3b7d.

-- 
Best regards,
Nicolas Graves





bug#54779: same problem here

2022-04-14 Thread Nicolas Graves via Bug reports for GNU Guix


Hi !

I do have the same problem here, and have found a temporary fix to allow
finishing the reconfiguration.

If you `herd stop root` before reconfiguring home, the `guix home
reconfigure` should finish, with an error, but allowing the
reconfiguration.

Just in case it might be helpful for developers :
The error happends in the `activate profile` phase, when herd and
shepherd are involved.

The reconfiguration actually works when there is no service-type related
to a herd service in the configuration (here it was the case with dbus I
think).

Good luck,

Nicolas





bug#27515: Closing old bugs

2022-10-28 Thread Nicolas Graves via Bug reports for GNU Guix


This bug report is outdated as there is no package texlive-texmf-minimal
anymore. 

-- 
Best regards,
Nicolas Graves





bug#62217: Ungoogled-chromium doesn't launch with linux 6.2

2023-03-16 Thread Nicolas Graves via Bug reports for GNU Guix


Hi!

I've updated linux to version 6.2.2 (the nonfree version), and since
then I can't launch ungoogled-chromium-wayland.

Nyxt or Firefox-like browsers work fine. 

Here's what I tried :

guix shell gdb -- gdb 
/gnu/store/1jmlqw987ifnb3abr0s2hvihcg1n2xmx-ungoogled-chromium-wayland-109.0.5414.119-1/bin/chromium

yields 

"/gnu/store/1jmlqw987ifnb3abr0s2hvihcg1n2xmx-ungoogled-chromium-wayland-109.0.5414.119-1/bin/chromium":
 not in executable format: file format not recognized

Thanks if you can fix this quickly. 

-- 
Best regards,
Nicolas Graves





bug#62589: Help with patch with delayed evaluation

2023-04-17 Thread Nicolas Graves via Bug reports for GNU Guix


Hey Ludo,

I've managed to do what I wanted here, just a little reminder if you can
review this ;) 

-- 
Best regards,
Nicolas Graves





bug#62656: broken guix time-machine + software-heritage

2023-04-03 Thread Nicolas Graves via Bug reports for GNU Guix


Hi Guix!

I was trying to use guix time-machine as I did in the past, but the
recent updates with software heritage seem to have broken my use of it.

Here's the channels.scm file I used:

(list (channel
(name 'guix)
(url "/https://git.savannah.gnu.org/git/guix.git;)
(commit "1984d56b0e437af7be7fa6cf8e1a00e45eb8ffa1")
(introduction
  (make-channel-introduction
"9edb3f66fd807b096b48283debdcddccfea34bad"
(openpgp-fingerprint
  "BBB0 2DDF 2CEA F6A8 0D1D  E643 A2A0 6DF2 A33A 54FA")

Here is the content + backtrace of the time-machine call, after the ~10
hours long object processing on Software Heritage side:

> guix time-machine -C channels.scm -- shell
Mise à jour du canal « guix » depuis le dépôt Git « 
/https://git.savannah.gnu.org/git/guix.git »...
SWH: found revision 1984d56b0e437af7be7fa6cf8e1a00e45eb8ffa1 with directory at 
'https://archive.softwareheritage.org/api/1/directory/1ea499e7529e67a0632ecbe0a8214f0618a82c1a/'
swh:1:rev:1984d56b0e437af7be7fa6cf8e1a00e45eb8ffa1.git/
swh:1:rev:1984d56b0e437af7be7fa6cf8e1a00e45eb8ffa1.git/HEAD
swh:1:rev:1984d56b0e437af7be7fa6cf8e1a00e45eb8ffa1.git/branches/
swh:1:rev:1984d56b0e437af7be7fa6cf8e1a00e45eb8ffa1.git/config
swh:1:rev:1984d56b0e437af7be7fa6cf8e1a00e45eb8ffa1.git/description
swh:1:rev:1984d56b0e437af7be7fa6cf8e1a00e45eb8ffa1.git/hooks/
swh:1:rev:1984d56b0e437af7be7fa6cf8e1a00e45eb8ffa1.git/info/
swh:1:rev:1984d56b0e437af7be7fa6cf8e1a00e45eb8ffa1.git/info/exclude
swh:1:rev:1984d56b0e437af7be7fa6cf8e1a00e45eb8ffa1.git/info/refs
swh:1:rev:1984d56b0e437af7be7fa6cf8e1a00e45eb8ffa1.git/objects/
swh:1:rev:1984d56b0e437af7be7fa6cf8e1a00e45eb8ffa1.git/objects/info/
swh:1:rev:1984d56b0e437af7be7fa6cf8e1a00e45eb8ffa1.git/objects/info/packs
swh:1:rev:1984d56b0e437af7be7fa6cf8e1a00e45eb8ffa1.git/objects/pack/
swh:1:rev:1984d56b0e437af7be7fa6cf8e1a00e45eb8ffa1.git/objects/pack/pack-20648aeebad9dc6d8a29c87bd99d8fd773e1266a.idx
swh:1:rev:1984d56b0e437af7be7fa6cf8e1a00e45eb8ffa1.git/objects/pack/pack-20648aeebad9dc6d8a29c87bd99d8fd773e1266a.pack
Backtrace:
In ice-9/boot-9.scm:
  1752:10 19 (with-exception-handler _ _ #:unwind? _ # _)
In guix/store.scm:
   659:37 18 (thunk)
In guix/status.scm:
830:4 17 (call-with-status-report _ _)
In guix/store.scm:
   1298:8 16 (call-with-build-handler # …)
In guix/inferior.scm:
   928:34 15 (cached-channel-instance # …)
In guix/channels.scm:
528:7 14 (loop _ _)
In guix/combinators.scm:
48:26 13 (fold2 # …)
In guix/channels.scm:
   538:29 12 (_ #< name: guix url: "/https://git.savannah.…> …)
   409:17 11 (latest-channel-instance # …)
In guix/git.scm:
   477:29 10 (update-cached-checkout _ #:ref _ #:recursive? _ # _ # _ …)
378:2  9 (_ git-error #< code: -1 message: "failed to…>)
In guix/utils.scm:
959:8  8 (call-with-temporary-directory _)
In guix/git.scm:
   380:10  7 (_ "/tmp/guix-directory.v8A5Fq")
In guix/swh.scm:
655:8  6 (call-with-temporary-directory #)
   682:11  5 (_ "/tmp/guix-directory.4kHVt8")
In guix/build/utils.scm:
  1018:28  4 (_)
In unknown file:
   3 (get-bytevector-n! # # 0 #)
In web/response.scm:
 95:2  2 (read! _ _ _)
In ice-9/boot-9.scm:
  1685:16  1 (raise-exception _ #:continuable? _)
  1685:16  0 (raise-exception _ #:continuable? _)

ice-9/boot-9.scm:1685:16: In procedure raise-exception:
Throw to key `bad-response' with args `("EOF while reading response body: ~a 
bytes of ~a" (53394376 296632320))'.
tar: Fin prématurée rencontrée dans l'archive.
tar: Fin prématurée rencontrée dans l'archive.
tar: swh\:1\:rev\:1984d56b0e437af7be7fa6cf8e1a00e45eb8ffa1.git/objects/pack : 
utime impossible: Aucun fichier ou dossier de ce type
tar: swh\:1\:rev\:1984d56b0e437af7be7fa6cf8e1a00e45eb8ffa1.git/objects : utime 
impossible: Aucun fichier ou dossier de ce type
tar: swh\:1\:rev\:1984d56b0e437af7be7fa6cf8e1a00e45eb8ffa1.git : utime 
impossible: Aucun fichier ou dossier de ce type
tar: Error is not recoverable: exiting now
zsh: exit 1 guix time-machine -C channels.scm -- shell

Hope this can be fixed soon, good luck ;) 

-- 
Best regards,
Nicolas Graves





bug#62589: Help with patch with delayed evaluation

2023-04-01 Thread Nicolas Graves via Bug reports for GNU Guix
On 2023-04-01 12:28, Ludovic Courtès wrote:

> Hi,
>
> Nicolas Graves  skribis:
>
>> +(define* (make-nerd-dictation-package
>> +  input-tool output-tool
>> +  #:key (nerd-dictation-package nerd-dictation))
>> +  "Construct a nerd-dictation package for OUTPUT-TOOL."
>> +  (match-let* (((input-name output-name)
>> +(map (lambda (tool)
>> +   (lazy
>> +(delay (package-name (force tool)
>> + (list input-tool output-tool
>> +(package
>> +  (inherit nerd-dictation-package)
>> +  (name (string-append "nerd-dictation-"
>> +   (if (equal? (force input-name) "sox")
>> +   "sox-"
>> +  "")
>> +   (force output-name)))
>
> I don’t understand the details of what the patch does, but as a rule of
> thumb, make sure you only ever inherit from packages defined in the same
> module.

The patch defines a helper for defining variants of nerd-dictation. It
now supports wtype and I wasn't totally satisfied by international
support for ydotool, so I wanted to switch, but copying it make a lot of
repeated code.

I already defined such a helper with Liliana Marie Prinkler with
make-emacs-eval-in-repl, but this time I don't understand this error.

Josselin was suggesting a module import cycle, (gnu packages
machine-learning) is imported in (gnu packages audio), the error might
come from there. 

>
> Perhaps that’s what was going wrong?

I've tried inheriting from the above package direclty, doesn't seem to
be that.

>
> HTH,
> Ludo’.

-- 
Best regards,
Nicolas Graves





bug#62589: Help with patch with delayed evaluation

2023-04-01 Thread Nicolas Graves via Bug reports for GNU Guix


Hi Guix!

I'm struggling with the definition of the variants of the nerd-dictation
package. I'm sending a commit here.

I get the following error messages:
sox/wtype: unbound variable
while (gnu packages audio) and (gnu packages freedesktop) are indeed
imported.

Originally, I wasn't using delayed evaluation, but I thought it might
help, but it doesn't.  I've tried to rebuild my local installation
totally (make clean-go, make clean, then bootstrap from there), but it
doesn't work better.

Thanks if you can help! 

-- 
Best regards,
Nicolas Graves





bug#62589: [PATCH] gnu: nerd-dictation: Factor out wrapper. Add package variants.

2023-04-01 Thread Nicolas Graves via Bug reports for GNU Guix
* gnu/packages/machine-learning.scm (nerd-dictation):
Avoid inputs pulseaudio and ydotool when not necessary.
Factor out wrapper make-nerd-dictation-package.
Add package variants :
- nerd-dictation/xdotool
- nerd-dictation/sox-xdotool
- nerd-dictation/sox-ydotool
- nerd-dictation/sox-wtype
---
 gnu/packages/machine-learning.scm | 88 +--
 1 file changed, 60 insertions(+), 28 deletions(-)

diff --git a/gnu/packages/machine-learning.scm 
b/gnu/packages/machine-learning.scm
index 6c78b14fc6..16a5c1a7c4 100644
--- a/gnu/packages/machine-learning.scm
+++ b/gnu/packages/machine-learning.scm
@@ -17,6 +17,7 @@
 ;;; Copyright © 2020 Edouard Klein 
 ;;; Copyright © 2020, 2021, 2022, 2023 Vinicius Monego 
 ;;; Copyright © 2020, 2021, 2022, 2023 Maxim Cournoyer 

+;;; Copyright © 2022, 2023 Nicolas Graves 
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -63,6 +64,7 @@ (define-module (gnu packages machine-learning)
   #:use-module (gnu packages cran)
   #:use-module (gnu packages databases)
   #:use-module (gnu packages dejagnu)
+  #:use-module (gnu packages freedesktop)
   #:use-module (gnu packages gcc)
   #:use-module (gnu packages gettext)
   #:use-module (gnu packages gl)
@@ -106,6 +108,7 @@ (define-module (gnu packages machine-learning)
   #:use-module (gnu packages xml)
   #:use-module (gnu packages xdisorg)
   #:use-module (gnu packages xorg)
+  #:use-module (srfi srfi-45)
   #:use-module (ice-9 match))
 
 (define-public fann
@@ -3864,7 +3867,6 @@ (define-public nerd-dictation
(add-after 'unpack 'chdir
  (lambda _ (chdir "package/python"))
   (propagated-inputs (list python-vosk))
-  (inputs (list pulseaudio xdotool))
   (home-page "https://github.com/ideasman42/nerd-dictation;)
   (synopsis "Offline speech-to-text for desktop Linux")
   (description "\
@@ -3876,38 +3878,68 @@ (define-public nerd-dictation
 @code{nerd-dictation begin} and @code{nerd-dictation end} commands.")
   (license license:gpl3+
 
-(define-public nerd-dictation/wayland
-  (package
-(inherit nerd-dictation)
-(name "nerd-dictation-wayland")
-(inputs (list bash-minimal nerd-dictation))
-(propagated-inputs (list ydotool sox))
-(build-system trivial-build-system)
-(arguments
- (list
-  #:modules '((guix build utils))
-  #:builder
-  #~(begin
-  (use-modules (guix build utils))
-  (let* ((exe (string-append #$output "/bin/nerd-dictation"))
- (original-exe #$(file-append nerd-dictation
-  "/bin/nerd-dictation"))
- (bash #$(this-package-input "bash-minimal"))
- (bash-exe (string-append bash "/bin/bash")))
-(mkdir-p (dirname exe))
-(call-with-output-file exe
-  (lambda (port)
-(format port "#!~a
+(define* (make-nerd-dictation-package
+  input-tool output-tool
+  #:key (nerd-dictation-package nerd-dictation))
+  "Construct a nerd-dictation package for OUTPUT-TOOL."
+  (match-let* (((input-name output-name)
+(map (lambda (tool)
+   (lazy
+(delay (package-name (force tool)
+ (list input-tool output-tool
+(package
+  (inherit nerd-dictation-package)
+  (name (string-append "nerd-dictation-"
+   (if (equal? (force input-name) "sox")
+   "sox-"
+  "")
+   (force output-name)))
+  (build-system trivial-build-system)
+  (arguments
+   (list
+#:modules '((guix build utils))
+#:builder
+#~(begin
+(use-modules (guix build utils))
+(let* ((exe (string-append #$output "/bin/nerd-dictation"))
+   (original-exe #$(file-append
+(this-package-input "nerd-dictation")
+"/bin/nerd-dictation"))
+   (bash #$(this-package-input "bash-minimal"))
+   (bash-exe (string-append bash "/bin/bash")))
+  (mkdir-p (dirname exe))
+  (call-with-output-file exe
+(lambda (port)
+  (format port "#!~a
 if [ \"$1\" = begin ]
   then
-exec ~a $@ --input=SOX --simulate-input-tool=YDOTOOL
+exec ~a $@ --input=~a --simulate-input-tool=~a
   else
 exec ~a $@
 fi"
-bash-exe
-original-exe
-original-exe)))
-(chmod exe #o555)))
+  bash-exe
+  original-exe
+  (if (equal? #$(force input-name) "pulseaudio")
+  "parec"
+  (string-upcase #$(force input-name)))
+  (string-upcase #$(force output-name))
+  

bug#62589: [PATCH] gnu: nerd-dictation: Factor out wrapper. Add package variants.

2023-04-01 Thread Nicolas Graves via Bug reports for GNU Guix
* gnu/packages/machine-learning.scm (nerd-dictation):
Avoid inputs pulseaudio and ydotool when not necessary.
Factor out wrapper make-nerd-dictation-package.
Add package variants :
- nerd-dictation/xdotool
- nerd-dictation/sox-xdotool
- nerd-dictation/sox-ydotool
- nerd-dictation/sox-wtype
---
 gnu/packages/machine-learning.scm | 97 ++-
 1 file changed, 69 insertions(+), 28 deletions(-)

diff --git a/gnu/packages/machine-learning.scm 
b/gnu/packages/machine-learning.scm
index 6c78b14fc6..4383f3fef3 100644
--- a/gnu/packages/machine-learning.scm
+++ b/gnu/packages/machine-learning.scm
@@ -17,6 +17,7 @@
 ;;; Copyright © 2020 Edouard Klein 
 ;;; Copyright © 2020, 2021, 2022, 2023 Vinicius Monego 
 ;;; Copyright © 2020, 2021, 2022, 2023 Maxim Cournoyer 

+;;; Copyright © 2022, 2023 Nicolas Graves 
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -63,6 +64,7 @@ (define-module (gnu packages machine-learning)
   #:use-module (gnu packages cran)
   #:use-module (gnu packages databases)
   #:use-module (gnu packages dejagnu)
+  #:use-module (gnu packages freedesktop)
   #:use-module (gnu packages gcc)
   #:use-module (gnu packages gettext)
   #:use-module (gnu packages gl)
@@ -3864,7 +3866,6 @@ (define-public nerd-dictation
(add-after 'unpack 'chdir
  (lambda _ (chdir "package/python"))
   (propagated-inputs (list python-vosk))
-  (inputs (list pulseaudio xdotool))
   (home-page "https://github.com/ideasman42/nerd-dictation;)
   (synopsis "Offline speech-to-text for desktop Linux")
   (description "\
@@ -3876,38 +3877,78 @@ (define-public nerd-dictation
 @code{nerd-dictation begin} and @code{nerd-dictation end} commands.")
   (license license:gpl3+
 
-(define-public nerd-dictation/wayland
-  (package
-(inherit nerd-dictation)
-(name "nerd-dictation-wayland")
-(inputs (list bash-minimal nerd-dictation))
-(propagated-inputs (list ydotool sox))
-(build-system trivial-build-system)
-(arguments
- (list
-  #:modules '((guix build utils))
-  #:builder
-  #~(begin
-  (use-modules (guix build utils))
-  (let* ((exe (string-append #$output "/bin/nerd-dictation"))
- (original-exe #$(file-append nerd-dictation
-  "/bin/nerd-dictation"))
- (bash #$(this-package-input "bash-minimal"))
- (bash-exe (string-append bash "/bin/bash")))
-(mkdir-p (dirname exe))
-(call-with-output-file exe
-  (lambda (port)
-(format port "#!~a
+(define (nerd-dictation-gexp input-name output-name bash nerd-dictation)
+  #~(begin
+  (use-modules (guix build utils))
+  (let* ((exe (string-append %output "/bin/nerd-dictation"))
+ (nerd-dictation-exe
+  #$(file-append nerd-dictation "/bin/nerd-dictation")))
+(mkdir-p (dirname exe))
+(call-with-output-file exe
+  (lambda (port)
+(format port "#!~a
 if [ \"$1\" = begin ]
   then
-exec ~a $@ --input=SOX --simulate-input-tool=YDOTOOL
+exec ~a $@ --input=~a --simulate-input-tool=~a
   else
 exec ~a $@
 fi"
-bash-exe
-original-exe
-original-exe)))
-(chmod exe #o555)))
+#$(file-append bash "/bin/bash")
+nerd-dictation-exe
+#$input-name
+#$output-name
+nerd-dictation-exe)))
+(chmod exe #o555
+
+(define-public nerd-dictation/xdotool
+  (package
+(inherit nerd-dictation)
+(name "nerd-dictation-xdotool")
+(build-system trivial-build-system)
+(arguments (list
+#:modules '((guix build utils))
+#:builder
+(nerd-dictation-gexp "PAREC" "XDOTOOL"
+ (this-package-input "bash-minimal")
+ (this-package-input "nerd-dictation"
+(inputs (list bash-minimal nerd-dictation))
+(propagated-inputs (list pulseaudio xdotool
+
+(define-public nerd-dictation/sox-xdotool
+  (package
+(inherit nerd-dictation/xdotool)
+(name "nerd-dictation-sox-xdotool")
+(arguments (list
+#:modules '((guix build utils))
+#:builder
+(nerd-dictation-gexp "SOX" "XDOTOOL"
+ (this-package-input "bash-minimal")
+ (this-package-input "nerd-dictation"
+(propagated-inputs (list sox xdotool
+
+(define-public nerd-dictation/sox-ydotool
+  (package
+(inherit nerd-dictation/xdotool)
+(name "nerd-dictation-sox-ydotool")
+(arguments (list
+#:modules '((guix build utils))
+#:builder
+(nerd-dictation-gexp "SOX" "YDOTOOL"
+ 

bug#62589: Help with patch with delayed evaluation

2023-04-01 Thread Nicolas Graves via Bug reports for GNU Guix
On 2023-04-01 12:58, Nicolas Graves wrote:

> On 2023-04-01 12:28, Ludovic Courtès wrote:
>
>> Hi,
>>
>> Nicolas Graves  skribis:
>>
>>> +(define* (make-nerd-dictation-package
>>> +  input-tool output-tool
>>> +  #:key (nerd-dictation-package nerd-dictation))
>>> +  "Construct a nerd-dictation package for OUTPUT-TOOL."
>>> +  (match-let* (((input-name output-name)
>>> +(map (lambda (tool)
>>> +   (lazy
>>> +(delay (package-name (force tool)
>>> + (list input-tool output-tool
>>> +(package
>>> +  (inherit nerd-dictation-package)
>>> +  (name (string-append "nerd-dictation-"
>>> +   (if (equal? (force input-name) "sox")
>>> +   "sox-"
>>> +  "")
>>> +   (force output-name)))
>>
>> I don’t understand the details of what the patch does, but as a rule of
>> thumb, make sure you only ever inherit from packages defined in the same
>> module.
>
> The patch defines a helper for defining variants of nerd-dictation. It
> now supports wtype and I wasn't totally satisfied by international
> support for ydotool, so I wanted to switch, but copying it make a lot of
> repeated code.
>
> I already defined such a helper with Liliana Marie Prinkler with
> make-emacs-eval-in-repl, but this time I don't understand this error.
>
> Josselin was suggesting a module import cycle, (gnu packages
> machine-learning) is imported in (gnu packages audio), the error might
> come from there. 
>
>>
>> Perhaps that’s what was going wrong?
>
> I've tried inheriting from the above package direclty, doesn't seem to
> be that.
>
>>
>> HTH,
>> Ludo’.

After thinking and experimenting, I think what I'm trying to do is not
possible in this file. This is for a record if someone has the same kind
of issue in the future. 

When I include sox or wtype as a regular input, it works fine. But it
doesn't work when called from another function, I think the issue is
indeed the same as when inheriting from a package.

Now, there is the counterexample of the make-emacs-eval-in-repl
function. IIUC, this example works with delayed evaluation because all
the packages it calls are defined *in the same file*. To test this, on
way could be to test inheritance on a package defined in the same file
but after the inheriting package definition. IIRC, it doesn't work, but
might when using delayed evaluation.

This aside, the packages I'm trying to load are outside the file, and
this is probably the reason why it works for make-emacs-eval-in-repl and
not this function.

I will try to circumvent the issue by factorising less, maybe just the
gexp, but not propagated-inputs. 

-- 
Best regards,
Nicolas Graves





bug#64593: [PATCH] image: Add mbr-raw-image-type and use by default.

2023-07-27 Thread Nicolas Graves via Bug reports for GNU Guix
On 2023-07-27 18:35, Josselin Poiret via Bug reports for wrote:

> From: Josselin Poiret 
>
> * gnu/system/image.scm (mbr-disk-image, mbr-raw-image-type): New variables.
> * guix/scripts/system.scm (%default-options): Use mbr-raw-image-type by
> default.
> ---
>
> How about this for now?  I think the bootloader/image-type situation is not
> clear, but at least this keeps the behavior of the previous default option.

I can confirm that this works for my particular issue of failure when running
guix system image --expression="(@(gnu system install) installation-os)".

-- 
Best regards,
Nicolas Graves





bug#69182: home-xmodmap-service-type requires restart to work

2024-02-19 Thread Nicolas Graves via Bug reports for GNU Guix


Maybe that's because x11-display take a few milliseconds to start, and
that xmodmap actually starts before x11-display is actually done
loading.

I've encountered this type of issue with emacs-server, where I used this
solution on RDE, but it's emacs/service specific :
https://lists.sr.ht/~abcdw/rde-devel/patches/48753

I can't help you more, I don't use x11 anymore, but if that's the issue,
maybe go through the x11 documentation, find if you can start it with a
pid file, and if that's the case, you can try using a background
shepherd process waiting for the pid-file instead of a foreground one.

-- 
Best regards,
Nicolas Graves





bug#57868: GStreamer gst_gstsystemclock test fails on CI for i686

2023-12-26 Thread Nicolas Graves via Bug reports for GNU Guix
On 2023-12-25 19:00, Nicolas Graves wrote:

> Hi Marius,
>
> I think a similar issue also happens on x86_64. For some reason, the
> binary is available through guix weather, but I'm unable to build the
> package locally (with --check). Can you confirm it's not just on my
> side?

Sorry it's not the gst_gstsystemclock but rather the
libs_gstnetclientclock that fails consistently. You can ignore the patch
sent. 

>  
> I'm going to send a patch which basically adds this phase for all
> platforms after this email, I'll be using this locally. 
>
> Cheers,
> Nicolas 
>
>
> On 2022-09-17 00:30, Marius Bakke wrote:
>
>> Hi,
>>
>> On i686-linux, the gstreamer gst_gstsystemclock test is failing:
>>
>> --8<---cut here---start->8---
>>  41/108 gst_gstsystemclockFAIL1.26s   exit status 2
> GST_PLUGIN_SYSTEM_PATH_1_0='' CK_DEFAULT_TIMEOUT=600 
> GST_STATE_IGNORE_ELEMENTS='' MALLOC_PERTURB_=230 
> GST_PLUGIN_SCANNER_1_0=/tmp/guix-build-gstreamer-1.20.3.drv-0/build/libs/gst/helpers/gst-plugin-scanner
>  GST_PLUGIN_LOADING_WHITELIST=gstreamer 
> GST_REGISTRY=/tmp/guix-build-gstreamer-1.20.3.drv-0/build/tests/check/gst_gstsystemclock.registry
>  GST_PLUGIN_PATH_1_0=/tmp/guix-build-gstreamer-1.20.3.drv-0/build 
> /tmp/guix-build-gstreamer-1.20.3.drv-0/build/tests/check/gst_gstsystemclock
>> ? ?  
>> ?
>> stdout:
>> Running suite(s): GstSystemClock
>> 75%: Checks: 8, Failures: 0, Errors: 2
>> ../gstreamer-1.20.3/tests/check/gst/gstsystemclock.c:263:E:waiting:test_stress_cleanup_unschedule:0:
>>  (after this point) Received signal 5 (Trace/breakpoint trap)
>> ../gstreamer-1.20.3/tests/check/gst/gstsystemclock.c:263:E:waiting:test_stress_reschedule:0:
>>  (after this point) Received signal 5 (Trace/breakpoint trap)
>> Check suite gst_systemclock ran in 1.236s (tests failed: 2)
>> stderr:
>>
>> (gst_gstsystemclock:5546): GLib-ERROR **: 22:57:16.217: creating thread 
>> 'wait': Error creating thread: Resource temporarily unavailable
>>
>> (gst_gstsystemclock:6027): GLib-ERROR **: 22:57:16.340: creating thread 
>> 'wait': Error creating thread: Resource temporarily unavailable
>> ??
>> --8<---cut here---end--->8---
>>
>> Full log output here:
>>
>>   https://ci.guix.gnu.org/build/1305526/log/raw
>>
>> I'm not able to reproduce this locally.  Any idea what might be going on
>> here?  Parallelism issue?
>>
>> Note: we have disabled these tests on i686 for a long time, but they
>> were recently enabled again on 'staging'.  I'll re-apply that hunk to
>> disable the test, but wanted to have an issue to link to.
>>
>>
>>

-- 
Best regards,
Nicolas Graves





bug#57868: GStreamer gst_gstsystemclock test fails on CI for i686

2023-12-25 Thread Nicolas Graves via Bug reports for GNU Guix


Hi Marius,

I think a similar issue also happens on x86_64. For some reason, the
binary is available through guix weather, but I'm unable to build the
package locally (with --check). Can you confirm it's not just on my
side?
 
I'm going to send a patch which basically adds this phase for all
platforms after this email, I'll be using this locally. 

Cheers,
Nicolas 


On 2022-09-17 00:30, Marius Bakke wrote:

> Hi,
>
> On i686-linux, the gstreamer gst_gstsystemclock test is failing:
>
> --8<---cut here---start->8---
>  41/108 gst_gstsystemclockFAIL1.26s   exit status 2
 GST_PLUGIN_SYSTEM_PATH_1_0='' CK_DEFAULT_TIMEOUT=600 
 GST_STATE_IGNORE_ELEMENTS='' MALLOC_PERTURB_=230 
 GST_PLUGIN_SCANNER_1_0=/tmp/guix-build-gstreamer-1.20.3.drv-0/build/libs/gst/helpers/gst-plugin-scanner
  GST_PLUGIN_LOADING_WHITELIST=gstreamer 
 GST_REGISTRY=/tmp/guix-build-gstreamer-1.20.3.drv-0/build/tests/check/gst_gstsystemclock.registry
  GST_PLUGIN_PATH_1_0=/tmp/guix-build-gstreamer-1.20.3.drv-0/build 
 /tmp/guix-build-gstreamer-1.20.3.drv-0/build/tests/check/gst_gstsystemclock
> ? ?  ?
> stdout:
> Running suite(s): GstSystemClock
> 75%: Checks: 8, Failures: 0, Errors: 2
> ../gstreamer-1.20.3/tests/check/gst/gstsystemclock.c:263:E:waiting:test_stress_cleanup_unschedule:0:
>  (after this point) Received signal 5 (Trace/breakpoint trap)
> ../gstreamer-1.20.3/tests/check/gst/gstsystemclock.c:263:E:waiting:test_stress_reschedule:0:
>  (after this point) Received signal 5 (Trace/breakpoint trap)
> Check suite gst_systemclock ran in 1.236s (tests failed: 2)
> stderr:
>
> (gst_gstsystemclock:5546): GLib-ERROR **: 22:57:16.217: creating thread 
> 'wait': Error creating thread: Resource temporarily unavailable
>
> (gst_gstsystemclock:6027): GLib-ERROR **: 22:57:16.340: creating thread 
> 'wait': Error creating thread: Resource temporarily unavailable
> ??
> --8<---cut here---end--->8---
>
> Full log output here:
>
>   https://ci.guix.gnu.org/build/1305526/log/raw
>
> I'm not able to reproduce this locally.  Any idea what might be going on
> here?  Parallelism issue?
>
> Note: we have disabled these tests on i686 for a long time, but they
> were recently enabled again on 'staging'.  I'll re-apply that hunk to
> disable the test, but wanted to have an issue to link to.
>
>
>

-- 
Best regards,
Nicolas Graves





bug#57868: [PATCH] gnu: gstreamer: Phase disable-systemclock-test on all platforms.

2023-12-25 Thread Nicolas Graves via Bug reports for GNU Guix
* gnu/packages/gstreamer.scm (gstreamer):
[arguments]: Enable phase disable-systemclock-test on all platforms.

Change-Id: I346934acab66f7a33a9cea6500c8557509b05d95
---
 gnu/packages/gstreamer.scm | 19 +++
 1 file changed, 7 insertions(+), 12 deletions(-)

diff --git a/gnu/packages/gstreamer.scm b/gnu/packages/gstreamer.scm
index 71f8e3453a..3608576830 100644
--- a/gnu/packages/gstreamer.scm
+++ b/gnu/packages/gstreamer.scm
@@ -477,20 +477,15 @@ (define-public gstreamer
#:phases
#~(modify-phases %standard-phases
#$@%common-gstreamer-phases
-   #$@(if (string-prefix? "i686" (or (%current-target-system)
- (%current-system)))
-  ;; FIXME: These tests consistently fail in the Guix CI:
-  ;;   https://issues.guix.gnu.org/57868
-  '((add-after 'unpack 'disable-systemclock-test
-  (lambda _
-(substitute* "tests/check/gst/gstsystemclock.c"
-  (("tcase_add_test \\(tc_chain, \
+   (add-after 'unpack 'disable-systemclock-test
+ (lambda _
+   (substitute* "tests/check/gst/gstsystemclock.c"
+ (("tcase_add_test \\(tc_chain, \
 test_stress_cleanup_unschedule.*")
-   "")
-  (("tcase_add_test \\(tc_chain, \
+  "")
+ (("tcase_add_test \\(tc_chain, \
 test_stress_reschedule.*")
-   "")
-  '())
+  ""
(add-after 'patch-shebangs 'do-not-capture-python
  (lambda _
;; The patch-source-shebangs phase causes the following 
build
-- 
2.41.0






bug#62656: close 62656

2024-02-04 Thread Nicolas Graves via Bug reports for GNU Guix


Issue fixed.

-- 
Best regards,
Nicolas Graves





bug#53342: close 53342

2024-02-04 Thread Nicolas Graves via Bug reports for GNU Guix


Obsolete.

-- 
Best regards,
Nicolas Graves





bug#62217: Ungoogled-chromium doesn't launch with linux 6.2

2024-05-10 Thread Nicolas Graves via Bug reports for GNU Guix


I don't experience the issue anymore, closing it.

On 2023-03-17 13:49, Maxim Cournoyer wrote:

> Hi,
>
> Jack Hill  writes:
>
>> On Thu, 16 Mar 2023, Nicolas Graves via Bug reports for GNU Guix wrote:
>>
>>> "/gnu/store/1jmlqw987ifnb3abr0s2hvihcg1n2xmx-ungoogled-chromium-wayland-109.0.5414.119-1/bin/chromium":
>>> not in executable format: file format not recognized
>>
>> I've run into this message in the past when my store got corrupted (in
>> my case it was a full disk on a computer that has other evil spirits
>> living in it as well). Can you check with `guix gc --verify=contents`?
>> If it reports anything, you might be able to repair it with `sudo guix
>> gc --verify=contents,repair`.
>
> I believe the error is because chromium is a shell script wrapper and
> not an ELF binary.
>
> I used the following script for those:
>
> --8<---cut here---start->8---
> $ cat ~/.local/bin/run-gdb
> #!/usr/bin/env bash
>
> (
> wrapper=$(cat $(which $1))
> shift
> . <(echo "$wrapper" | grep ^export)
> binary=$(echo "$wrapper" | grep ^exec | grep -o -E '/gnu/store[^"]*')
> gdb --args "$binary" "$@"
> )
> --8<---cut here---end--->8---
>
> Then you can do:
>
> --8<---cut here---start->8---
> run-gdb chromium
> --8<---cut here---end--->8---
>
> Hope that helps,

-- 
Best regards,
Nicolas Graves





bug#70886: Packaging a gradle application

2024-05-12 Thread Nicolas Graves via Bug reports for GNU Guix


Hi Noé,

Regarding Gradle, IIRC, the main hinderance to get that into Guix is the
extremely costly bootstrap process through which its building blocks (in
particular recent Kotlin versions) can be built. 

The work on this is mainly done by Julien Lepiller in channel
guix-android :
https://framagit.org/tyreunom/guix-android/-/blob/master/android/packages/kotlin.scm

He managed to get kotlin v1.0.0 to work but there was another
hurdle IIRC, I can't tell you more, but maybe Julien can.

There's still quite some work to do before we're able to write and use a
gradle-build-system. If you have a lot of computer power, don't hesitate
to take a look there.

There's also more info disseminated in the mailing list.

-- 
Best regards,
Nicolas Graves





bug#25235: [Maxim Cournoyer] bug#25235: [PATCH v3 1/1] build-system/pyproject: Do not wrap native-inputs.

2024-05-01 Thread Nicolas Graves via Bug reports for GNU Guix


Hi Lars, Ricardo,

I'm advancing with my patch series, which I can submit soon. I was
curious about why this 25235 patch isn't in python-team branch yet since
it's also a very welcome change to the pyproject-build-system.

Cheers,

Nicolas

 Start of forwarded message 
Subject: bug#25235: [PATCH v3 1/1] build-system/pyproject: Do not wrap
 native-inputs.
To: 25...@debbugs.gnu.org
Cc: arunis...@systemreboot.net, Maxim Cournoyer ,
 l...@gnu.org, Lars-Dominik Braun , efr...@flashner.co.il,
 rek...@elephly.net, jgart , mar...@gnu.org
From: Maxim Cournoyer 
Date: Mon, 23 Jan 2023 08:34:33 -0500

Fixes .

* guix/build/pyproject-build-system.scm (wrap) [native-inputs]: New argument.
Filter out native inputs from the values in GUIX_PYTHONPATH.

---

Changes in v3:
- Rebase

Changes in v2:
- Add missing copyright line
- Rework wrap phase to avoid removing inputs found in both native-inputs and 
inputs
- Enclose wrap computations in an 'unless' form and streamline

 guix/build/pyproject-build-system.scm | 39 ---
 1 file changed, 24 insertions(+), 15 deletions(-)

diff --git a/guix/build/pyproject-build-system.scm 
b/guix/build/pyproject-build-system.scm
index a66c1fb34a..9da86bfc54 100644
--- a/guix/build/pyproject-build-system.scm
+++ b/guix/build/pyproject-build-system.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2021 Lars-Dominik Braun 
 ;;; Copyright © 2022 Marius Bakke 
+;;; Copyright © 2023 Maxim Cournoyer 
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -445,7 +446,7 @@ (define* (add-install-to-pythonpath #:key native-inputs 
outputs
   "A phase that just wraps the 'add-installed-pythonpath' procedure."
   (add-installed-pythonpath native-inputs outputs))
 
-(define* (wrap #:key inputs outputs #:allow-other-keys)
+(define* (wrap #:key native-inputs inputs outputs #:allow-other-keys)
   (define (list-of-files dir)
 (find-files dir (lambda (file stat)
   (and (eq? 'regular (stat:type stat))
@@ -458,20 +459,28 @@ (define bindirs
  (string-append dir "/sbin"
 outputs))
 
-  ;; Do not require "guile" to be present in the package inputs
-  ;; even when there is nothing to wrap.
-  ;; Also, calculate (guile) only once to prevent some I/O.
-  (define %guile (delay (search-input-file inputs "bin/guile")))
-  (define (guile) (force %guile))
-
-  (let* ((var `("GUIX_PYTHONPATH" prefix
-,(search-path-as-string->list
-  (or (getenv "GUIX_PYTHONPATH") "")
-(for-each (lambda (dir)
-(let ((files (list-of-files dir)))
-  (for-each (cut wrap-script <> #:guile (guile) var)
-files)))
-  bindirs)))
+  (unless (null? bindirs)
+(let* ((guile (search-input-file inputs "bin/guile"))
+   (native-input-dirs (match native-inputs
+(((_ . dir) ...)
+ dir)))
+   (input-dirs (match inputs
+ (((_ . dir) ...)
+  dir)))
+   (build-inputs (lset-difference string=? native-input-dirs
+  input-dirs))
+   ;; A build input is an input listed in native-inputs and NOT in
+   ;; inputs.
+   (build-input? (lambda (x)
+   (any (cut string-prefix? <> x) build-inputs)))
+   (var `("GUIX_PYTHONPATH" prefix
+  ,(remove build-input? (search-path-as-string->list
+ (or (getenv "GUIX_PYTHONPATH") 
""))
+  (for-each (lambda (dir)
+  (let ((files (list-of-files dir)))
+(for-each (cut wrap-script <> #:guile guile var)
+  files)))
+bindirs
 
 (define* (rename-pth-file #:key name native-inputs outputs #:allow-other-keys
   #:rest args)
-- 
2.39.1




 End of forwarded message 

-- 
Best regards,
Nicolas Graves





bug#28084: lilypond, fontforge are not reproducible

2024-05-10 Thread Nicolas Graves via Bug reports for GNU Guix


`guix challenge lilypond` now seems to pass, and "Created by FontForge
..." strings in emmentaler-*.svg files indeed indicate 1st Jan 1970.

I guess we can close the issue @Zimoun?

-- 
Best regards,
Nicolas Graves





bug#69465: "unbound variable" but it's not?

2024-03-03 Thread Nicolas Graves via Bug reports for GNU Guix


rust-objc-0.2 seems to be in (gnu packages crates-apple) now.


On 2024-03-03 01:51, Nathan Dehnel wrote:

> I'm now getting this from a new package I wrote with a jack2 import. I
> think my whole channel is hosed somehow and I can't add any new
> packages to it.
>
> Backtrace:
> In guix/repl.scm:
>141:4 19 (machine-repl _ _)
>126:7 18 (_)
> In ice-9/boot-9.scm:
>  1747:15 17 (with-exception-handler # ?)
>  1752:10 16 (with-exception-handler _ _ #:unwind? _ # _)
> In guix/repl.scm:
>99:21 15 (_)
> In unknown file:
>  14 (_ # ?)
>  13 (primitive-load "/gnu/store/b82ry641ki1xkmhm49archdpghy?")
> In ice-9/boot-9.scm:
>  1752:10 12 (with-exception-handler _ _ #:unwind? _ # _)
> In gnu/packages.scm:
>   439:11 11 (generate-package-cache _)
> In srfi/srfi-1.scm:
>   460:18 10 (fold # _ _)
> In gnu/packages.scm:
>   399:37  9 (expand-cache . _)
> In guix/packages.scm:
>  1378:17  8 (supported-package? # ?)
> In guix/memoization.scm:
>101:0  7 (_ # # ?)
> In guix/packages.scm:
>  1356:39  6 (_)
>  1618:16  5 (package->bag _ _ _ #:graft? _)
>  1719:48  4 (thunk)
> In gooby-channel/packages/jamulus.scm:
>60:18  3 (inputs #)
> In ice-9/boot-9.scm:
>  1685:16  2 (raise-exception _ #:continuable? _)
>  1780:13  1 (_ #< components: (#)
> In unknown file:
>   0 (backtrace #)
>
> (exception unbound-variable (value #f) (value "Unbound variable: ~S")
> (value (jack2)) (value #f))
>
>
> On Wed, Feb 28, 2024 at 11:49 PM Nathan Dehnel  wrote:
>>
>> "unbound variable" for rust-objc-0.2 but I see nothing wrong with it.
>> package made with guix import
>>
>> during guix pull:
>>
>> Generating package cache for
>> '/gnu/store/cyh6zz1x9br8p8rv0mszwvi76pb95fh6-profile'...
>>
>> Backtrace:
>> (repl-version 0 1 1)
>> Generating package cache for
>> '/gnu/store/asq2jgvil9n9grm8jb3ia2ypbkgvpcn3-profile'...
>> WARNING: (gooby-channel packages osandov-linux): `zlib' imported from
>> both (guix licenses) and (gnu packages compression)
>>
>> Backtrace:
>> In guix/repl.scm:
>>141:4 19 (machine-repl _ _)
>>126:7 18 (_)
>> In ice-9/boot-9.scm:
>>  1747:15 17 (with-exception-handler # ?)
>>  1752:10 16 (with-exception-handler _ _ #:unwind? _ # _)
>> In guix/repl.scm:
>>99:21 15 (_)
>> In unknown file:
>>  14 (_ # ?)
>>  13 (primitive-load "/gnu/store/1vn5x4lh4mpyjm13cykmsb8aacb?")
>> In ice-9/boot-9.scm:
>>  1752:10 12 (with-exception-handler _ _ #:unwind? _ # _)
>> In gnu/packages.scm:
>>   439:11 11 (generate-package-cache _)
>> In srfi/srfi-1.scm:
>>   460:18 10 (fold # _ _)
>> In gnu/packages.scm:
>>   399:37  9 (expand-cache . _)
>> In guix/packages.scm:
>>  1378:17  8 (supported-package? # ?)
>> In guix/memoization.scm:
>>101:0  7 (_ # # ?)
>> In guix/packages.scm:
>>  1356:39  6 (_)
>>  1618:16  5 (package->bag _ _ _ #:graft? _)
>>  1723:43  4 (thunk)
>> In gooby-channel/packages/test.scm:
>>39:37  3 (arguments #)
>> In ice-9/boot-9.scm:
>>  1685:16  2 (raise-exception _ #:continuable? _)
>>  1780:13  1 (_ #< components: (#)
>> In unknown file:
>>   0 (backtrace #)
>>
>> (exception unbound-variable (value #f) (value "Unbound variable: ~S")
>> (value (rust-objc-0.2)) (value #f))
>>
>> (define-module (gooby-channel packages test)
>>   #:use-module (guix packages)
>>   #:use-module (gnu packages)
>>   #:use-module (guix build-system cargo)
>>   #:use-module ((guix licenses) #:prefix license:)
>>   #:use-module (guix git-download)
>>   #:use-module (guix download)
>>   #:use-module (gnu packages crates-io)
>>   #:use-module (gnu packages crates-graphics)
>>   #:use-module (gnu packages crypto)
>> )
>>
>> (define-public rust-eframe-0.26
>>   (package
>> (name "rust-eframe")
>> (version "0.26.2")
>> (source
>>  (origin
>>(method url-fetch)
>>(uri (crate-uri "eframe" version))
>>(file-name (string-append name "-" version ".tar.gz"))
>>(sha256
>> (base32 "0vzjpm6kmqnnyhsvm4gq7yi7033m7mq88x15h2vnigqkdnxw2mn4"
>> (build-system cargo-build-system)
>> (arguments
>>  `(#:skip-build? #t
>>#:cargo-inputs (
>>("rust-objc" ,rust-objc-0.2)
>>
>> )
>> ))
>> (home-page "https://github.com/emilk/egui/tree/master/crates/eframe;)
>> (synopsis
>>  "egui framework - write GUI apps that compiles to web and/or natively")
>> (description
>>  "egui framework - write GUI apps that compiles to web and/or natively")
>> (license (list license:expat license:asl2.0
>
>
>

-- 
Best regards,
Nicolas Graves





bug#71332: guix gc delete order

2024-06-03 Thread Nicolas Graves via Bug reports for GNU Guix
On 2024-06-03 09:30, Guillaume Le Vaillant wrote:

> Hi.
> Is the guix-daemon of your system started with the
> "--gc-keep-derivations=yes" and "--gc-keep-outputs=yes" options?
> It should prevent "guix gc" from deleting the build dependencies of live
> profiles.

Probably not if they have to be added through the extra-options field of
 record. I'll try that, thanks! 

-- 
Best regards,
Nicolas Graves





bug#71332: guix gc delete order

2024-06-03 Thread Nicolas Graves via Bug reports for GNU Guix


Hi Guix,

I feel the way `guix gc` choose its files to delete quite
inconvenient. For instance, when developping big programs locally, I
often find myself missing space, but when I will `guix gc -C30G`,
instead of the expected unused items (not present in any profile, just
built but discarded as the package I'm building is updated for
instance), I will instead loose most of the native-inputs that are
needed to build my `guix home` and `guix system`.

This make me stuck in an endless loop of removing / redownloading over
and over the same native-inputs, while my intention is first to remove
files that aren't these native-inputs.

I haven't delved into `guix gc` yet, how hard is that issue to solve? 

-- 
Best regards,
Nicolas Graves