build: haskell-build-system: Remove trailing #t.
* guix/build/haskell-build-system.scm (configure, install, setup-compiler, make-ghc-package-database, install-transitive-deps, check, haddock, patch-cabal-file, generate-setuphs): Delete trailing #t. Signed-off-by: Lars-Dominik Braun <lars@6xq.net>
This commit is contained in:
		
							parent
							
								
									3e3f888dd3
								
							
						
					
					
						commit
						29d5fb7619
					
				
					 1 changed files with 9 additions and 16 deletions
				
			
		| 
						 | 
					@ -5,6 +5,7 @@
 | 
				
			||||||
;;; Copyright © 2018, 2020 Ricardo Wurmus <rekado@elephly.net>
 | 
					;;; Copyright © 2018, 2020 Ricardo Wurmus <rekado@elephly.net>
 | 
				
			||||||
;;; Copyright © 2018 Alex Vong <alexvong1995@gmail.com>
 | 
					;;; Copyright © 2018 Alex Vong <alexvong1995@gmail.com>
 | 
				
			||||||
;;; Copyright © 2021 John Kehayias <john.kehayias@protonmail.com>
 | 
					;;; Copyright © 2021 John Kehayias <john.kehayias@protonmail.com>
 | 
				
			||||||
 | 
					;;; Copyright © 2022 Simon Tournier <zimon.toutoune@gmail.com>
 | 
				
			||||||
;;;
 | 
					;;;
 | 
				
			||||||
;;; This file is part of GNU Guix.
 | 
					;;; This file is part of GNU Guix.
 | 
				
			||||||
;;;
 | 
					;;;
 | 
				
			||||||
