From c0756c7dd90c038f5daddcf4893f57e9701ab033 Mon Sep 17 00:00:00 2001 From: Rene Date: Thu, 7 Mar 2019 20:46:59 -0800 Subject: [PATCH] Add symlink. --- gnu/build/install.scm | 19 +++++++++++++++++++ guix/scripts/system.scm | 2 ++ 2 files changed, 21 insertions(+) diff --git a/gnu/build/install.scm b/gnu/build/install.scm index 9e30c0d23..202a9672d 100644 --- a/gnu/build/install.scm +++ b/gnu/build/install.scm @@ -27,6 +27,7 @@ populate-root-file-system reset-timestamps register-closure + install-hurd populate-single-profile-directory)) ;;; Commentary: @@ -144,6 +145,24 @@ includes /etc, /var, /run, /bin/sh, etc., and all the symlinks to SYSTEM." (try)) (apply throw args))))))) +(define (install-hurd pkg) + "Create a link to /gnu/store/..hurd-1.9 with the name /hurd." + + ;; Add /hurd link. + (let ((link-1 (string-append target + "/hurd"))) + (let try () + (catch 'system-error + (lambda () + (symlink pkg link-1)) + (lambda args + ;; If /hurd already exists, overwrite it. + (if (= EEXIST (system-error-errno args)) + (begin + (delete-file link-1) + (try)) + (apply throw args))))))) + (define (reset-timestamps directory) "Reset the timestamps of all the files under DIRECTORY, so that they appear as created and modified at the Epoch." diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm index b688bb68c..be8e639b7 100644 --- a/guix/scripts/system.scm +++ b/guix/scripts/system.scm @@ -1151,3 +1151,5 @@ argument list and OPTS is the option alist." ;;; End: ;;; system.scm ends here + +(install-hurd #$hurd) -- 2.17.1