Subject: [bug#68312] [PATCH 045/156] gnu: Add rust-diesel-derives-2.

From: Wilko Meyer <[email-masked]>
Date: Mon, 8 Jan 2024 02:52:22 +0100

* gnu/packages/crates-io.scm (rust-diesel-derives-2): New variable.
(rust-diesel-derives-1): Inherit from rust-diesel-derives-2.

Change-Id: Ia7112f2589657fda1731208b04859d49bb519852
---
 gnu/packages/crates-io.scm | 39 ++++++++++++++++++++++++++++----------
 1 file changed, 29 insertions(+), 10 deletions(-)

diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index 2cab9822ebb..b837611d3a0 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -21225,14 +21225,39 @@ (define-public rust-diesel-1
         ("rust-tempdir" ,rust-tempdir-0.3))))
     (native-inputs (list sqlite))))
 
+(define-public rust-diesel-derives-2
+  (package
+    (name "rust-diesel-derives")
+    (version "2.1.2")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (crate-uri "diesel_derives" version))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32 "0i1bzp6rxnrrlgz1y946ap3203vjvack9a05h135mxblfmrkg0zg"))))
+    (build-system cargo-build-system)
+    (arguments
+     `(#:tests? #f      ; cannot find type `SqliteConnection` in this scope
+       #:cargo-test-flags
+       '("--release"
+         "--features" "sqlite"
+         "--"
+         "--skip=expression::count::count")
+       #:cargo-inputs (("rust-diesel-table-macro-syntax" ,rust-diesel-table-macro-syntax-0.1)
+                       ("rust-proc-macro2" ,rust-proc-macro2-1)
+                       ("rust-quote" ,rust-quote-1)
+                       ("rust-syn" ,rust-syn-2))))
     (home-page "https://diesel.rs")
-    (synopsis "Safe, extensible ORM and Query Builder")
-    (description "This package provides a safe, extensible ORM and Query
-Builder for PostgreSQL, SQLite, and MySQL.")
+    (synopsis "Crate internal to Diesel")
+    (description "You should not use this crate directly, it is internal to
+Diesel.")
     (license (list license:expat license:asl2.0))))
 
+
 (define-public rust-diesel-derives-1
   (package
+    (inherit rust-diesel-derives-2)
     (name "rust-diesel-derives")
     (version "1.4.1")
     (source
@@ -21243,7 +21268,6 @@ (define-public rust-diesel-derives-1
        (sha256
         (base32
          "1lsq133fwk0zj8xvxhdxqgg0xs31zf3abnwdyshaf0ldca7hkxa5"))))
-    (build-system cargo-build-system)
     (arguments
      `(#:tests? #f      ; cannot find type `SqliteConnection` in this scope
        #:cargo-test-flags
@@ -21259,12 +21283,7 @@ (define-public rust-diesel-derives-1
        (("rust-cfg-if" ,rust-cfg-if-0.1)
         ("rust-diesel" ,rust-diesel-1)
         ("rust-dotenv" ,rust-dotenv-0.10))))
-    (native-inputs (list sqlite))
-    (home-page "https://diesel.rs")
-    (synopsis "Crate internal to Diesel")
-    (description "You should not use this crate directly, it is internal to
-Diesel.")
-    (license (list license:expat license:asl2.0))))
+    (native-inputs (list sqlite))))
 
 (define-public rust-diesel-migrations-1
   (package
-- 
2.41.0