Unix & Linux Stack Exchange
Q&A for users of Linux, FreeBSD and other Unix-like operating systems
Latest Questions
3
votes
2
answers
854
views
How to get Guix perfect setup to work
The official Guix documentation describes [The Perfect Setup](https://guix.gnu.org/manual/en/html_node/The-Perfect-Setup.html) for hacking on Guix. I have followed this description and set up everything like described, but still Geiser does not work fully. I thought that this was supposed to give me...
The official Guix documentation describes [The Perfect Setup](https://guix.gnu.org/manual/en/html_node/The-Perfect-Setup.html) for hacking on Guix.
I have followed this description and set up everything like described, but still Geiser does not work fully. I thought that this was supposed to give me completion capabilities and make it possible to go to the definition of things. I can go to definition of some things, but only very few. Most things is not possible. Completion seems to be only based on text in the current buffer.
# My Emacs configurations
(use-package geiser
:ensure t
:custom
(geiser-default-implementation 'guile)
(geiser-active-implementations '(guile))
(geiser-implementations-alist '(((regexp "\\.scm$") guile))))
(use-package geiser-guile
:ensure t
:config
(add-to-list 'geiser-guile-load-path "/home/lars/code/forks/guix")
(add-to-list 'geiser-guile-load-path "/home/lars/code/guix/modules")
(add-to-list 'geiser-guile-load-path "/home/lars/code/guix"))
(with-eval-after-load "geiser-guile"
(add-to-list 'geiser-guile-load-path "/home/lars/code/forks/guix")
(add-to-list 'geiser-guile-load-path "/home/lars/code/guix/modules")
(add-to-list 'geiser-guile-load-path "/home/lars/code/guix"))
# REPL
I invoke the Geiser REPL in Emacs with M-x geiser-guile
or M-x geiser
.
The output in the Geiser REPL looks like this:
GNU Guile 3.0.9
Copyright (C) 1995-2023 Free Software Foundation, Inc.
Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'.
This program is free software, and you are welcome to redistribute it
under certain conditions; type `,show c' for details.
Enter `,help' for help.
scheme@(guile-user)>
Note that the prompt says guile-user
, but I think it should say guix-user
.
However, if I start the Guix REPL by running guix repl
in a terminal the output looks like this:
GNU Guile 3.0.9
Copyright (C) 1995-2023 Free Software Foundation, Inc.
Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'.
This program is free software, and you are welcome to redistribute it
under certain conditions; type `,show c' for details.
Enter `,help' for help.
scheme@(guix-user)>
Note that here it says guix-user
.
When trying to 'use' the guix
module in Geiser REPL:
,use (guix)
;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0
;;; or pass the --no-auto-compile argument to disable.
;;; compiling /home/lars/code/forks/guix/guix.scm
;;; compiling /home/lars/code/forks/guix/guix/packages.scm
;;; compiling /home/lars/code/forks/guix/guix/utils.scm
;;; WARNING: compilation of /home/lars/code/forks/guix/guix/utils.scm failed:
;;; no code for module (guix config)
;;; WARNING: compilation of /home/lars/code/forks/guix/guix/packages.scm failed:
;;; no code for module (guix config)
;;; compiling /home/lars/code/forks/guix/guix/store.scm
;;; WARNING: compilation of /home/lars/code/forks/guix/guix/store.scm failed:
;;; no code for module (guix config)
;;; WARNING: compilation of /home/lars/code/forks/guix/guix.scm failed:
;;; no code for module (guix config)
;;; compiling /home/lars/code/forks/guix/guix/derivations.scm
;;; compiling /home/lars/code/forks/guix/guix/diagnostics.scm
;;; WARNING: compilation of /home/lars/code/forks/guix/guix/diagnostics.scm failed:
;;; Unbound variable: trivial-format-string?
;;; WARNING: compilation of /home/lars/code/forks/guix/guix/derivations.scm failed:
;;; no code for module (gcrypt hash)
While executing meta-command:
no code for module (gcrypt hash)
scheme@(guile-user)>
Doing the same in a Guix REPL works fine:
scheme@(guix-user)> ,use (guix)
scheme@(guix-user)>
# Go to definition
Go to definition works in some places, for example in the line below:
(gnu home services)
This takes me correctly to the source of gnu home services.
However, trying to go to the definition of packages does not work:
(packages (list
htop
git
alacritty
tmux))
Trying to go to the definition of any of the packages in the package list just does not work.
# Completion
I would expect to be able to get completions for modules and packages (among other things) by typing the start of the name of the packages, but nothing comes. Sometimes I get some random completion based on random text in the same buffer, but most of the time not even that.
lrustand
(41 rep)
Nov 18, 2023, 03:37 PM
• Last activity: Dec 19, 2024, 03:07 PM
0
votes
1
answers
797
views
Guix: How to add an environment variable in a guix.scm file for use with guix shell? Or is it not possible?
[`guix shell`](https://guix.gnu.org/manual/devel/en/html_node/Invoking-guix-shell.html) allows users to create a shell and control what resources are available. How can I use the `guix.scm` file to specify an environment variable in this shell environment? In this specific example, I'm just looking...
[
guix shell
](https://guix.gnu.org/manual/devel/en/html_node/Invoking-guix-shell.html) allows users to create a shell and control what resources are available.
How can I use the guix.scm
file to specify an environment variable in this shell environment?
In this specific example, I'm just looking for a TEST
environment variable with the value 2
.
ChatGPT gave me two suggestions below which did not work, nor are these options defined in the [package
reference](https://guix.gnu.org/manual/en/html_node/package-Reference.html) . Both give me the same error: *extraneous field initializers*.
I also saw [this thread](https://lists.gnu.org/archive/html/help-guix/2022-05/msg00025.html) about the inability to define environment variables in a manifest file and one user said that it should be possible to do with guix.scm
files (or, the type of files passed to guix shell
with --file argument), but I'm not sure if that's correct. I tried the guile [setenv
](https://www.gnu.org/software/guile/manual/html_node/Runtime-Environment.html#index-setenv) Scheme procedure but I get the error: *invalid field specifier*.
Here's an example guix.scm
with the three options I tried at the bottom:
(use-modules
(guix)
(guix build-system gnu)
((guix licenses) #:prefix license:)
(gnu packages bison)
(gnu packages compression)
(gnu packages flex)
(gnu packages m4)
(gnu packages tls)
)
(package
(name "coreboot")
(version "dan")
(source (local-file "." #:recursive? #t))
(build-system gnu-build-system)
(native-inputs
(list
bison
flex
m4
openssl
zlib
)
)
(synopsis "coreboot")
(description "coreboot")
(home-page "https://www.coreboot.org/ ")
(license license:expat)
(shell '(#:variables (,"TEST=2"))) ; Does not work
(environment-variables '("TEST" "2")) ; Does not work
(setenv "TEST" "2") ; Does not work
)
Daniel
(701 rep)
May 19, 2024, 05:47 AM
• Last activity: May 19, 2024, 09:28 AM
5
votes
2
answers
3240
views
How to enable bluetooth in GUIX?
I'm trying to enable Bluetooth on my GUIX machine, and I do not understand [the instructions](https://guix.gnu.org/manual/en/guix.html#index-bluetooth_002dservice): > **Scheme Procedure: bluetooth-service [#:bluez bluez] [#:auto-enable? #f]** > > Return a service that runs the bluetoothd daemon, whi...
I'm trying to enable Bluetooth on my GUIX machine, and I do not understand [the instructions](https://guix.gnu.org/manual/en/guix.html#index-bluetooth_002dservice) :
> **Scheme Procedure: bluetooth-service [#:bluez bluez] [#:auto-enable? #f]**
>
> Return a service that runs the bluetoothd daemon, which manages all the Bluetooth devices and provides a number of D-Bus interfaces.
> When AUTO-ENABLE? is true, the bluetooth controller is powered
> automatically at boot, which can be useful when using a bluetooth
> keyboard or mouse.
>
> Users need to be in the lp group to access the D-Bus service.
In particular, I do not understand the
[#:
part, and thus do not know what to put in my config.scm.
None of the other modifications I've made to config.scm
required such 'arguments' for lack of a better word. For example, extra-special-file
is described simply as
> **Scheme Procedure: extra-special-file file target**
and contains an example and was thus easy to figure out.
This does not work:
(services
(append
(list (service gnome-desktop-service-type)
(service bluetooth-service))
%desktop-services))
reconfigure gives
guix system: error: failed to load 'config.scm':
gnu/services.scm:242:17: In procedure %service-with-default-value:
In procedure struct-vtable: Wrong type argument in position 1 (expecting struct): #
Apparently the #:
is a hash-colon, which is used to define a [keyword in Scheme](https://www.gnu.org/software/guile/manual/guile.html#Keywords) . But that page does not give me enough information to translate the GUIX instructions into something to put in config.scm
.
It feels like the GUIX documentation assumes some Scheme knowledge that I do not yet posses, and I do not really know where to start to obtain. An example would be appreciated.
BlackShift
(313 rep)
Nov 3, 2020, 08:42 PM
• Last activity: Mar 17, 2023, 10:10 AM
2
votes
1
answers
249
views
Enable volume management in Thunar on a Guix System
On my system I have installed both `thunar` and `thunar-volman`: ``` $ guix package --list-installed | grep thunar thunar-volman 0.9.5 out /gnu/store/yp5xyyvvc59ivghszgyfwy3izd8jvqz0-thunar-volman-0.9.5 thunar 1.8.16 out /gnu/store/4hy62y05g34hwrhlyk8vjhka47d5bmhq-thunar-1.8.16 ``` But when volume m...
On my system I have installed both
But
thunar
and thunar-volman
:
$ guix package --list-installed | grep thunar
thunar-volman 0.9.5 out /gnu/store/yp5xyyvvc59ivghszgyfwy3izd8jvqz0-thunar-volman-0.9.5
thunar 1.8.16 out /gnu/store/4hy62y05g34hwrhlyk8vjhka47d5bmhq-thunar-1.8.16
But when volume management is disabled the advanced settings looks like follows:

gvfs
is installed, at least according to the package manager.
$ guix package --list-installed | grep gvfs
gvfs 1.40.1 out /gnu/store/qg1827ai9j5raypmdajw3k7cibsqdykz-gvfs-1.40.1
Is this a packaging issue or, as I think I've read before, is it that Guix hasn't solved how to deal with dynamic dependencies?
Rovanion
(1101 rep)
Dec 27, 2020, 05:45 PM
• Last activity: Jan 23, 2021, 09:58 PM
2
votes
1
answers
1382
views
Why " >/dev/console" for remote beep (echo-command)
I've learned that this command: echo -e "\a" triggers a beep on the local system, whereas this command: echo -e "\a" >/dev/console triggers a beep on a remote system. Why is this? What is the `>/dev/console` part doing? Why is it that executing `echo -e "\a"` on a remote machine triggers the beep lo...
I've learned that this command:
echo -e "\a"
triggers a beep on the local system, whereas this command:
echo -e "\a" >/dev/console
triggers a beep on a remote system.
Why is this? What is the
>/dev/console
part doing?
Why is it that executing echo -e "\a"
on a remote machine triggers the beep locally and not remote ?
Why does "echo" - command don't like sudo ?
Is there a OSI-Layer - like scheme ? Please provide me with some external documentation.
I have only a basic understandig of redirecting stdout/stderr to a file not
much more, but the question more likely refers to how is
"Gnu/Linux/Kernel" designed in order to requiere redirrection to
" > /dev/console" for a remote beep to work out.
Does a remote echo "Hello World"
require a redirection to /dev/console ?
McErroneous
(29 rep)
Jun 7, 2019, 04:45 AM
• Last activity: Jun 7, 2019, 12:52 PM
1
votes
1
answers
163
views
What Scheme implementation am I running?
Given a Scheme shell/interpreter, what command could output its implementation (R5RS, R6RS or whatever). For example, I have mit-scheme installed in a Debian machine. How could I discover what implementation it is? I'm thinking in terms of Python. If you have a Python shell, you can either run `impo...
Given a Scheme shell/interpreter, what command could output its implementation (R5RS, R6RS or whatever).
For example, I have mit-scheme installed in a Debian machine. How could I discover what implementation it is?
I'm thinking in terms of Python. If you have a Python shell, you can either run
import sys
print(sys.version)
to print the version directly, or test it with:
print 'abc'
to see if it runs (it would run in case of Python2).
Joshue An.
(11 rep)
Feb 3, 2019, 02:34 PM
• Last activity: Feb 10, 2019, 03:35 PM
3
votes
1
answers
595
views
Run Scheme one-liner from the command-line
How can I run a Scheme expression from the command-line using neither a script saved in a file, nor starting the interactive shell? The equivalent in Python would be: `python -c "print 1+1"`. `scheme (+ 1 1)` just starts the interactive shell and shows the result inside it.
How can I run a Scheme expression from the command-line using neither a script saved in a file, nor starting the interactive shell?
The equivalent in Python would be:
python -c "print 1+1"
. scheme (+ 1 1)
just starts the interactive shell and shows the result inside it.
Pierre B
(2293 rep)
Mar 9, 2017, 01:46 PM
• Last activity: Jan 5, 2019, 02:16 PM
Showing page 1 of 7 total questions