From e420b090decccb1ff20b143af4de2ddb9cbb6e00 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Sun, 31 Mar 2024 14:30:46 +0300 Subject: [PATCH] gnu: Add rust-diesel-2. * gnu/packages/crates-io.scm (rust-diesel-2): New variable. (rust-diesel-1): Inherit from rust-diesel-2. Change-Id: I9ee4176d1165ede2e621c1b9408c5ad40ea88e10 --- gnu/packages/crates-io.scm | 59 ++++++++++++++++++++++++++++++++------ 1 file changed, 51 insertions(+), 8 deletions(-) diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm index daa7a6a4fa..64190f1090 100644 --- a/gnu/packages/crates-io.scm +++ b/gnu/packages/crates-io.scm @@ -20877,8 +20877,58 @@ (define-public rust-dialoguer-0.10 ("rust-tempfile" ,rust-tempfile-3) ("rust-zeroize" ,rust-zeroize-1)))))) +(define-public rust-diesel-2 + (package + (name "rust-diesel") + (version "2.1.5") + (source + (origin + (method url-fetch) + (uri (crate-uri "diesel" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 "0ndmiv98xq2glkr4bqfq58fc3qncscfzx63xpj4ipwlqf30hbz03")))) + (build-system cargo-build-system) + (arguments + `(#:cargo-test-flags + '("--release" + "--features" "sqlite") + #:cargo-inputs (("rust-bigdecimal" ,rust-bigdecimal-0.1) + ("rust-bitflags" ,rust-bitflags-2) + ("rust-byteorder" ,rust-byteorder-1) + ("rust-chrono" ,rust-chrono-0.4) + ("rust-diesel-derives" ,rust-diesel-derives-2) + ("rust-ipnet" ,rust-ipnet-2) + ("rust-ipnetwork" ,rust-ipnetwork-0.17) + ("rust-itoa" ,rust-itoa-1) + ("rust-libc" ,rust-libc-0.2) + ("rust-libsqlite3-sys" ,rust-libsqlite3-sys-0.20) + ("rust-mysqlclient-sys" ,rust-mysqlclient-sys-0.2) + ("rust-num-bigint" ,rust-num-bigint-0.2) + ("rust-num-integer" ,rust-num-integer-0.1) + ("rust-num-traits" ,rust-num-traits-0.2) + ("rust-percent-encoding" ,rust-percent-encoding-2) + ("rust-pq-sys" ,rust-pq-sys-0.4) + ("rust-quickcheck" ,rust-quickcheck-1) + ("rust-r2d2" ,rust-r2d2-0.8) + ("rust-serde-json" ,rust-serde-json-0.9) + ("rust-time" ,rust-time-0.3) + ("rust-url" ,rust-url-2) + ("rust-uuid" ,rust-uuid-0.7)) + #:cargo-development-inputs (("rust-cfg-if" ,rust-cfg-if-1) + ("rust-dotenvy" ,rust-dotenvy-0.15) + ("rust-ipnetwork" ,rust-ipnetwork-0.17) + ("rust-quickcheck" ,rust-quickcheck-1)))) + (native-inputs (list sqlite)) + (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.") + (license (list license:expat license:asl2.0)))) + (define-public rust-diesel-1 (package + (inherit rust-diesel-2) (name "rust-diesel") (version "1.4.6") (source @@ -20890,7 +20940,6 @@ (define-public rust-diesel-1 (sha256 (base32 "0hpmwrc0zx3zvpgwp9zrm6wj8d8i8q8990grlrnfzlivbi6zqyq4")))) - (build-system cargo-build-system) (arguments `(#:cargo-test-flags '("--release" @@ -20922,13 +20971,7 @@ (define-public rust-diesel-1 (("rust-cfg-if" ,rust-cfg-if-0.1) ("rust-dotenv" ,rust-dotenv-0.10) ("rust-quickcheck" ,rust-quickcheck-0.4) - ("rust-tempdir" ,rust-tempdir-0.3)))) - (native-inputs (list sqlite)) - (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.") - (license (list license:expat license:asl2.0)))) + ("rust-tempdir" ,rust-tempdir-0.3)))))) (define-public rust-diesel-derives-2 (package