guix: use a lighter environment for building the daemon

Special case the GUI dependencies to the GUI's container
This commit is contained in:
Antoine Poinsot 2022-12-03 15:48:01 +01:00
parent ae0b24f974
commit 37a28dbf7d
No known key found for this signature in database
GPG Key ID: E13FC145CD3F4304
2 changed files with 17 additions and 11 deletions

View File

@ -102,10 +102,11 @@ for project_folder in "" "gui"; do
fi
# FIXME: find a cleaner way to get the binary name, or get rid of patchelf entirely
# Note: we also rely on it in manifest.scm
if [ "$project_folder" = "" ]; then
BINARY_NAME="lianad"
export BINARY_NAME="lianad"
elif [ "$project_folder" = "gui" ]; then
BINARY_NAME="liana-gui"
export BINARY_NAME="liana-gui"
else
echo "Can't determine binary name"
exit 1

View File

@ -1,10 +1,15 @@
;; FIXME: Only pull the GUI dependencies when building it, not the daemon
(specifications->manifest
(list "rust"
"rust:cargo"
"coreutils"
"pkg-config" ;; For the GUI
"eudev" ;; For the GUI
"fontconfig" ;; For the GUI
"patchelf"
"gcc-toolchain@10.3.0"))
(append
(list "rust"
"rust:cargo"
"coreutils"
"patchelf"
"gcc-toolchain@10.3.0")
;; Additional dependencies for building the GUI
(let ((binary_name (getenv "BINARY_NAME")))
(if
(string=? "liana-gui" binary_name)
(list "pkg-config"
"eudev"
"fontconfig")
'()))))