Subject: [PATCH 3/24]: gnu: just: New package.

From: Jean Pierre De Jesus DIAZ <[email-masked]>
Date: Wed, 20 Jul 2022 12:14:24 +0000

Empty Message

From 8f57d1a62d130f8dc78f040fead7dade6b91b06f Mon Sep 17 00:00:00 2001
From: Jean-Pierre De Jesus DIAZ <[email-masked]>
Date: Mon, 18 Jul 2022 00:30:26 +0200
Subject: [PATCH 03/24] gnu: rust-cradle-0.2: New package.

* gnu/packages/crates-io.scm (rust-cradle-0.2): New variable.
---
 gnu/packages/crates-io.scm | 61 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 61 insertions(+)

diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index 99086140d4..52bc87230c 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -54,6 +54,7 @@ (define-module (gnu packages crates-io)
   #:use-module (gnu packages)
   #:use-module (gnu packages admin)
   #:use-module (gnu packages autotools)
+  #:use-module (gnu packages base)
   #:use-module (gnu packages bash)
   #:use-module (gnu packages cmake)
   #:use-module (gnu packages compression)
@@ -90,6 +91,7 @@ (define-module (gnu packages crates-io)
   #:use-module (gnu packages xml)
   #:use-module (gnu packages xorg)
   #:use-module (gnu packages gtk)
+  #:use-module (gnu packages vim)
   #:use-module (gnu packages webkit)
   #:use-module (srfi srfi-1))
 
@@ -13721,6 +13723,65 @@ (define-public rust-cpuprofiler-0.0
     (description "This package provides bindings to Google's cpu profiler.")
     (license license:bsd-2)))
 
+(define-public rust-cradle-0.2
+  (package
+    (name "rust-cradle")
+    (version "0.2.2")
+    (source (origin
+              (method url-fetch)
+              (uri (crate-uri "cradle" version))
+              (file-name (string-append name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "16n04y60jps91dsw5fs6p8zash052y82aclg57kkvm9320n155kh"))
+              (modules '((guix build utils)))
+              (snippet
+                `(substitute* "Cargo.toml"
+                   ;; Relax rustversion version.
+                   (("1\\.0\\.4") "1")
+                   ;; Relax bitflags version. It is locked to support older
+                   ;; compilers.
+                   (("=1\\.2\\.1") "1")
+                   ;; Relax nix version.
+                   (("0\\.22\\.2") "0.22")))))
+    (build-system cargo-build-system)
+    (arguments
+     `(#:features '("test_executables")
+       #:cargo-test-flags '("--release"
+                            "--features" "test_executables"
+                            "--"
+                            "--skip=memory_test") ;; Tries to run `cargo run'.
+       #:cargo-inputs
+       (("rust-executable-path" ,rust-executable-path-1)
+        ("rust-gag" ,rust-gag-0.1)
+        ("rust-nix" ,rust-nix-0.22)
+        ("rust-rustversion" ,rust-rustversion-1))
+       #:cargo-development-inputs
+       (("rust-lazy-static" ,rust-lazy-static-1)
+        ("rust-pretty-assertions" ,rust-pretty-assertions-1)
+        ("rust-tempfile" ,rust-tempfile-3)
+        ("rust-unindent" ,rust-unindent-0.1)
+        ("rust-bitflags" ,rust-bitflags-1))
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-tests
+           (lambda _
+             (substitute* "src/lib.rs"
+               (("#!/usr/bin/env bash")
+                (string-append "#!" (which "bash"))))
+             ;; Fix documentation test that tries to access $HOME.
+             (substitute* "src/input.rs"
+               (("run!\\(\"ls\",.*\"HOME\".*$")
+                "run!(\"ls\")\n")))))))
+    (inputs
+      (list coreutils
+            which
+            xxd))
+    (home-page "https://github.com/soenkehahn/cradle")
+    (synopsis "Execute child processes with ease")
+    (description "Execute child processes with ease")
+    (license license:cc0)))
+
 (define-public rust-crates-index-0.17
   (package
     (name "rust-crates-index")
-- 
2.36.1