/r/GUIX
GNU Guix is a purely functional package manager, and associated free software distribution, for the GNU system.
GNU Guix is a purely functional package manager, and associated free software distribution, for the GNU system. In addition to standard package management features, Guix supports transactional upgrades and roll-backs, unprivileged package management, per-user profiles, and garbage collection.
A user-land free software distribution for GNU/Linux comes as part of Guix.
For assistance, see GNU Guix Official Help, where you can find:
/r/GUIX
In the Guix Reference manual, home-files-service-type
expects as argument something like this:
`((".sway/config" ,sway-file-like-object)
(".tmux.conf" ,(local-file "./tmux.conf")))
but when I define it as such:
`((".ssh/config" ,(local-file "../../.ssh/config"))
(".aliases" ,(local-file "../../.aliases")))
the system returns:
guix home: error: invalid name: `.aliases´ (can't begin with a dot)
that seems weird to me -- can't save a dotfile?
EDIT: corrected missing quotation mark.
Hi~
I'm new to guix.
I'm trying to create a Guix package definition (.scm file) for Kime, a Korean input method framework written in Rust (GitHub: https://github.com/Riey/kime). My goal is to replicate the build process of their provided scripts/build.sh -ar script within a Guix package.
However, I'm running into a couple of issues when I try to build the package using guix package -f kime.scm.
Problem 1: "In execvp of cargo: No such file or directory"
I'm getting this error during the cargo-build phase. It seems like cargo isn't being found in the build environment, even though I've included rust and rust-toolchain in native-inputs.
Problem 2: Potential issue with cargo configure phase (if uncommented)
In my kime.scm, I initially tried to explicitly include a configure phase for Cargo (based on my understanding of how build systems work), but when I uncommented the (assoc-ref cargo:%standard-phases 'configure) part in my phases definition, I encountered another error (unfortunately, I didn't save the exact error message for this one, but I can reproduce it if needed). [If you can reproduce the error, it's highly recommended to include it here!]
============
-------
(use-modules (guix)
(guix packages)
(guix git-download)
(guix build-system cmake)
(guix build-system cargo)
(guix build utils)
(guix gexp)
(gnu packages rust)
(gnu packages gcc)
(gnu packages llvm)
(gnu packages crates-io)
(gnu packages crates-gtk)
(gnu packages freedesktop)
(gnu packages pkg-config)
(gnu packages fontutils)
(gnu packages glib)
(gnu packages gtk)
(gnu packages qt)
(gnu packages xorg)
((guix licenses) #:prefix license:)
)
(define kime
(package
(name "kime")
(version "v3.1.1")
(source
(origin
(method git-fetch)
(uri
(git-reference
(url "https://github.com/Riey/kime.git")
(commit "632875f541d8373c90403e74f991d3f5beaeba94")))
(file-name
(git-file-name name version))
(sha256
(base32 "17nk74k3ydlc45djd4p30ws2ybnilskkxvnvha1n4lq9lh9g8idi"))))
(build-system cmake-build-system)
(arguments
(list
#:build-type "Release"
#:imported-modules (append %cargo-build-system-modules ; Import cargo modules
%cmake-build-system-modules) ; Import cmake modules
#:modules
`(((guix build cargo-build-system) #:prefix cargo:) ; Instantiate cargo build system with prefix 'cargo:'
,@%cmake-build-system-modules) ; Include cmake modules
#:configure-flags
#~'( "-DCMAKE_BUILD_TYPE=Release" ; Explicitly state Release build type, though default in build-options
"-DUSE_SYSTEM_ENGINE=OFF" ; Explicitly set to default OFF
"-DENABLE_GTK3=ON"
"-DENABLE_GTK4=ON"
"-DENABLE_QT5=ON"
"-DENABLE_QT6=ON")
; `(#:cargo-inputs ; Pass cargo-inputs here to configure phase
; (("rust-glib", rust-glib-0.18)
; ("rust-libc", rust-libc-0.2)))
#:phases
#~(modify-phases %standard-phases
(add-before 'configure 'cargo-build
(lambda* (#:key inputs #:allow-other-keys)
; ((assoc-ref cargo:%standard-phases 'unpack-rust-crates)
; #:inputs inputs
; #:vendor-dir "guix-vendor")
; ((assoc-ref cargo:%standard-phases 'configure)
; #:inputs inputs)
; ((assoc-ref cargo:%standard-phases 'patch-cargo-checksums))
((assoc-ref cargo:%standard-phases 'build))
)))))
(inputs (list dbus
fontconfig
glib
gtk
qtbase
qttools
clang-runtime
cairo
xorg-server
xcb-util
xcb-proto
wayland
wayland-protocols
rust
))
(native-inputs (list clang-toolchain
pkg-config
llvm))
;;(propagated-inputs (list cargo))
(license license:gpl3)
(home-page "https://github.com/Riey/kime")
(synopsis "kime is an input method with gtk3 gtk4 qt5 qt6 xim wayland support")
(description "kime is an input method framework written in rust, supporting gtk3, gtk4, qt5, qt6, xim, and wayland.")
))
kime
--------
....skip...
cargo build --release -pkime-engine-capi -pkime-check -pkime-indicator -pkime-candidate-window -pkime-xim -pkime-wayland -pkime Finished release profile [optimized] target(s) in 0.23s
cp ./target/release/libkime_engine.so /home/orka/src/kime/build/out
cp ./target/release/kime-check /home/orka/src/kime/build/out
cp ./target/release/kime-candidate-window /home/orka/src/kime/build/out
cp ./target/release/kime-indicator /home/orka/src/kime/build/out
cp ./target/release/kime-xim /home/orka/src/kime/build/out
cp ./target/release/kime-wayland /home/orka/src/kime/build/out
cp ./target/release/kime /home/orka/src/kime/build/out
cp src/engine/cffi/kime_engine.h /home/orka/src/kime/build/out
cp src/engine/cffi/kime_engine.hpp /home/orka/src/kime/build/out
cp docs/CHANGELOG.md /home/orka/src/kime/build/out
cp LICENSE /home/orka/src/kime/build/out
cp /home/orka/src/kime/build/out
cp /home/orka/src/kime/build/out
cp /home/orka/src/kime/build/out
cp -R res/default_config.yaml res/icons res/kime.desktop res/kime-xdg-autostart /home/orka/src/kime/build/out
mkdir -pv build/cmake
echo Build gtk qt immodules... Build gtk qt immodules...
cd build/cmake
cmake ../../src -DCMAKE_BUILD_TYPE=Release -DENABLE_GTK3=ON -DENABLE_GTK4=ON -DENABLE_QT5=ON -DENABLE_QT6=ON -- Configuring done -- Generating done -- Build files have been written to: /home/orka/src/kime/build/cmake
make -j4 [ 50%] Built target kime-gtk4 [100%] Built target kime-gtk3
cp lib/libkime-gtk3.so lib/libkime-gtk4.so /home/orka/src/kime/build/outNOTICE.mdREADME.mdREADME.ko.md
((assoc-ref cargo:%standard-phases 'configure) #:inputs inputs)
error: in phase 'cargo-build': uncaught exception: wrong-type-arg "string-prefix?" "Wrong type argument in position ~A (expecting ~A): ~S" (2 "string" #f) (#f) phase `cargo-build' failed after 0.0 seconds Backtrace: ....
ice-9/boot-9.scm:1685:16: In procedure raise-exception: In procedure string-prefix?: Wrong type argument in position 2 (expecting string): #f build process 6 exited with status 256
==========================================
Could anyone with more Guix packaging experience point me in the right direction? I'm particularly confused about why cargo isn't being found and whether I'm correctly using the cargo-build-system phases within a CMake-based package.
Any help would be appreciated! Thanks in advance.
I would really like to try and use GUIX as my new daily driver. But from everything I read so far it looks like, it is impossible to use it with ZFS on root. And I decided that my next daily driver has to have ZFS on root with native ZFS encryption.
I found https://www.reddit.com/r/GUIX/comments/s7qu25/guide_using_zfs_on_guix/ of course and even whole discussion on patches and issues addressing state of ZFS in GUIX.
But I'm wondering, is there really no progress with ZFS on root? It doesn't matter if it is hard, just if somebody has it working and have some configs (ideally with notes or writings about it).
Thanks for any points and ideas, just consider that I'm not even GUIX noob :) Also I'm interested only on full ZFS on root, not some middle grounds or BTRFS suggestions.
I'm afraid that answer will be NO, but they say there's no harm in asking.
I'd love to use the Guix system on my next computer, it seems like the ideal distribution for me in terms of values, maintenance workflow, and learning opportunities. I'm pretty comfortable in any DE, but for making the computer accessible to my household; I'd like to have Plasma as the main desktop. In most of the materials about Guix I've read it seems like KDE Plasma isn't fully supported without a lot of work. But most of that stuff is a few years old, I'm not finding more recent discussion, and the manual is unclear; is this still the case?
It's not a dealbreaker, I can make another DE work just fine, but Plasma is diffinitely my preference, and what I think would work best for family members used to PCs and MacOS. Appreciate any experiences and/or tips anyone can share.
As many of you probably know, the javascript ecosystem is hell and it is more or less impossible to package it to the packaging standards of guix, and the guix project has given up on it. See: https://dustycloud.org/blog/javascript-packaging-dystopia/
But if we make compromises like nix, it wouldn't be impossible to package. Is there any effort that is working on that? Obviously it couldn't be upstreamed, but it seems like it could exist as a channel like nonguix
I've made another attempt to switch to Guix over the past few weeks. The distro has come a long way since the last time I tried it a couple of years ago, but there's still one problem that's holding me back from switching from Nix. Installing and updating packages is painfully slow, largely due to glacial download speeds. The speed varies dramatically. Sometimes it's reasonably fast, and sometimes it dwindles to ~10kb a second for some packages. All the other package managers I've used with the same laptop/connection are extremely fast and there doesn't seem to be a general problem with this connection. I tried using my work connection and got similar results.
Before I look into this, I just wanted to consult people who use Guix as their daily driver. Is this something you encounter from time to time? Are the Guix servers just generally slow? Do you just put up with it? Or would you assume it's a problem with my connection based on your experience? I'm based in central Europe, fairly near the substitute servers as far as I understand.
Thanks for any comments on this.
EDIT: Thanks for everyone's responses. I'll try out some suggestions, but my impression is that Guix is just relatively slow to update compared to some other distros. I agree that in general this isn't an issue, since you can leave updates running in the background. The only time it really bothered me was when I wanted to install a package quickly to test something out, or when I wanted to install a large package like texlive. But it's not enough to put me off.
I'm new user, and also sample developer
I want testing /sbin/init but I don't see options or I'm missing something in config.scm
I try it add kernel parameters with init=/sbin/init But guix initrd focus for gnu.load instead of init
I'll start off by saying I did not "need" to switch to guix. I liked the idea of an OS that is configured in a Lisp language rather then Nix Lang.
However in Nixos I can just run a single command to reconfigure my flake and everything is install and configured the way I wanted it.
Now with Guix there are different ways to install programs such as the config.scm home.scm and manifests. I've seen people make things like SSS and other type configs.
So I'm wondering if there are any resources on how to do this? I'm not seeing how one can get something like SSS, RDE or enzu's system from the manual alone.
I have been trying to install Guix and NonGuix for a couple months now but failing repeatedly.
Usually it seems network related and all other information I found (like posts on issues.guix.gnu.org) was quite dated and/or still unresolved. So I'm not sure whether its just my ISP playing pranks on me or if the infrastructure for substitutes is just expected to be slow and unreliable.
Using latest guix installation iso (hbhr6nkx5arfas6a462zzgwmwmf8x86h-image.iso) to install a system with GNOME:
I have managed to successfully install a system with the MATE desktop environment (I assume it depended on fewer packages and I was more lucky), so I'm trying to bootstrap from there, but this has been a world of pain so far.
Questions:
I've tried the nonguix iso, no luck, install went fine, could not boot. I've tried the systemcrafters iso, no luck there either. So now I'm back to the official Guix ISOs and a VM (in gnome-boxes).
I have a GPU that's have 2 drivers, radeon and amdgpu, i want to play a game that requires to use amdgpu as kernel default gpu module, any way to make this?
Is there any way to modify the contents of program libraries in guix-home?
I'm trying to add the configuration files that will set up librewolf preferences/extensions.
Autoconfig.js, config.js, and policies.json need to be placed in the root librewolf directory which lives in .guix-home/profile/lib/
I tried to use home-files-service-type to no avail.
How can I make this happen?
~/.guix-home/profile/lib/librewolf/defaults/pref/autoconfig.js
~/.guix-home/profile/lib/librewolf/config.js
~/.guix-home/profile/lib/librewolf/distribution/policies.json
Howdy, we of the Nix land tend to pick up Emacs + patches / branches for nix from emacs overlay
How would I go install master or the latest pre-release etc on Guix?
So I am someone who really wants to stay on guix for quite some time because I am so drawn to lisp and I just want to use lisp programs, I am already a full time Emacs user and I can't shut my mouth about it 😭 I love it.
I have installed Guix before but i see that it is totally different from the usual linux distros this comes from a person who has moved between Arch, Debian, Ubuntu and Fedora....
Now it's summer break where I am at and I really wanted to ease myself into using Guix as my home... So would Guix be a good home for a Second year Computer Science student?
Any advice and tips would highly be appreciated
As an avid emacs and stumpwm user i love the idea of Guix. I'm currently running nixos for the sole purpose of the amount of packages and declarative setup. I would much rather configure my OS in a Lisp language then in Nix.
However I'm not interested in doing any development and I've noticed there isn't a whole lot of information for basic users of the OS
For example something as simple as package installation what is suggestion first is guix install almost defeating the purpose of a declarative OS and eventually you find how to write a manifest.
So my question is where can I find good information or tutorials for someone who just wants to customize a Lisp based OS rather then a development suit
Here is a project of mine that could interest some people: https://github.com/TimotheeMathieu/guix-env
The goal is to have a conda-like interaction with an environment that manage system dependencies with guix and python dependencies with poetry. I am in no way an expert and this is likely very ugly code and very hacky but it works for me. The principle is to automate everything to have a working guix shell container which automatically use a poetry environment and with all the tips and tricks to make graphical applications work (in particular sharing Xauthority, having libraries necessary to have python graphics rendering, i.e. for matplotlib plot...).
Usage: usage should be pretty simple: install guix-env (and guix) and then use guix-env create env_name
. This will create the environment and then guix-env shell env_name
allows you to get a shell into the environment and then you are good to go. New guix packages can be added with guix-env add-guix env_name package_name
and new python packages from inside the environment by using the alias gep
(stands for guix-env-poetry) an alias of poetry inside the environment. Of course, everything is automatically saved in a manifest, a pyproject.toml and a poetry.lock that are necessary for reproducibility and those can be used as argument of guix-env create
when creating a new environment. Everything about an environment is saved in ~/.guix_env and can be deleted to if one which to remove the environment.
Why not all in guix ? Why use poetry ?: python libraries move too fast, making a new guix package for each new python package is too time-consuming for now. And moreover, there are still a lot of python packages missing from guix, and we may fall into dependency hell by trying to package one python package and ending up having to package ten of them (spoken from personal experience :) ). As an alternative, poetry gives good reproducibility and is relatively mainstream, I found it was a good fit.
I hope maybe someone find this useful.
Cheers.