Subject: Re: [bug#39717] [PATCH 1/3] gnu: delft-icon-theme: Use the copy-build-system.

From: Leo Prikler <[email-masked]>
Date: Thu, 27 Feb 2020 15:49:08 +0100

Am Donnerstag, den 27.02.2020, 15:02 +0100 schrieb Pierre Neidhardt:
> Thanks, and good catch!
Patch is ready.  I also noticed some inconsistencies with my previous
definition and updated the package to 1.11.

Regards,
Leo
From 7147b298949e17b3b3af857d91437f9012149297 Mon Sep 17 00:00:00 2001
From: Leo Prikler <[email-masked]>
Date: Thu, 27 Feb 2020 14:49:11 +0100
Subject: [PATCH 1/2] build-system: copy-build-system: Keep symlinks symbolic.

guix/build/copy-build-system.scm (install)[install-file]:
Read symlinks as is done in install-simple through copy-recursively.
---
 guix/build/copy-build-system.scm | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/guix/build/copy-build-system.scm b/guix/build/copy-build-system.scm
index 6d9dc8f93b..a86f0cde29 100644
--- a/guix/build/copy-build-system.scm
+++ b/guix/build/copy-build-system.scm
@@ -91,7 +91,13 @@ if TARGET ends with a '/', the source is installed underneath."
                                    file))))
       (format (current-output-port) "`~a' -> `~a'~%" file dest)
       (mkdir-p (dirname dest))
-      (copy-file file dest)))
+      (let ((stat (lstat file)))
+        (case (stat:type stat)
+          ((symlink)
+           (let ((target (readlink file)))
+             (symlink target dest)))
+          (else
+           (copy-file file dest))))))
 
   (define* (make-file-predicate suffixes matches-regexp #:optional (default-value #t))
     "Return a predicate that returns #t if its file argument matches the
-- 
2.25.1

From d51c90a241452ba03f9d2b5038233967bb94e844 Mon Sep 17 00:00:00 2001
From: Leo Prikler <[email-masked]>
Date: Fri, 21 Feb 2020 17:17:56 +0100
Subject: [PATCH 2/2] gnu: delft-icon-theme: Use the copy-build-system.

* gnu/packages/gnome-xyz.scm (delft-icon-theme): Use the copy-build-system.
---
 gnu/packages/gnome-xyz.scm | 22 ++++++++++------------
 1 file changed, 10 insertions(+), 12 deletions(-)

diff --git a/gnu/packages/gnome-xyz.scm b/gnu/packages/gnome-xyz.scm
index bedaacf092..b0bc35c4b1 100644
--- a/gnu/packages/gnome-xyz.scm
+++ b/gnu/packages/gnome-xyz.scm
@@ -101,19 +101,17 @@ like Gnome, Unity, Budgie, Pantheon, XFCE, Mate and others.")
         (base32
          "0vw3yw9f9ygzfd2k3zrfih3r0vkzlhk1bmsk8sapvk7np24i1z9s"))
        (file-name (git-file-name name version))))
-    (build-system trivial-build-system)
+    (build-system copy-build-system)
     (arguments
-     `(#:modules ((guix build utils))
-       #:builder
-       (begin
-         (use-modules (guix build utils))
-         (copy-recursively (assoc-ref %build-inputs "source") "icons")
-         (substitute* "icons/Delft/index.theme"
-           (("gnome") "Adwaita"))
-         (delete-file "icons/README.md")
-         (delete-file "icons/LICENSE")
-         (delete-file "icons/logo.jpg")
-         (copy-recursively "icons" (string-append %output "/share/icons")))))
+     `(#:install-plan
+       `(("." "share/icons" #:exclude ("README.md" "LICENSE" "logo.jpg")))
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-index.theme
+           (lambda _
+            (substitute* "Delft/index.theme"
+              (("gnome") "Adwaita"))
+            #t)))))
     (home-page "https://www.gnome-look.org/p/1199881/")
     (synopsis "Continuation of Faenza icon theme with up to date app icons")
     (description "Delft is a fork of the popular icon theme Faenza with up to
-- 
2.25.1

From c90ab439c7c79350fa783a9f20182a34fea95289 Mon Sep 17 00:00:00 2001
From: Leo Prikler <[email-masked]>
Date: Thu, 27 Feb 2020 15:47:39 +0100
Subject: [PATCH 3/3] gnu: delft-icon-theme: Update to 1.11.

* gnu/packages/gnome-xyz.scm (delft-icon-theme): Update to 1.11.
---
 gnu/packages/gnome-xyz.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/gnome-xyz.scm b/gnu/packages/gnome-xyz.scm
index b0bc35c4b1..b8cd32db08 100644
--- a/gnu/packages/gnome-xyz.scm
+++ b/gnu/packages/gnome-xyz.scm
@@ -90,7 +90,7 @@ like Gnome, Unity, Budgie, Pantheon, XFCE, Mate and others.")
 (define-public delft-icon-theme
   (package
     (name "delft-icon-theme")
-    (version "1.10")
+    (version "1.11")
     (source
      (origin
        (method git-fetch)
@@ -99,7 +99,7 @@ like Gnome, Unity, Budgie, Pantheon, XFCE, Mate and others.")
              (commit (string-append "v" version))))
        (sha256
         (base32
-         "0vw3yw9f9ygzfd2k3zrfih3r0vkzlhk1bmsk8sapvk7np24i1z9s"))
+         "1m3r4i4m3y3xsjb5f4bik0ylmi64amkfyr0y8pjbvv6gyj492mi6"))
        (file-name (git-file-name name version))))
     (build-system copy-build-system)
     (arguments
-- 
2.25.1