all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Rene <ikhuuma@gmail.com>
To: Danny Milosavljevic <dannym@scratchpost.org>
Cc: guix-devel@gnu.org
Subject: Re: create a symlink
Date: Thu, 07 Mar 2019 16:11:50 -0600	[thread overview]
Message-ID: <cucef7iqqqh.fsf@gmail.com> (raw)
In-Reply-To: <20180427170848.23d95667@scratchpost.org> (Danny Milosavljevic's message of "Fri, 27 Apr 2018 17:08:48 +0200")

[-- Attachment #1: Type: text/plain, Size: 2012 bytes --]


Hello Danny, sorry for delay.

I have updated my repository with commit
dc7d6d4ece30c7ab25e9f1927d64f2b409ab896c(version 14).

Danny Milosavljevic <dannym@scratchpost.org> writes:

> are you sure you put the call into guix/scripts/system.scm ?
>
> There are a lot of #$ things there already - should work.
>
> In gnu/build/install.scm it's not going to work.
>
> The Guix high-level packaging stuff is not available build-side, only host=
> -side.
>
> Can you provide a patch of what you did?
>

When doing `make` shows the error message:
--8<---------------cut here---------------start------------->8---
Backtrace:
          14 (primitive-load "/home/jin/guix/./build-aux/compile-all…")
In guix/build/compile.scm:
    158:6 13 (compile-files _ _ ("guix/scripts/system.scm" "gnu/b…") …)
   107:11 12 (load-files "." _ #:report-load _ #:debug-port _)
In ice-9/boot-9.scm:
  2800:17 11 (resolve-interface (guix scripts system) #:select _ # _ …)
In ice-9/threads.scm:
    390:8 10 (_ _)
In ice-9/boot-9.scm:
  2726:13  9 (_)
In ice-9/threads.scm:
    390:8  8 (_ _)
In ice-9/boot-9.scm:
  2994:20  7 (_)
   2312:4  6 (save-module-excursion _)
  3014:26  5 (_)
In unknown file:
           4 (primitive-load-path "guix/scripts/system" #<procedure …>)
In ice-9/eval.scm:
   191:35  3 (_ #f)
   191:27  2 (_ #f)
   223:20  1 (proc #<directory (guix scripts system) e2f050>)
In unknown file:
           0 (%resolve-variable (7 . ungexp) #<directory (guix scrip…>)

ERROR: In procedure %resolve-variable:
ungexp: unbound variable
Makefile:5463: recipe for target 'make-go' failed
make[2]: *** [make-go] Error 1
make[2]: Leaving directory '/home/jin/guix'
Makefile:4536: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/jin/guix'
Makefile:3078: recipe for target 'all' failed
make: *** [all] Error 2
--8<---------------cut here---------------end--------------->8---

Attached patch.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Add-symlink.patch --]
[-- Type: text/x-patch, Size: 1827 bytes --]

From c0756c7dd90c038f5daddcf4893f57e9701ab033 Mon Sep 17 00:00:00 2001
From: Rene <ikhuuma@gmail.com>
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


[-- Attachment #3: Type: text/plain, Size: 11 bytes --]


-- 

Rene

  reply	other threads:[~2019-03-08  5:09 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-19  2:54 create a symlink Rene
2018-04-19  6:26 ` Danny Milosavljevic
2018-04-19 21:23   ` Joshua Branson
2018-04-21 14:31   ` Rene
2018-04-27  5:20   ` Rene
2018-04-27 15:08     ` Danny Milosavljevic
2019-03-07 22:11       ` Rene [this message]
2019-03-08  8:15         ` Danny Milosavljevic
  -- strict thread matches above, loose matches on Subject: below --
2019-03-08 21:13 Rene
2019-03-09  8:22 ` Danny Milosavljevic
2019-03-12 20:57 Rene
2019-03-13 11:25 ` Danny Milosavljevic
2019-03-13 14:52 ` Ludovic Courtès
2019-03-25 23:06   ` Danny Milosavljevic
2019-03-28  1:54 Rene
2019-04-03  7:12 ` Chris Marusich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cucef7iqqqh.fsf@gmail.com \
    --to=ikhuuma@gmail.com \
    --cc=dannym@scratchpost.org \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.