unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#43414] [PATCH 1/3] gnu: Add rust-lab.
@ 2020-09-15  0:52 Gabriel Arazas
  2020-09-15  8:36 ` [bug#43414] [PATCH 2/3] gnu: Add rust-delta-e Gabriel Arazas
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Gabriel Arazas @ 2020-09-15  0:52 UTC (permalink / raw)
  To: 43414; +Cc: Gabriel Arazas

* gnu/packages/crates-io.scm (rust-lab-0.8): New variable.
* gnu/packages/crates-io.scm (rust-lab-0.7): New variable.
* gnu/packages/crates-io.scm (rust-lab-0.4): 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 0f0f0c28c9..2f3cead9cf 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -12220,6 +12220,67 @@ currently supports parsing (fully conformant parser), formatting and comparing
 language tags.")
     (license license:expat)))
 
+(define-public rust-lab-0.8
+  (package
+    (name "rust-lab")
+    (version "0.8.1")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (crate-uri "lab" version))
+        (file-name
+          (string-append name "-" version ".tar.gz"))
+        (sha256
+          (base32
+            "1ysnbviwi35mq6xyz9c59mpgigyfp4s4y2mispxzrms4vk83bx15"))))
+    (build-system cargo-build-system)
+    (arguments
+      `(#:cargo-development-inputs
+        (("rust-approx" ,rust-approx-0.3)
+         ("rust-criterion" ,rust-criterion-0.3)
+         ("rust-lazy-static" ,rust-lazy-static-1.4)
+         ("rust-pretty-assertions"
+          ,rust-pretty-assertions-0.6)
+         ("rust-rand" ,rust-rand-0.7))))
+    (home-page "https://github.com/TooManyBees/lab")
+    (synopsis
+      "Converts RGB to CIE-LAB for Rust")
+    (description
+      "Tools for converting RGB colors to the CIE-LAB color space, and
+comparing differences in color.
+  ")
+    (license license:expat)))
+
+(define-public rust-lab-0.7
+  (package
+    (inherit rust-lab-0.8)
+    (name "rust-lab")
+    (version "0.7.2")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (crate-uri "lab" version))
+        (file-name
+          (string-append name "-" version ".tar.gz"))
+        (sha256
+          (base32
+            "0g692d489lq01pv3mzfhxd98j0r22lw28l6bk112m74djlfzxdmw"))))))
+
+(define-public rust-lab-0.4
+  (package
+    (inherit rust-lab-0.8)
+    (name "rust-lab")
+    (version "0.4.4")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (crate-uri "lab" version))
+        (file-name
+          (string-append name "-" version ".tar.gz"))
+        (sha256
+          (base32
+            "0h4ig5bvzmwlzd74zj7b4sh7kzi3c6mjjnw7yjz8ijxvr4mrcr1s"))))))
+
 (define-public rust-lalrpop-0.17
   (package
     (name "rust-lalrpop")
-- 
2.28.0





^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [bug#43414] [PATCH 2/3] gnu: Add rust-delta-e.
  2020-09-15  0:52 [bug#43414] [PATCH 1/3] gnu: Add rust-lab Gabriel Arazas
@ 2020-09-15  8:36 ` Gabriel Arazas
  2020-09-15  8:36   ` [bug#43414] [PATCH 3/3] gnu: Add rust-ansi-colours Gabriel Arazas
  2020-09-15  8:43 ` [bug#43414] [PATCH 1/3] gnu: Add rust-lab Gabriel Arazas
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 7+ messages in thread
From: Gabriel Arazas @ 2020-09-15  8:36 UTC (permalink / raw)
  To: 43414; +Cc: Gabriel Arazas

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

diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index 2f3cead9cf..563daf9ed8 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -5444,6 +5444,31 @@ and arithmetic.")
          (base32
           "17giv0n0n1r64z0dahfvkjy3ys517jxyhs8sd9lmgvcljpjyryxa"))))))
 
+(define-public rust-delta-e-0.2
+  (package
+    (name "rust-delta-e")
+    (version "0.2.1")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (crate-uri "delta_e" version))
+        (file-name
+          (string-append name "-" version ".tar.gz"))
+        (sha256
+          (base32
+            "18rxibmi27ark8vj367qm2iqmv5x293l8fm9ang4y2sv3l251sf5"))))
+    (build-system cargo-build-system)
+    (arguments
+      `(#:cargo-inputs (("rust-lab" ,rust-lab-0.7))))
+    (home-page "https://github.com/elliotekj/DeltaE")
+    (synopsis
+      "Pure Rust implementation of the CIEDE2000 algorithm")
+    (description
+      "A Rust implementation of the CIEDE2000 algorithm which is used to
+quantify the differences between two colors. It is entirely based on the work
+of Zachary Schuessler who has written a JavaScript version of the algorithm.")
+    (license license:expat)))
+
 (define-public rust-demo-hack-0.0
   (package
     (name "rust-demo-hack")
-- 
2.28.0





^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [bug#43414] [PATCH 3/3] gnu: Add rust-ansi-colours.
  2020-09-15  8:36 ` [bug#43414] [PATCH 2/3] gnu: Add rust-delta-e Gabriel Arazas
@ 2020-09-15  8:36   ` Gabriel Arazas
  0 siblings, 0 replies; 7+ messages in thread
From: Gabriel Arazas @ 2020-09-15  8:36 UTC (permalink / raw)
  To: 43414; +Cc: Gabriel Arazas

* gnu/packages/crates-io.scm (rust-ansi-colours-1.0): New variable.
---
 gnu/packages/crates-io.scm | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index 563daf9ed8..2cb22343c0 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -442,6 +442,34 @@ shapes, lines and text to buffers.")
     (description "This package provides the glue for the Android JNI.")
     (license license:expat)))
 
+(define-public rust-ansi-colours-1.0
+  (package
+    (name "rust-ansi-colours")
+    (version "1.0.1")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (crate-uri "ansi_colours" version))
+        (file-name
+          (string-append name "-" version ".tar.gz"))
+        (sha256
+          (base32
+            "1dnqmpk68mzvncj37jlv0362kdgsgjxg010c6psagimgh4m303qx"))))
+    (build-system cargo-build-system)
+    (arguments
+      `(#:cargo-development-inputs
+        (("rust-cc" ,rust-cc-1)
+         ("rust-delta-e" ,rust-delta-e-0.2)
+         ("rust-lab" ,rust-lab-0.4))))
+    (home-page "https://github.com/mina86/ansi_colours")
+    (synopsis
+      "Palette converter between true-colour and ANSI terminal")
+    (description
+      "Provides a palette converter between true-colour and ANSI terminal
+colors. It is often used for supporting different terminal emulators with
+different color bit counts.")
+    (license license:lgpl3+)))
+
 (define-public rust-ansi-term-0.12
   (package
     (name "rust-ansi-term")
-- 
2.28.0





^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [bug#43414] [PATCH 1/3] gnu: Add rust-lab.
  2020-09-15  0:52 [bug#43414] [PATCH 1/3] gnu: Add rust-lab Gabriel Arazas
  2020-09-15  8:36 ` [bug#43414] [PATCH 2/3] gnu: Add rust-delta-e Gabriel Arazas
@ 2020-09-15  8:43 ` Gabriel Arazas
  2020-09-16  6:49   ` bug#43414: " Efraim Flashner
  2020-09-16  6:48 ` [bug#43414] " Efraim Flashner
  2020-09-16 11:36 ` [bug#43414] (no subject) Gabriel Arazas
  3 siblings, 1 reply; 7+ messages in thread
From: Gabriel Arazas @ 2020-09-15  8:43 UTC (permalink / raw)
  To: 43414

This is supposedly for packaging bat ( https://github.com/sharkdp/bat ) 
but I guess I know now why with all of the missing dependencies and 
whatnot. ;p

For now, I'll iteratively add those packages. This is what I completed 
for today.

Btw, I just realized I forgot to add my name on the copyright headers. 
To whoever approved my changes, could they add it? Thanks in advanced. :-)

Best regards,

Gabriel Arazas





^ permalink raw reply	[flat|nested] 7+ messages in thread

* [bug#43414] [PATCH 1/3] gnu: Add rust-lab.
  2020-09-15  0:52 [bug#43414] [PATCH 1/3] gnu: Add rust-lab Gabriel Arazas
  2020-09-15  8:36 ` [bug#43414] [PATCH 2/3] gnu: Add rust-delta-e Gabriel Arazas
  2020-09-15  8:43 ` [bug#43414] [PATCH 1/3] gnu: Add rust-lab Gabriel Arazas
@ 2020-09-16  6:48 ` Efraim Flashner
  2020-09-16 11:36 ` [bug#43414] (no subject) Gabriel Arazas
  3 siblings, 0 replies; 7+ messages in thread
From: Efraim Flashner @ 2020-09-16  6:48 UTC (permalink / raw)
  To: Gabriel Arazas; +Cc: 43414


[-- Attachment #1.1: Type: text/plain, Size: 4171 bytes --]

A couple of issues I've found with this patch:
(I've attached the updated patch)

On Tue, Sep 15, 2020 at 08:52:24AM +0800, Gabriel Arazas wrote:
> * gnu/packages/crates-io.scm (rust-lab-0.8): New variable.
> * gnu/packages/crates-io.scm (rust-lab-0.7): New variable.
> * gnu/packages/crates-io.scm (rust-lab-0.4): 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 0f0f0c28c9..2f3cead9cf 100644
> --- a/gnu/packages/crates-io.scm
> +++ b/gnu/packages/crates-io.scm
> @@ -12220,6 +12220,67 @@ currently supports parsing (fully conformant parser), formatting and comparing
>  language tags.")
>      (license license:expat)))
>  
> +(define-public rust-lab-0.8
> +  (package
> +    (name "rust-lab")
> +    (version "0.8.1")
> +    (source
> +      (origin
> +        (method url-fetch)
> +        (uri (crate-uri "lab" version))
> +        (file-name
> +          (string-append name "-" version ".tar.gz"))
> +        (sha256
> +          (base32
> +            "1ysnbviwi35mq6xyz9c59mpgigyfp4s4y2mispxzrms4vk83bx15"))))
> +    (build-system cargo-build-system)
> +    (arguments
> +      `(#:cargo-development-inputs
> +        (("rust-approx" ,rust-approx-0.3)
> +         ("rust-criterion" ,rust-criterion-0.3)
> +         ("rust-lazy-static" ,rust-lazy-static-1.4)
> +         ("rust-pretty-assertions"
> +          ,rust-pretty-assertions-0.6)
> +         ("rust-rand" ,rust-rand-0.7))))

This is actually rust-rand-0.5

> +    (home-page "https://github.com/TooManyBees/lab")
> +    (synopsis
> +      "Converts RGB to CIE-LAB for Rust")
> +    (description
> +      "Tools for converting RGB colors to the CIE-LAB color space, and
> +comparing differences in color.
> +  ")
> +    (license license:expat)))
> +

These two packages don't actually use the same dependencies as
rust-lab-0.8. I normally check https://crates.io/crates/<package-name>
to make sure I have the correct dependencies.

> +(define-public rust-lab-0.7
> +  (package
> +    (inherit rust-lab-0.8)
> +    (name "rust-lab")
> +    (version "0.7.2")
> +    (source
> +      (origin
> +        (method url-fetch)
> +        (uri (crate-uri "lab" version))
> +        (file-name
> +          (string-append name "-" version ".tar.gz"))
> +        (sha256
> +          (base32
> +            "0g692d489lq01pv3mzfhxd98j0r22lw28l6bk112m74djlfzxdmw"))))))
> +
> +(define-public rust-lab-0.4
> +  (package
> +    (inherit rust-lab-0.8)
> +    (name "rust-lab")
> +    (version "0.4.4")
> +    (source
> +      (origin
> +        (method url-fetch)
> +        (uri (crate-uri "lab" version))
> +        (file-name
> +          (string-append name "-" version ".tar.gz"))
> +        (sha256
> +          (base32
> +            "0h4ig5bvzmwlzd74zj7b4sh7kzi3c6mjjnw7yjz8ijxvr4mrcr1s"))))))
> +
>  (define-public rust-lalrpop-0.17
>    (package
>      (name "rust-lalrpop")
> -- 
> 2.28.0
> 

In addition, rust-lab-0.7 failed the test suite for me. I got:
error: process didn't exit successfully: `/tmp/guix-build-rust-lab-0.7.2.drv-0/lab-0.7.2/target/release/deps/lab-674125292fb73d25` (signal: 4, SIGILL: illegal instruction)
When I looked into it more it looks like it's building targeting avx2
with 0.8.1¹, unspecified on 0.7.2² and nothing in particular in 0.4.2
(couldn't find a tag for 0.4.4 in the git repo).

Do programs compiled using this crate work on machines without all the
expected CPU extensions?

Since the two packages depending on lab-0.7 pass their test suite I
assume it's more of an issue about the test suite for 0.7 and less of an
issue about the crate itself.


¹ https://github.com/TooManyBees/lab/blob/v0.8.1/src/lib.rs#L96
² https://github.com/TooManyBees/lab/blob/v0.7.2/src/lib.rs#L51


-- 
Efraim Flashner   <efraim@flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

[-- Attachment #1.2: 0001-gnu-Add-rust-lab-0.8-rust-lab-0.7-rust-lab-0.4.patch --]
[-- Type: text/plain, Size: 3487 bytes --]

From 833dfde76e9058a22b80526a73038dc341947c5b Mon Sep 17 00:00:00 2001
From: Gabriel Arazas <foo.dogsquared@gmail.com>
Date: Tue, 15 Sep 2020 08:52:24 +0800
Subject: [PATCH] gnu: Add rust-lab-0.8, rust-lab-0.7, rust-lab-0.4.

* gnu/packages/crates-io.scm (rust-lab-0.8, rust-lab-0.7,
rust-lab-0.4): New variables.

Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
---
 gnu/packages/crates-io.scm | 69 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 69 insertions(+)

diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index 0f0f0c28c9..eee1432f94 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -8,6 +8,7 @@
 ;;; Copyright © 2019, 2020 Hartmut Goebel <h.goebel@crazy-compilers.com>
 ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
 ;;; Copyright © 2020 Leo Famulari <leo@famulari.name>
+;;; Copyright © 2020 Gabriel Arazas <foo.dogsquared@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -12220,6 +12221,74 @@ currently supports parsing (fully conformant parser), formatting and comparing
 language tags.")
     (license license:expat)))
 
+(define-public rust-lab-0.8
+  (package
+    (name "rust-lab")
+    (version "0.8.1")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (crate-uri "lab" version))
+        (file-name
+         (string-append name "-" version ".tar.gz"))
+        (sha256
+         (base32
+          "1ysnbviwi35mq6xyz9c59mpgigyfp4s4y2mispxzrms4vk83bx15"))))
+    (build-system cargo-build-system)
+    (arguments
+     `(#:cargo-development-inputs
+       (("rust-approx" ,rust-approx-0.3)
+        ("rust-criterion" ,rust-criterion-0.3)
+        ("rust-lazy-static" ,rust-lazy-static-1)
+        ("rust-pretty-assertions" ,rust-pretty-assertions-0.6)
+        ("rust-rand" ,rust-rand-0.5))))
+    (home-page "https://github.com/TooManyBees/lab")
+    (synopsis "Convert RGB to CIE-LAB for Rust")
+    (description
+     "This package contains tools for converting RGB colors to the CIE-LAB color
+space, and comparing differences in color.")
+    (license license:expat)))
+
+(define-public rust-lab-0.7
+  (package
+    (inherit rust-lab-0.8)
+    (name "rust-lab")
+    (version "0.7.2")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (crate-uri "lab" version))
+        (file-name
+         (string-append name "-" version ".tar.gz"))
+        (sha256
+         (base32
+          "0g692d489lq01pv3mzfhxd98j0r22lw28l6bk112m74djlfzxdmw"))))
+    (arguments
+     `(#:tests? #f  ; test suite assumes avx2 support
+       #:cargo-development-inputs
+       (("rust-criterion" ,rust-criterion-0.3)
+        ("rust-lazy-static" ,rust-lazy-static-1)
+        ("rust-pretty-assertions" ,rust-pretty-assertions-0.6)
+        ("rust-rand" ,rust-rand-0.5))))))
+
+(define-public rust-lab-0.4
+  (package
+    (inherit rust-lab-0.8)
+    (name "rust-lab")
+    (version "0.4.4")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (crate-uri "lab" version))
+        (file-name
+         (string-append name "-" version ".tar.gz"))
+        (sha256
+         (base32
+          "0h4ig5bvzmwlzd74zj7b4sh7kzi3c6mjjnw7yjz8ijxvr4mrcr1s"))))
+    (arguments
+     `(#:cargo-development-inputs
+       (("rust-rand" ,rust-rand-0.3))))))
+
 (define-public rust-lalrpop-0.17
   (package
     (name "rust-lalrpop")
-- 
2.28.0


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* bug#43414: [PATCH 1/3] gnu: Add rust-lab.
  2020-09-15  8:43 ` [bug#43414] [PATCH 1/3] gnu: Add rust-lab Gabriel Arazas
@ 2020-09-16  6:49   ` Efraim Flashner
  0 siblings, 0 replies; 7+ messages in thread
From: Efraim Flashner @ 2020-09-16  6:49 UTC (permalink / raw)
  To: Gabriel Arazas; +Cc: 43414-done

[-- Attachment #1: Type: text/plain, Size: 776 bytes --]

On Tue, Sep 15, 2020 at 04:43:01PM +0800, Gabriel Arazas wrote:
> This is supposedly for packaging bat ( https://github.com/sharkdp/bat ) but
> I guess I know now why with all of the missing dependencies and whatnot. ;p
> 
> For now, I'll iteratively add those packages. This is what I completed for
> today.
> 
> Btw, I just realized I forgot to add my name on the copyright headers. To
> whoever approved my changes, could they add it? Thanks in advanced. :-)

Taken care of :)

> 
> Best regards,
> 
> Gabriel Arazas

Thanks. Patches pushed!

-- 
Efraim Flashner   <efraim@flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [bug#43414] (no subject)
  2020-09-15  0:52 [bug#43414] [PATCH 1/3] gnu: Add rust-lab Gabriel Arazas
                   ` (2 preceding siblings ...)
  2020-09-16  6:48 ` [bug#43414] " Efraim Flashner
@ 2020-09-16 11:36 ` Gabriel Arazas
  3 siblings, 0 replies; 7+ messages in thread
From: Gabriel Arazas @ 2020-09-16 11:36 UTC (permalink / raw)
  To: 43414

[-- Attachment #1: Type: text/plain, Size: 980 bytes --]

Of all the packages I forgot to test, it's the one with the obvious 
error. :/

Sorry for the rookie mistake, I triple-checked it and got the same error 
as you reported. I only tested two dependent packages (out of four 
according to the page, 
https://crates.io/crates/lab/reverse_dependencies, anyways) so far and 
it compiled successfully. I think it is safe to assume it's from the 
test suite.


> These two packages don't actually use the same dependencies as > rust-lab-0.8. I normally check https://crates.io/crates/package-name 
 > to make sure I have the correct dependencies.

I also forgot to check and correct the dependencies for the lower 
versions of rust-lab. Apologies for another mistake. I'll keep that in 
mind next time.

Anyways, thanks for checking things out. :) I'll have to clean up my 
workflow for next time, write up a note or something for reminders. Just 
getting used to packaging with different tools and stuff.


Best regards,

Gabriel Arazas


[-- Attachment #2: Type: text/html, Size: 3742 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-09-16 11:38 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-15  0:52 [bug#43414] [PATCH 1/3] gnu: Add rust-lab Gabriel Arazas
2020-09-15  8:36 ` [bug#43414] [PATCH 2/3] gnu: Add rust-delta-e Gabriel Arazas
2020-09-15  8:36   ` [bug#43414] [PATCH 3/3] gnu: Add rust-ansi-colours Gabriel Arazas
2020-09-15  8:43 ` [bug#43414] [PATCH 1/3] gnu: Add rust-lab Gabriel Arazas
2020-09-16  6:49   ` bug#43414: " Efraim Flashner
2020-09-16  6:48 ` [bug#43414] " Efraim Flashner
2020-09-16 11:36 ` [bug#43414] (no subject) Gabriel Arazas

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).