gnu: clara: Fix build.
* gnu/packages/check.scm (clara) [source]: Add snippet to un-bundle catch2. [arguments]: Add #:configure-flags argument. [native-inputs]: Add catch2.
This commit is contained in:
		
							parent
							
								
									81682e2e90
								
							
						
					
					
						commit
						0ebc572d07
					
				
					 1 changed files with 16 additions and 1 deletions
				
			
		| 
						 | 
					@ -258,6 +258,9 @@ source code editors and IDEs.")
 | 
				
			||||||
              (base32
 | 
					              (base32
 | 
				
			||||||
               "0d22h8xshmbpl9hba9ch3xj8vb9ybm5akpsbbh7yj07fic4h2hj6"))))))
 | 
					               "0d22h8xshmbpl9hba9ch3xj8vb9ybm5akpsbbh7yj07fic4h2hj6"))))))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;;; XXX: This project is abandoned upstream, and included in modern catch2
 | 
				
			||||||
 | 
					;;; releases.  It is still depended by the restinio test suite at this time,
 | 
				
			||||||
 | 
					;;; so keep it (see: https://github.com/Stiffstream/restinio/issues/181).
 | 
				
			||||||
(define-public clara
 | 
					(define-public clara
 | 
				
			||||||
  (package
 | 
					  (package
 | 
				
			||||||
    (name "clara")
 | 
					    (name "clara")
 | 
				
			||||||
| 
						 | 
					@ -270,16 +273,28 @@ source code editors and IDEs.")
 | 
				
			||||||
              (file-name (git-file-name name version))
 | 
					              (file-name (git-file-name name version))
 | 
				
			||||||
              (sha256
 | 
					              (sha256
 | 
				
			||||||
               (base32
 | 
					               (base32
 | 
				
			||||||
                "08mlm9ax5d7wkmsihm1xnlgp7rfgff0bfl4ly4850xmrdaxmmkl3"))))
 | 
					                "08mlm9ax5d7wkmsihm1xnlgp7rfgff0bfl4ly4850xmrdaxmmkl3"))
 | 
				
			||||||
 | 
					              (modules '((guix build utils)))
 | 
				
			||||||
 | 
					              (snippet '(begin
 | 
				
			||||||
 | 
					                          ;; Un-bundle catch2.
 | 
				
			||||||
 | 
					                          (delete-file-recursively "third_party")
 | 
				
			||||||
 | 
					                          (substitute* "CMakeLists.txt"
 | 
				
			||||||
 | 
					                            (("include_directories\\( include third_party )")
 | 
				
			||||||
 | 
					                             "include_directories( include )"))))))
 | 
				
			||||||
    (build-system cmake-build-system)
 | 
					    (build-system cmake-build-system)
 | 
				
			||||||
    (arguments
 | 
					    (arguments
 | 
				
			||||||
     (list
 | 
					     (list
 | 
				
			||||||
 | 
					      #:configure-flags
 | 
				
			||||||
 | 
					      #~(list (string-append "-DCMAKE_CXX_FLAGS=-I"
 | 
				
			||||||
 | 
					                             (search-input-directory %build-inputs
 | 
				
			||||||
 | 
					                                                     "include/catch2")))
 | 
				
			||||||
      #:phases
 | 
					      #:phases
 | 
				
			||||||
      #~(modify-phases %standard-phases
 | 
					      #~(modify-phases %standard-phases
 | 
				
			||||||
          (replace 'install
 | 
					          (replace 'install
 | 
				
			||||||
            (lambda _
 | 
					            (lambda _
 | 
				
			||||||
              (install-file (string-append #$source "/single_include/clara.hpp")
 | 
					              (install-file (string-append #$source "/single_include/clara.hpp")
 | 
				
			||||||
                            (string-append #$output "/include")))))))
 | 
					                            (string-append #$output "/include")))))))
 | 
				
			||||||
 | 
					    (native-inputs (list catch2))
 | 
				
			||||||
    (home-page "https://github.com/catchorg/Clara")
 | 
					    (home-page "https://github.com/catchorg/Clara")
 | 
				
			||||||
    (synopsis "Simple command line parser for C++")
 | 
					    (synopsis "Simple command line parser for C++")
 | 
				
			||||||
    (description "Clara is a simple to use, composable, command line parser
 | 
					    (description "Clara is a simple to use, composable, command line parser
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Reference in a new issue