[PATCH 1/3] gnu: Add rust-lab.

  • Done
  • quality assurance status badge
Details
2 participants
  • Efraim Flashner
  • Gabriel Arazas
Owner
unassigned
Submitted by
Gabriel Arazas
Severity
normal
G
G
Gabriel Arazas wrote on 15 Sep 2020 02:52
(address . guix-patches@gnu.org)(name . Gabriel Arazas)(address . foo.dogsquared@gmail.com)
20200915005226.1978-1-foo.dogsquared@gmail.com
* 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(+)

Toggle diff (74 lines)
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
G
G
Gabriel Arazas wrote on 15 Sep 2020 10:36
[PATCH 2/3] gnu: Add rust-delta-e.
(address . 43414@debbugs.gnu.org)(name . Gabriel Arazas)(address . foo.dogsquared@gmail.com)
20200915083628.2791-1-foo.dogsquared@gmail.com
* gnu/packages/crates-io.scm (rust-delta-e-0.2): New variable.
---
gnu/packages/crates-io.scm | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)

Toggle diff (38 lines)
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
G
G
Gabriel Arazas wrote on 15 Sep 2020 10:36
[PATCH 3/3] gnu: Add rust-ansi-colours.
(address . 43414@debbugs.gnu.org)(name . Gabriel Arazas)(address . foo.dogsquared@gmail.com)
20200915083628.2791-2-foo.dogsquared@gmail.com
* gnu/packages/crates-io.scm (rust-ansi-colours-1.0): New variable.
---
gnu/packages/crates-io.scm | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)

Toggle diff (41 lines)
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
G
G
Gabriel Arazas wrote on 15 Sep 2020 10:43
[PATCH 1/3] gnu: Add rust-lab.
(address . 43414@debbugs.gnu.org)
ca2a800f-154a-44c3-a1ea-56eb86844d0a@gmail.com
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
E
E
Efraim Flashner wrote on 16 Sep 2020 08:48
(name . Gabriel Arazas)(address . foo.dogsquared@gmail.com)(address . 43414@debbugs.gnu.org)
20200916064840.GB19874@E5400
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:
Toggle quote (38 lines)
> * 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

Toggle quote (10 lines)
> + (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.

Toggle quote (37 lines)
> +(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.




--
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
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(+)

Toggle diff (89 lines)
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
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAl9htUcACgkQQarn3Mo9
g1FSvw/9EXdQKaclKWkAtRQeZJbGNVm+KUJJncEJvevTQyzO5Dy89c5ug24W/6gh
yhZjX/xTmTdF1aDQdFJLiJcWk6gam3FyWhYHyE3gUYm7yYIuLda/H0Um0oaiYDpa
daxQ+BEUkHzlSG81KF42bXvo/2PFd+imvZnHAibZs+Y1sJKtoOE1lkZJNYdDA8Ld
FWrS+Zs5VZ2BT444keplH4iNLaU7gg6PJSFgzDhPwYDPFhJg9G0dUCkWATT0Zo1B
9TEq95qTKpKbFBH/ZjEQYuK4j/pWSGWbwLVyjEhlj3aYCef41MocUuRmSdxTlYjh
B6SqTwa8JbHW96k5F34SFT3gMSd2n3l8gdyyIyNuDPcfKdW0N288aX85Z8KwHacc
jCG4eRzZNE/9GHQUqZ3X9KxW1Ydar2Z1kkjBbJCJ9nzgaFx1qXkB1ATrFhH8GyRD
+aXPhSMaBaPy6jH27VHNe5cJd0+HrENrA7avQLx4DXoAoy3nk1+Ba75EJlzU1jCX
teuB/9gtpPwFcT5bymp6HhK6mwR9yjpNJRavCYtR+sE75G2UgnP1ZMskXab9OmTF
iHl93HRD0FtYKK9PfPRnxqUJchEYjAifdjpzJ3m/tIoLkGUbsNJOeTaRrJCm+9xA
YWcODDcpspCrs+JkZHVToaXS+t8awCjX6eD379Wod2XHbXaxAaM=
=SaZS
-----END PGP SIGNATURE-----


E
E
Efraim Flashner wrote on 16 Sep 2020 08:49
(name . Gabriel Arazas)(address . foo.dogsquared@gmail.com)(address . 43414-done@debbugs.gnu.org)
20200916064944.GC19874@E5400
On Tue, Sep 15, 2020 at 04:43:01PM +0800, Gabriel Arazas wrote:
Toggle quote (9 lines)
> 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 :)

Toggle quote (5 lines)
>
> 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
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAl9htYcACgkQQarn3Mo9
g1Hl6A//Zcb+aistoqtzrT3Womu6138ccdFExBld224a+0ya18756WibPzlyZbVi
9mpRsK9YONVox0ElLmzYfsuVhWaFWCCvzaZJbMPxg6z1CysFfpsAF1itEkhGaEkr
UYHDhWte1t70Q7UJ08rx3CwAGjIyDpt0I5LQkjL+W+opO8DWn4RlHZYCRktvthjH
ySU06AUJeDeEyjZ5DoZUe6RHLPVVWXClszcfLdGxU1hziQo1DvIiFRnn21BjeKVz
7XD3OLHMIcG1FpjhRrduIZGASxrCNu652c0kKIl0E1o4K1QPL/36FWmlRHfjiEpl
wfmNY8qXEKvUG67SCbANPAA2OBzwsaSxpR41mm4UYNXVcuNuG20Ol0aqmpEJgExY
mOfRGYE8Gkgmuz4RVlYcaIf/kL4LbRv5XOX+m7cqh8fLYkAyDShd1j+Wlwmpp4a1
CZaoeH964kH9PrlZBdopjVXIVvt+7oaSQBBWsO3cjXNolAEJ6ZBTgBDmQwkc1tt5
aLsQ/8MEOjJzAvJdS5RBNj1t/oq6I1DISc/rJg8t1QWYCMtHXTrDs+YCzzVK9RGS
UcJjmDP3s6T7DIIodb1eg9564sc6/7yiCJwkDf34M9wxqxuvMLyFX6nSVd7Hc9zh
4BWY1H///lKF2648FIMvLMXWSGNpTio3MGkAiLWyk0+RNNNhYws=
=SSeP
-----END PGP SIGNATURE-----


Closed
G
G
Gabriel Arazas wrote on 16 Sep 2020 13:36
(no subject)
(address . 43414@debbugs.gnu.org)
0710a5a6-9fba-86f3-6157-95b2d777527b@gmail.com
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,
it compiled successfully. I think it is safe to assume it's from the
test suite.


Toggle quote (1 lines)
> 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: file
?