gnu: knot: Use G-expressions.
* gnu/packages/dns.scm (knot)[arguments]: Rewrite as G-expressions.
This commit is contained in:
		
							parent
							
								
									60bb22a9da
								
							
						
					
					
						commit
						1c347cd56a
					
				
					 1 changed files with 71 additions and 73 deletions
				
			
		| 
						 | 
				
			
			@ -866,12 +866,12 @@ Extensions} (DNSSEC).")
 | 
			
		|||
    (build-system gnu-build-system)
 | 
			
		||||
    (outputs (list "out" "doc" "lib" "tools"))
 | 
			
		||||
    (arguments
 | 
			
		||||
     `(#:configure-flags
 | 
			
		||||
       (list (string-append "--docdir=" (assoc-ref %outputs "doc")
 | 
			
		||||
                            "/share/" ,name "-" ,version)
 | 
			
		||||
             (string-append "--infodir=" (assoc-ref %outputs "doc")
 | 
			
		||||
                            "/share/info")
 | 
			
		||||
             (string-append "--libdir=" (assoc-ref %outputs "lib") "/lib")
 | 
			
		||||
     (list
 | 
			
		||||
      #:configure-flags
 | 
			
		||||
      #~(list (string-append "--docdir=" #$output:doc
 | 
			
		||||
                             "/share/" #$name "-" #$version)
 | 
			
		||||
              (string-append "--infodir=" #$output:doc "/share/info")
 | 
			
		||||
              (string-append "--libdir=" #$output:lib "/lib")
 | 
			
		||||
              "--sysconfdir=/etc"
 | 
			
		||||
              "--localstatedir=/var"
 | 
			
		||||
              "--disable-static"       ; static libraries are built by default
 | 
			
		||||
| 
						 | 
				
			
			@ -880,7 +880,7 @@ Extensions} (DNSSEC).")
 | 
			
		|||
              "--enable-xdp=yes"
 | 
			
		||||
              "--with-module-dnstap=yes") ; detailed query capturing & logging
 | 
			
		||||
      #:phases
 | 
			
		||||
       (modify-phases %standard-phases
 | 
			
		||||
      #~(modify-phases %standard-phases
 | 
			
		||||
          (add-after 'unpack 'link-missing-libbpf-dependency
 | 
			
		||||
            ;; Linking against -lbpf later would fail to find -lz: libbpf.pc has
 | 
			
		||||
            ;; zlib in its Requires.private (not Requires) field.  Add it here.
 | 
			
		||||
| 
						 | 
				
			
			@ -905,9 +905,9 @@ Extensions} (DNSSEC).")
 | 
			
		|||
                             '())
 | 
			
		||||
                       ,@make-flags))))
 | 
			
		||||
          (replace 'install
 | 
			
		||||
           (lambda* (#:key make-flags outputs parallel-build? #:allow-other-keys)
 | 
			
		||||
             (let* ((out (assoc-ref outputs "out"))
 | 
			
		||||
                    (doc (string-append out "/share/doc/" ,name "-" ,version))
 | 
			
		||||
            (lambda* (#:key make-flags parallel-build? #:allow-other-keys)
 | 
			
		||||
              (let* ((doc (string-append #$output "/share/doc/"
 | 
			
		||||
                                         #$name "-" #$version))
 | 
			
		||||
                     (etc (string-append doc "/examples/etc")))
 | 
			
		||||
                (apply invoke "make" "install"
 | 
			
		||||
                       (string-append "config_dir=" etc)
 | 
			
		||||
| 
						 | 
				
			
			@ -923,22 +923,20 @@ Extensions} (DNSSEC).")
 | 
			
		|||
                             '())
 | 
			
		||||
                       ,@make-flags))))
 | 
			
		||||
          (add-after 'install 'break-circular-:lib->:out-reference
 | 
			
		||||
           (lambda* (#:key outputs #:allow-other-keys)
 | 
			
		||||
             (let ((lib (assoc-ref outputs "lib")))
 | 
			
		||||
            (lambda _
 | 
			
		||||
              (for-each (lambda (file)
 | 
			
		||||
                          (substitute* file
 | 
			
		||||
                            (("(prefix=).*" _ assign)
 | 
			
		||||
                              (string-append assign lib "\n"))))
 | 
			
		||||
                         (find-files lib "\\.pc$")))))
 | 
			
		||||
         (add-after 'install 'split-:tools
 | 
			
		||||
           (lambda* (#:key outputs #:allow-other-keys)
 | 
			
		||||
             (let* ((out   (assoc-ref outputs "out"))
 | 
			
		||||
                    (tools (assoc-ref outputs "tools")))
 | 
			
		||||
               (mkdir-p (string-append tools "/share/man"))
 | 
			
		||||
               (rename-file (string-append out   "/bin")
 | 
			
		||||
                            (string-append tools "/bin"))
 | 
			
		||||
               (rename-file (string-append out   "/share/man/man1")
 | 
			
		||||
                            (string-append tools "/share/man/man1"))))))))
 | 
			
		||||
                             (string-append assign #$output:lib "\n"))))
 | 
			
		||||
                        (find-files #$output:lib "\\.pc$"))))
 | 
			
		||||
          (add-after 'install 'split:tools
 | 
			
		||||
            (lambda _
 | 
			
		||||
              (define (move source target file)
 | 
			
		||||
                (mkdir-p (dirname (string-append target "/" file)))
 | 
			
		||||
                (rename-file (string-append source "/" file)
 | 
			
		||||
                             (string-append target "/" file)))
 | 
			
		||||
              (move #$output #$output:tools "bin")
 | 
			
		||||
              (move #$output #$output:tools "share/man/man1"))))))
 | 
			
		||||
    (native-inputs
 | 
			
		||||
     (list autoconf
 | 
			
		||||
           automake
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Reference in a new issue