guix_mirror_bot pushed a commit to branch next-master
in repository guix.

commit 09fc2f243ce38a8deec0f4e4e8fcfe9a2eaa10c7
Author: Cayetano Santos <[email protected]>
AuthorDate: Fri Jan 2 21:06:54 2026 +0100

    gnu: nettle: Modernize.
    
    * gnu/packages/nettle.scm (nettle)[arguments]: Use G-Expressions.
    
    Change-Id: Ia5519e2c08fa1466ac066e8d40e73bb8bb305f14
---
 gnu/packages/nettle.scm | 57 ++++++++++++++++++++++---------------------------
 1 file changed, 26 insertions(+), 31 deletions(-)

diff --git a/gnu/packages/nettle.scm b/gnu/packages/nettle.scm
index 94bf4cb4f2..1c56115e25 100644
--- a/gnu/packages/nettle.scm
+++ b/gnu/packages/nettle.scm
@@ -20,6 +20,7 @@
 ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 
 (define-module (gnu packages nettle)
+  #:use-module (guix gexp)
   #:use-module (guix utils)
   #:use-module (guix licenses)
   #:use-module (guix packages)
@@ -30,10 +31,6 @@
   #:use-module (gnu packages m4))
 
 (define-public nettle
-  ;; FIXME: The "cons" in #:configure-flags is a left-over from uninheriting
-  ;; to avoid changing the derivation; it should be removed and the package
-  ;; be modernized to use gexps the next time the package definition is
-  ;; modified.
   (package
     (name "nettle")
     (version "3.10.1")
@@ -46,33 +43,31 @@
                 "0cli5lkr7h9vxrz3j9kylnsdbw2ag6x8bpgivj06xsndq1zxvz5h"))))
     (build-system gnu-build-system)
     (arguments
-     `(#:configure-flags
-       (cons "--enable-fat"
-       ;; 'sexp-conv' and other programs need to have their RUNPATH point to
-       ;; $libdir, which is not the case by default.  Work around it.
-             (list (string-append "LDFLAGS=-Wl,-rpath="
-                                  (assoc-ref %outputs "out")
-                                  "/lib")))
-       #:phases (modify-phases %standard-phases
-                  (add-after 'install 'move-static-libraries
-                    (lambda* (#:key outputs #:allow-other-keys)
-                      (let ((out (assoc-ref outputs "out"))
-                            (slib (string-append (assoc-ref outputs "static")
-                                                 "/lib")))
-                        (mkdir-p slib)
-                        (with-directory-excursion (string-append out "/lib")
-                          (for-each (lambda (ar)
-                                      (rename-file ar (string-append
-                                                       slib "/"
-                                                       (basename ar))))
-                                    (find-files
-                                     "."
-                                     ,(if (target-mingw?)
-                                          '(lambda (filename _)
-                                             (and (string-suffix? ".a" 
filename)
-                                                  (not (string-suffix? 
".dll.a" filename))))
-                                          "\\.a$"))))
-                        #t))))))
+     (list
+      #:configure-flags
+      #~(list "--enable-fat"
+              ;; 'sexp-conv' and other programs need to have their RUNPATH
+              ;; point to $libdir, which is not the case by default.  Work
+              ;; around it.
+              (string-append "LDFLAGS=-Wl,-rpath=" #$output "/lib"))
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'install 'move-static-libraries
+            (lambda _
+              (mkdir-p (string-append #$output:static "/lib"))
+              (with-directory-excursion (string-append #$output "/lib")
+                (for-each
+                 (lambda (ar)
+                   (rename-file
+                    ar
+                    (string-append #$output:static "/lib/" (basename ar))))
+                 (find-files
+                  "."
+                  #$(if (target-mingw?)
+                        '(lambda (filename _)
+                           (and (string-suffix? ".a" filename)
+                                (not (string-suffix? ".dll.a" filename))))
+                        "\\.a$")))))))))
     (outputs '("out" "debug" "static"))
     (native-inputs (list m4))
     (propagated-inputs (list gmp))

Reply via email to