| 
						 | 
					@ -118,8 +119,7 @@ and parameters ~s~%"
 | 
				
			||||||
      (setenv "CONFIG_SHELL" "sh"))
 | 
					      (setenv "CONFIG_SHELL" "sh"))
 | 
				
			||||||
    (run-setuphs "configure" params)
 | 
					    (run-setuphs "configure" params)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    (setenv "GHC_PACKAGE_PATH" ghc-path)
 | 
					    (setenv "GHC_PACKAGE_PATH" ghc-path)))
 | 
				
			||||||
    #t))
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
(define* (build #:key parallel-build? #:allow-other-keys)
 | 
					(define* (build #:key parallel-build? #:allow-other-keys)
 | 
				
			||||||
  "Build a given Haskell package."
 | 
					  "Build a given Haskell package."
 | 
				
			||||||
| 
						 | 
					@ -140,8 +140,7 @@ and parameters ~s~%"
 | 
				
			||||||
                         (new    (string-append static subdir)))
 | 
					                         (new    (string-append static subdir)))
 | 
				
			||||||
                    (mkdir-p (dirname new))
 | 
					                    (mkdir-p (dirname new))
 | 
				
			||||||
                    (rename-file static-lib new)))
 | 
					                    (rename-file static-lib new)))
 | 
				
			||||||
                (find-files lib "\\.a$"))))
 | 
					                (find-files lib "\\.a$")))))
 | 
				
			||||||
  #t)
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
(define* (setup-compiler #:key system inputs outputs #:allow-other-keys)
 | 
					(define* (setup-compiler #:key system inputs outputs #:allow-other-keys)
 | 
				
			||||||
  "Setup the compiler environment."
 | 
					  "Setup the compiler environment."
 | 
				
			||||||
| 
						 | 
					@ -175,8 +174,7 @@ and parameters ~s~%"
 | 
				
			||||||
              conf-files)
 | 
					              conf-files)
 | 
				
			||||||
    (invoke "ghc-pkg"
 | 
					    (invoke "ghc-pkg"
 | 
				
			||||||
            (string-append "--package-db=" %tmp-db-dir)
 | 
					            (string-append "--package-db=" %tmp-db-dir)
 | 
				
			||||||
            "recache")
 | 
					            "recache")))
 | 
				
			||||||
    #t))
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
(define* (register #:key name system inputs outputs #:allow-other-keys)
 | 
					(define* (register #:key name system inputs outputs #:allow-other-keys)
 | 
				
			||||||
  "Generate the compiler registration and binary package database files for a
 | 
					  "Generate the compiler registration and binary package database files for a
 | 
				
			||||||
| 
						 | 
					@ -273,21 +271,18 @@ given Haskell package."
 | 
				
			||||||
                                    config-file-name+id ".conf"))
 | 
					                                    config-file-name+id ".conf"))
 | 
				
			||||||
        (invoke "ghc-pkg"
 | 
					        (invoke "ghc-pkg"
 | 
				
			||||||
                (string-append "--package-db=" config-dir)
 | 
					                (string-append "--package-db=" config-dir)
 | 
				
			||||||
                "recache")))
 | 
					                "recache")))))
 | 
				
			||||||
    #t))
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
(define* (check #:key tests? test-target #:allow-other-keys)
 | 
					(define* (check #:key tests? test-target #:allow-other-keys)
 | 
				
			||||||
  "Run the test suite of a given Haskell package."
 | 
					  "Run the test suite of a given Haskell package."
 | 
				
			||||||
  (if tests?
 | 
					  (if tests?
 | 
				
			||||||
      (run-setuphs test-target '())
 | 
					      (run-setuphs test-target '())
 | 
				
			||||||
      (format #t "test suite not run~%"))
 | 
					      (format #t "test suite not run~%")))
 | 
				
			||||||
  #t)
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
(define* (haddock #:key outputs haddock? haddock-flags #:allow-other-keys)
 | 
					(define* (haddock #:key outputs haddock? haddock-flags #:allow-other-keys)
 | 
				
			||||||
  "Generate the Haddock documentation of a given Haskell package."
 | 
					  "Generate the Haddock documentation of a given Haskell package."
 | 
				
			||||||
  (when haddock?
 | 
					  (when haddock?
 | 
				
			||||||
    (run-setuphs "haddock" haddock-flags))
 | 
					    (run-setuphs "haddock" haddock-flags)))
 | 
				
			||||||
  #t)
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
(define* (patch-cabal-file #:key cabal-revision #:allow-other-keys)
 | 
					(define* (patch-cabal-file #:key cabal-revision #:allow-other-keys)
 | 
				
			||||||
  (when cabal-revision
 | 
					  (when cabal-revision
 | 
				
			||||||
| 
						 | 
					@ -296,8 +291,7 @@ given Haskell package."
 | 
				
			||||||
      ((original)
 | 
					      ((original)
 | 
				
			||||||
       (format #t "replacing ~s with ~s~%" original cabal-revision)
 | 
					       (format #t "replacing ~s with ~s~%" original cabal-revision)
 | 
				
			||||||
       (copy-file cabal-revision original))
 | 
					       (copy-file cabal-revision original))
 | 
				
			||||||
      (_ (error "Could not find a Cabal file to patch."))))
 | 
					      (_ (error "Could not find a Cabal file to patch.")))))
 | 
				
			||||||
  #t)
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
(define* (generate-setuphs #:rest empty)
 | 
					(define* (generate-setuphs #:rest empty)
 | 
				
			||||||
  "Generate a default Setup.hs if needed."
 | 
					  "Generate a default Setup.hs if needed."
 | 
				
			||||||
| 
						 | 
					@ -307,8 +301,7 @@ given Haskell package."
 | 
				
			||||||
    (with-output-to-file "Setup.hs"
 | 
					    (with-output-to-file "Setup.hs"
 | 
				
			||||||
      (lambda ()
 | 
					      (lambda ()
 | 
				
			||||||
        (format #t "import Distribution.Simple~%")
 | 
					        (format #t "import Distribution.Simple~%")
 | 
				
			||||||
        (format #t "main = defaultMain~%"))))
 | 
					        (format #t "main = defaultMain~%")))))
 | 
				
			||||||
  #t)
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
(define %standard-phases
 | 
					(define %standard-phases
 | 
				
			||||||
  (modify-phases gnu:%standard-phases
 | 
					  (modify-phases gnu:%standard-phases
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Reference in a new issue