diff mbox series

[bug#39382] gnu: Add exa.

Message ID CAKf5CqXTuzq+oeH369QqBZAz-EXfOhfXZSMT+Pn1Hd-8CQyRrw@mail.gmail.com
State Accepted
Headers show
Series [bug#39382] gnu: Add exa. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch fail View Laminar job

Commit Message

John Soo Feb. 1, 2020, 5:35 p.m. UTC
Hi guix,

exa is an ls written in rust with a few extra "modern" touches.

Thanks!

John

Comments

Efraim Flashner Feb. 6, 2020, 8:56 a.m. UTC | #1
I have to say I don't like the colors at all. Way too much.

There were a couple of changes I made across the patches. Sometimes the
default description was lacking and I changed it (This package provides
a ...). Where possible I removed the skip-build? argument.

On a side note I borrowed a patch from Debian to mark rust-openssl-sys
as providing rust-openssl-src and I was able to shorten one of the
phases in exa.

rust-datetime-0.4 actually wants rust-regex-0.1 for
cargo-development-inputs, so I added it in and commented it out. I think
I have a package for it locally, but I'm not sure it's really worth
adding.
diff mbox series

Patch

From bbf0bfa79cdb94f8d019f9e97108b0d74acbb4e5 Mon Sep 17 00:00:00 2001
From: John Soo <jsoo1@asu.edu>
Date: Fri, 31 Jan 2020 20:51:17 -0800
Subject: [PATCH 22/22] gnu: Add exa.

* gnu/packages/rust-apps.scm (exa): New variable.
---
 gnu/packages/rust-apps.scm | 82 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 82 insertions(+)

diff --git a/gnu/packages/rust-apps.scm b/gnu/packages/rust-apps.scm
index 90bd146442..daa2a5f83f 100644
--- a/gnu/packages/rust-apps.scm
+++ b/gnu/packages/rust-apps.scm
@@ -28,6 +28,88 @@ 
   #:use-module (gnu packages tls)
   #:use-module (gnu packages version-control))
 
+(define-public exa
+  (package
+    (name "exa")
+    (version "0.9.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (crate-uri "exa" version))
+       (file-name
+        (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32
+         "1s902xgplz1167k0r7x235p914lprpsqy2if0kpa1mlb0fswqqq4"))))
+    (build-system cargo-build-system)
+    (arguments
+     `(#:cargo-inputs
+       (("rust-ansi-term" ,rust-ansi-term-0.12)
+        ("rust-datetime" ,rust-datetime-0.4)
+        ("rust-env-logger" ,rust-env-logger-0.6)
+        ("rust-git2" ,rust-git2-0.9)
+        ("rust-glob" ,rust-glob-0.3)
+        ("rust-lazy-static" ,rust-lazy-static-1.3)
+        ("rust-libc" ,rust-libc-0.2)
+        ("rust-locale" ,rust-locale-0.2)
+        ("rust-log" ,rust-log-0.4)
+        ("rust-natord" ,rust-natord-1.0)
+        ("rust-num-cpus" ,rust-num-cpus-1.11)
+        ("rust-number-prefix" ,rust-number-prefix-0.3)
+        ("rust-scoped-threadpool" ,rust-scoped-threadpool-0.1)
+        ("rust-term-grid" ,rust-term-grid-0.1)
+        ("rust-term-size" ,rust-term-size-0.3)
+        ("rust-unicode-width" ,rust-unicode-width-0.1)
+        ("rust-users" ,rust-users-0.9)
+        ("rust-zoneinfo-compiled" ,rust-zoneinfo-compiled-0.4))
+       #:cargo-development-inputs
+       (("rust-datetime" ,rust-datetime-0.4))
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'configure 'dont-vendor-sources
+           (lambda* (#:key inputs #:allow-other-keys)
+             (substitute*
+                 "guix-vendor/rust-openssl-sys-0.9.53.crate/Cargo.toml"
+               (("\\[build-dependencies.openssl-src\\]") "")
+               (("version = \"111.0.1\"") "")
+               (("optional = true") "")
+               (("vendored = \\[\"openssl-src\"\\]") "vendored = []"))
+             (let ((openssl (assoc-ref inputs "openssl")))
+               (setenv "OPENSSL_DIR" openssl))
+             #t))
+         ;; Ignoring failing tests.
+         ;; Reported in https://github.com/ogham/exa/issues/318
+         (add-before 'check 'disable-failing-tests
+           (lambda _
+             (substitute* "src/options/mod.rs"
+               (("^.*fn oneline_across.*" oneline-across)
+                (string-append "#[ignore]\n" oneline-across)))
+
+             (substitute* "src/options/view.rs"
+               (("test!\\(across:.*") "")
+               (("test!\\(empty:.*") "")
+               (("test!\\(gracross:.*") "")
+               (("test!\\(grid:.*") "")
+               (("test!\\(icons:.*") "")
+               (("test!\\(just_binary:.*") "")
+               (("test!\\(just_blocks:.*") "")
+               (("test!\\(just_bytes:.*") "")
+               (("test!\\(just_git:.*") "")
+               (("test!\\(just_group:.*") "")
+               (("test!\\(just_header:.*") "")
+               (("test!\\(just_inode:.*") "")
+               (("test!\\(just_links:.*") "")
+               (("test!\\(leg:.*") "")
+               (("test!\\(lid:.*") "")
+               (("test!\\(original_g:.*") ""))
+             #t)))))
+    (inputs `(("zlib" ,zlib)))
+    (native-inputs `(("pkg-config" ,pkg-config)))
+    (home-page "https://the.exa.website/")
+    (synopsis "Modern replacement for ls")
+    (description "This package provides a modern replacement for ls.")
+    (license license:expat)))
+
 (define-public ripgrep
   (package
     (name "ripgrep")
-- 
2.25.0