all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* pull: Update the %sbindir variable in (guix config) when building.
@ 2018-02-13 13:08 Diego Nicola Barbato
  2018-02-15 13:25 ` Ludovic Courtès
  0 siblings, 1 reply; 2+ messages in thread
From: Diego Nicola Barbato @ 2018-02-13 13:08 UTC (permalink / raw)
  To: guix-devel

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

Hello Guix,

The attached patch is supposed to fix <https://bugs.gnu.org/30370>.  I
am posting this here and not on guix-patches as I am not familiar with
the internals of guix and do not know what the intended behaviour of
this was.

I have checked that it actually fixes the problem.  However I do not
know if it breaks anything.

Greetings

Diego


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

From 56d427eefe5c4667ed97b41f6411972b2c6ecc20 Mon Sep 17 00:00:00 2001
From: Diego Nicola Barbato <dnbarbato@posteo.de>
Date: Tue, 13 Feb 2018 01:36:40 +0100
Subject: [PATCH] pull: Update the %sbindir variable in (guix config) when
 building.

Fixes <https://bugs.gnu.org/30370>.

* build-aux/build-self.scm (guix): New variable.
(builder): Use it.
---
 build-aux/build-self.scm | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/build-aux/build-self.scm b/build-aux/build-self.scm
index 17d947bec..4c85c09df 100644
--- a/build-aux/build-self.scm
+++ b/build-aux/build-self.scm
@@ -44,6 +44,9 @@
 ;; could be renamed or shuffled around in modules over time.  Conversely,
 ;; 'find-best-packages-by-name' is expected to always have the same semantics.
 
+(define guix
+  (first (find-best-packages-by-name "guix" #f)))
+
 (define libgcrypt
   (first (find-best-packages-by-name "libgcrypt" #f)))
 
@@ -165,8 +168,6 @@ files."
     (if (defined? '%localstatedir) %localstatedir (dirname %state-directory)))
   (define sysconfdir
     (if (defined? '%sysconfdir) %sysconfdir (dirname %config-directory)))
-  (define sbindir
-    (if (defined? '%sbindir) %sbindir (dirname %guix-register-program)))
 
   (define builder
     #~(begin
@@ -222,7 +223,7 @@ files."
                     #:storedir #$storedir
                     #:localstatedir #$localstatedir
                     #:sysconfdir #$sysconfdir
-                    #:sbindir #$sbindir
+                    #:sbindir (string-append #$guix "/sbin")
 
                     #:package-name #$%guix-package-name
                     #:package-version #$version
-- 
2.16.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: pull: Update the %sbindir variable in (guix config) when building.
  2018-02-13 13:08 pull: Update the %sbindir variable in (guix config) when building Diego Nicola Barbato
@ 2018-02-15 13:25 ` Ludovic Courtès
  0 siblings, 0 replies; 2+ messages in thread
From: Ludovic Courtès @ 2018-02-15 13:25 UTC (permalink / raw)
  To: Diego Nicola Barbato; +Cc: guix-devel

Hi Diego,

Diego Nicola Barbato <dnbarbato@posteo.de> skribis:

> From 56d427eefe5c4667ed97b41f6411972b2c6ecc20 Mon Sep 17 00:00:00 2001
> From: Diego Nicola Barbato <dnbarbato@posteo.de>
> Date: Tue, 13 Feb 2018 01:36:40 +0100
> Subject: [PATCH] pull: Update the %sbindir variable in (guix config) when
>  building.
>
> Fixes <https://bugs.gnu.org/30370>.
>
> * build-aux/build-self.scm (guix): New variable.
> (builder): Use it.

That looks like the best solution.

Applied, thank you!

Ludo’.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-02-15 13:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-13 13:08 pull: Update the %sbindir variable in (guix config) when building Diego Nicola Barbato
2018-02-15 13:25 ` Ludovic Courtès

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.