Subject: [PATCH v2 13/13] gnu: Add scc

From: Fries <[email-masked]>
Date: Sat, 05 Aug 2023 11:02:17 +0000

* gnu/packages/code.scm (scc): New variable.
---
 gnu/packages/code.scm | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/gnu/packages/code.scm b/gnu/packages/code.scm
index 9cdda2b751..3b95bb3664 100644
--- a/gnu/packages/code.scm
+++ b/gnu/packages/code.scm
@@ -17,6 +17,7 @@
 ;;; Copyright © 2021 lu hui <[email-masked]>
 ;;; Copyright © 2021, 2022 Foo Chuan Wei <[email-masked]>
 ;;; Copyright © 2022 Michael Rohleder <[email-masked]>
+;;; Copyright © 2023 Fries <[email-masked]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -44,6 +45,7 @@ (define-module (gnu packages code)
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system python)
   #:use-module (guix build-system trivial)
+  #:use-module (guix build-system go)
   #:use-module (gnu packages)
   #:use-module (gnu packages autogen)
   #:use-module (gnu packages autotools)
@@ -373,6 +375,39 @@ (define-public cloc
 cloc can handle a greater variety of programming languages.")
     (license license:gpl2+)))
 
+(define-public scc
+  (package
+    (name "scc")
+    (version "3.1.0")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/boyter/scc")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1rkkfg6jimlc2rkajk6ypd5v0m3zai25ga5idz2pmkmzakv82n21"))))
+    (build-system go-build-system)
+    (inputs (list go-github-com-dbaggerman-cuba
+                  go-github-com-json-iterator-go
+                  go-github-com-mattn-go-runewidth
+                  go-github-com-minio-blake2b-simd
+                  go-github-com-spf13-cobra
+                  go-golang-org-x-text
+                  go-gopkg-in-yaml-v2))
+    (arguments
+     (list #:import-path "github.com/boyter/scc"))
+    (home-page "https://github.com/boyter/scc")
+    (synopsis "Fast code counter written in Go")
+    (description
+     "@command{scc} provides a lines-of-code counter similar to tools
+like @command{cloc} and @command{sloccount}.
+
+It aims to be fast as possible while supporting
+@acronym{COCOMO,Constructive Cost Model} calculation and code complexity estimation.")
+    (license license:expat)))
+
 (define-public the-silver-searcher
   (package
     (name "the-silver-searcher")
-- 
2.41.0