diff --git a/contrib/guix/guix-build.sh b/contrib/guix/guix-build.sh index 7bcd6de5..52bbeda8 100755 --- a/contrib/guix/guix-build.sh +++ b/contrib/guix/guix-build.sh @@ -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 diff --git a/contrib/guix/manifest.scm b/contrib/guix/manifest.scm index 515bf822..64eb5375 100644 --- a/contrib/guix/manifest.scm +++ b/contrib/guix/manifest.scm @@ -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") + '()))))