Subject: [bug#66134] [PATCH 12/12] gnu: add just

From: Andrew Jose <[email-masked]>
Date: Thu, 21 Sep 2023 18:14:58 +0530

added name at top of file
---
 gnu/packages/rust-apps.scm | 71 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 71 insertions(+)

diff --git a/gnu/packages/rust-apps.scm b/gnu/packages/rust-apps.scm
index 76d48e55f1..933da7fe3a 100644
--- a/gnu/packages/rust-apps.scm
+++ b/gnu/packages/rust-apps.scm
@@ -23,6 +23,7 @@
 ;;; Copyright © 2022 ( <[email-masked]>
 ;;; Copyright © 2022 John Kehayias <[email-masked]>
 ;;; Copyright © 2022 Greg Hogan <[email-masked]>
+;;; Copyright © 2023 Arnav Andrew Jose <[email-masked]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -737,6 +738,76 @@ (define-public i3status-rust
 bar.  It is also compatible with sway.")
     (license license:gpl3)))
 
+(define-public just
+  (package
+    (name "just")
+    (version "1.14.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (crate-uri "just" version))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (patches
+        (search-patches
+         ;; two tests are broken
+         "just-remove-test.patch"))
+       (sha256
+        (base32
+         "0kafd87zmjf7wswyiqakqd2r5b8q3a761ipsihmrg9wr57k5zlis"))))
+    (build-system cargo-build-system)
+    (arguments
+     `(#:cargo-inputs
+       (("rust-ansi-term" ,rust-ansi-term-0.12)
+	("rust-atty" ,rust-atty-0.2)
+	("rust-camino" ,rust-camino-1)
+	("rust-clap" ,rust-clap-2)
+	("rust-ctrlc" ,rust-ctrlc-3)
+	("rust-derivative" ,rust-derivative-2)
+	("rust-dotenvy" ,rust-dotenvy-0.15)
+	("rust-edit-distance" ,rust-edit-distance-2)
+	("rust-env-logger" ,rust-env-logger-0.10)
+	("rust-heck" ,rust-heck-0.4)
+	("rust-lexiclean" ,rust-lexiclean-0.0.1)
+	("rust-libc" ,rust-libc-0.2)
+	("rust-log" ,rust-log-0.4)
+	("rust-regex" ,rust-regex-1)
+	("rust-serde" ,rust-serde-1)
+	("rust-serde-json" ,rust-serde-json-1)
+	("rust-sha2" ,rust-sha2-0.10)
+	("rust-similar" ,rust-similar-2)
+	("rust-snafu" ,rust-snafu-0.7)
+	("rust-strum" ,rust-strum-0.24)
+	("rust-target" ,rust-target-2)
+	("rust-tempfile" ,rust-tempfile-3)
+	("rust-typed-arena" ,rust-typed-arena-2)
+	("rust-unicode-width" ,rust-unicode-width-0.1)
+	("rust-uuid" ,rust-uuid-1))
+       #:cargo-development-inputs
+       (("rust-cradle" ,rust-cradle-0.2)
+	("rust-executable-path" ,rust-executable-path-1)
+	("rust-pretty-assertions" ,rust-pretty-assertions-1)
+	("rust-temptree" ,rust-temptree-0.2)
+	("rust-which" ,rust-which-4)
+	("rust-yaml-rust" ,rust-yaml-rust-0.4))
+       #:phases
+       (modify-phases %standard-phases
+	 (add-after 'unpack 'replace-hardcoded-paths
+	   (lambda* _
+	     (for-each
+              (lambda (filename)
+                (substitute* filename
+                  (("/usr/bin/env")
+                   (which "env"))
+                  (("/bin/echo")
+                   (which "echo"))
+                  (("/bin/sh")
+                   (which "sh"))))
+		       (cons "src/justfile.rs" (find-files "tests/" "\\.rs$"))))))))
+    (home-page "https://github.com/casey/just")
+    (synopsis "Just a command runner")
+    (description "Just a command runner. @code{just} is a handy way to save and run project-specific commands.")
+    (license license:cc0)))
+
 (define-public maturin
   (package
     (name "maturin")
-- 
2.34.1