mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
* gnu/packages/hare.scm (hare): New variable. * gnu/packages/patches/hare-fallback-cache.patch: New file. * gnu/packages/patches/hare-toolpath.patch: New file. Change-Id: I5d29841c3dab0f1d50876415a4f62961bfd7a467 Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
33 lines
1.1 KiB
Diff
33 lines
1.1 KiB
Diff
From 04fb25e334492432c0c1a09e1abb4c506fb1e710 Mon Sep 17 00:00:00 2001
|
|
Message-ID: <04fb25e334492432c0c1a09e1abb4c506fb1e710.1754429792.git.lilah@lunabee.space>
|
|
From: Lilah Tascheter <lilah@lunabee.space>
|
|
Date: Tue, 5 Aug 2025 16:35:24 -0500
|
|
Subject: [PATCH] dirs::xdg: Fallback to cwd.
|
|
|
|
Guix builds take place without a valid HOME, which will immediately prevent hare
|
|
from functioning. Provide a usable, if unfortunate, default.
|
|
---
|
|
dirs/xdg.ha | 7 ++++++-
|
|
1 file changed, 6 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/dirs/xdg.ha b/dirs/xdg.ha
|
|
index 9dc6c3b9..65eb92db 100644
|
|
--- a/dirs/xdg.ha
|
|
+++ b/dirs/xdg.ha
|
|
@@ -29,7 +29,12 @@ fn lookup(prog: str, var: str, default: str) str = {
|
|
case void => void;
|
|
};
|
|
|
|
- const home = os::getenv("HOME") as str;
|
|
+ let home = os::getenv("HOME") as str;
|
|
+ if(match(os::stat(home)) {
|
|
+ case let err: fs::error => yield true;
|
|
+ case let st: fs::filestat => yield !fs::isdir(st.mode);
|
|
+ }){ home = "."; };
|
|
+
|
|
const path = path::set(&buf, home, default, prog)!;
|
|
match (os::mkdirs(path, 0o755)) {
|
|
case let err: fs::error =>
|
|
--
|
|
2.50.0
|
|
|