gnu: Add treefmt.
* gnu/packages/rust-apps.scm (treefmt): New variable. Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
This commit is contained in:
		
							parent
							
								
									98707abda3
								
							
						
					
					
						commit
						4a5fbadb88
					
				
					 1 changed files with 57 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -16,6 +16,7 @@
 | 
			
		|||
;;; Copyright © 2021 jgart <jgart@dismail.de>
 | 
			
		||||
;;; Copyright © 2021 Nicolas Graves <ngraves@ngraves.fr>
 | 
			
		||||
;;; Copyright © 2022 Aleksandr Vityazev <avityazev@posteo.org>
 | 
			
		||||
;;; Copyright © 2022 Gabriel Arazas <foo.dogsquared@gmail.com>
 | 
			
		||||
;;;
 | 
			
		||||
;;; This file is part of GNU Guix.
 | 
			
		||||
;;;
 | 
			
		||||
| 
						 | 
				
			
			@ -1129,6 +1130,62 @@ classic Web2C implementation of TeX and uses the TeXLive distribution
 | 
			
		|||
of support files.")
 | 
			
		||||
    (license license:expat)))
 | 
			
		||||
 | 
			
		||||
(define-public treefmt
 | 
			
		||||
  (package
 | 
			
		||||
    (name "treefmt")
 | 
			
		||||
    (version "0.4.1")
 | 
			
		||||
    (source
 | 
			
		||||
     (origin
 | 
			
		||||
       (method url-fetch)
 | 
			
		||||
       (uri (crate-uri "treefmt" version))
 | 
			
		||||
       (file-name
 | 
			
		||||
        (string-append name "-" version ".tar.gz"))
 | 
			
		||||
       (sha256
 | 
			
		||||
        (base32 "1rarg6rffzl1cf6r167h9p14wr696kwnzr85kwbdy7x7x5zpj5li"))))
 | 
			
		||||
    (build-system cargo-build-system)
 | 
			
		||||
    (arguments
 | 
			
		||||
     `(#:install-source? #f
 | 
			
		||||
       #:cargo-inputs
 | 
			
		||||
       (("rust-anyhow" ,rust-anyhow-1)
 | 
			
		||||
        ("rust-console" ,rust-console-0.13)
 | 
			
		||||
        ("rust-directories" ,rust-directories-3)
 | 
			
		||||
        ("rust-filetime" ,rust-filetime-0.2)
 | 
			
		||||
        ("rust-globset" ,rust-globset-0.4)
 | 
			
		||||
        ("rust-ignore" ,rust-ignore-0.4)
 | 
			
		||||
        ("rust-log" ,rust-log-0.4)
 | 
			
		||||
        ("rust-path-clean" ,rust-path-clean-0.1)
 | 
			
		||||
        ("rust-rayon" ,rust-rayon-1)
 | 
			
		||||
        ("rust-serde" ,rust-serde-1)
 | 
			
		||||
        ("rust-serde-json" ,rust-serde-json-1)
 | 
			
		||||
        ("rust-sha-1" ,rust-sha-1-0.9)
 | 
			
		||||
        ("rust-structopt" ,rust-structopt-0.3)
 | 
			
		||||
        ("rust-tempfile" ,rust-tempfile-3)
 | 
			
		||||
        ("rust-toml" ,rust-toml-0.5)
 | 
			
		||||
        ("rust-which" ,rust-which-4))
 | 
			
		||||
       #:cargo-development-inputs
 | 
			
		||||
       (("rust-criterion" ,rust-criterion-0.3))))
 | 
			
		||||
    (home-page "https://numtide.github.io/treefmt")
 | 
			
		||||
    (synopsis "Command-line application to format the code tree")
 | 
			
		||||
    (description
 | 
			
		||||
     "This application provides a way to unify the formatting process of the
 | 
			
		||||
codebase.  It is nice for large code trees where using multiple formatters are
 | 
			
		||||
common.  @command{treefmt} comes with the following features.
 | 
			
		||||
 | 
			
		||||
@itemize
 | 
			
		||||
@item Unified CLI and output.
 | 
			
		||||
@item Runs formatters in parallel.
 | 
			
		||||
@item Cache changed files for performance.
 | 
			
		||||
@end itemize
 | 
			
		||||
 | 
			
		||||
The application does have some design decisions to keep in mind.
 | 
			
		||||
 | 
			
		||||
@itemize
 | 
			
		||||
@item The source code is kept under version control, making it possible to
 | 
			
		||||
revert and check changes.
 | 
			
		||||
@item Only one formatter per file, making outputs idempotent.
 | 
			
		||||
@end itemize")
 | 
			
		||||
    (license license:expat)))
 | 
			
		||||
 | 
			
		||||
(define-public hex
 | 
			
		||||
  (package
 | 
			
		||||
    (name "hex")
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Reference in a new issue