From 7f79f8b1671dcb0715d35e8a544087f739696963 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christina=20S=C3=B8rensen?= Date: Sat, 29 Jul 2023 18:44:32 +0200 Subject: [PATCH 1/6] doc(nix): add `nix run` to readme MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Christina Sørensen --- README.md | 50 +++++++++++++++++++++++++++++++------------------- 1 file changed, 31 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index 72b23df1d..c395d70b2 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,37 @@ By deliberately making some decisions differently, eza attempts to be a more fea For more information, see [exa’s website](https://the.exa.website/). +--- + + +

Try it!

+
+ +### Nix + +If you already have Nix setup with flake support, you can try out eza with the `nix run` command: + + nix run github:cafkafk/eza + +Nix will built eza and run it. If you want to pass arguments this way, use e.g. `nix run github:cafkafk/eza -- -ol`. + + +

Installation

+
+ +eza is available for macOS and Linux. + +### Cargo + +If you already have a Rust environment set up, you can use the `cargo install` command: + + cargo install eza + +Cargo will build the `eza` binary and place it in `$HOME/.cargo`. + +To build without Git support, run `cargo install --no-default-features eza` is also available, if the requisite dependencies are not installed. + + --- @@ -94,25 +125,6 @@ Some of the options accept parameters: - Valid time styles are **default**, **iso**, **long-iso**, and **full-iso**. ---- - - -

Installation

-
- -eza is available for macOS and Linux. - -### Cargo - -If you already have a Rust environment set up, you can use the `cargo install` command: - - cargo install eza - -Cargo will build the `eza` binary and place it in `$HOME/.cargo`. - -To build without Git support, run `cargo install --no-default-features eza` is also available, if the requisite dependencies are not installed. - - --- From 752eb5f6d57db5d6e123b4e5035c3d79108eb6dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christina=20S=C3=B8rensen?= Date: Sat, 29 Jul 2023 18:45:30 +0200 Subject: [PATCH 2/6] doc(nix): fix flow issue MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Christina Sørensen --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c395d70b2..aa63d995a 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,9 @@ If you already have Nix setup with flake support, you can try out eza with the ` nix run github:cafkafk/eza -Nix will built eza and run it. If you want to pass arguments this way, use e.g. `nix run github:cafkafk/eza -- -ol`. +Nix will built eza and run it. + +If you want to pass arguments this way, use e.g. `nix run github:cafkafk/eza -- -ol`.

Installation

From e7e5191f471de7183197fd3ca8e376ee7a60a455 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christina=20S=C3=B8rensen?= Date: Sat, 29 Jul 2023 18:46:44 +0200 Subject: [PATCH 3/6] doc(nix): fix typos MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Christina Sørensen --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index aa63d995a..c611036a8 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ If you already have Nix setup with flake support, you can try out eza with the ` nix run github:cafkafk/eza -Nix will built eza and run it. +Nix will build eza and run it. If you want to pass arguments this way, use e.g. `nix run github:cafkafk/eza -- -ol`. From 886ee74021b3fb43eeca0604d2bcdde96062d5ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christina=20S=C3=B8rensen?= Date: Sat, 29 Jul 2023 16:48:45 +0000 Subject: [PATCH 4/6] doc(nix): add mandatory snowflake emoji MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Christina Sørensen --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c611036a8..047cbf0b2 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ For more information, see [exa’s website](https://the.exa.website/).

Try it!

-### Nix +### Nix ❄️ If you already have Nix setup with flake support, you can try out eza with the `nix run` command: From 4dcf9276226b6218a1114cee6e49414d75fbc302 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christina=20S=C3=B8rensen?= Date: Sat, 29 Jul 2023 18:53:19 +0200 Subject: [PATCH 5/6] test: change to /usr/bin/env bash MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Christina Sørensen --- devtools/dev-create-test-filesystem.sh | 2 +- devtools/dev-fixtures.sh | 2 +- devtools/dev-run-debug.sh | 2 +- devtools/dev-run-release.sh | 2 +- devtools/dev-set-up-environment.sh | 2 +- xtests/run.sh | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/devtools/dev-create-test-filesystem.sh b/devtools/dev-create-test-filesystem.sh index 74d5e2ea4..ac8e8c49b 100755 --- a/devtools/dev-create-test-filesystem.sh +++ b/devtools/dev-create-test-filesystem.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # This script creates a bunch of awkward test case files. It gets # automatically run as part of Vagrant provisioning. trap 'exit' ERR diff --git a/devtools/dev-fixtures.sh b/devtools/dev-fixtures.sh index 34256b675..9710b574f 100644 --- a/devtools/dev-fixtures.sh +++ b/devtools/dev-fixtures.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # This file contains the text fixtures — the known, constant data — that are # used when setting up the environment that exa’s tests get run in. diff --git a/devtools/dev-run-debug.sh b/devtools/dev-run-debug.sh index 83b96fe87..2e69afecb 100755 --- a/devtools/dev-run-debug.sh +++ b/devtools/dev-run-debug.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash if [[ -f ~/target/debug/exa ]]; then ~/target/debug/exa "$@" else diff --git a/devtools/dev-run-release.sh b/devtools/dev-run-release.sh index 314e0154e..d8f3e3634 100755 --- a/devtools/dev-run-release.sh +++ b/devtools/dev-run-release.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash if [[ -f ~/target/release/exa ]]; then ~/target/release/exa "$@" else diff --git a/devtools/dev-set-up-environment.sh b/devtools/dev-set-up-environment.sh index 518e6e40c..d590a9dee 100755 --- a/devtools/dev-set-up-environment.sh +++ b/devtools/dev-set-up-environment.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash if [[ ! -d "/vagrant" ]]; then echo "This script should be run in the Vagrant environment" diff --git a/xtests/run.sh b/xtests/run.sh index bbae83bc9..339570638 100755 --- a/xtests/run.sh +++ b/xtests/run.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash trap 'exit' ERR # Check for release mode From 096afe8fd815aa9859dfe26e09ef2b273fcba5b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christina=20S=C3=B8rensen?= Date: Sat, 29 Jul 2023 19:01:08 +0200 Subject: [PATCH 6/6] doc(nix): document nix flake development MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Christina Sørensen --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index 047cbf0b2..6e6cb8b92 100644 --- a/README.md +++ b/README.md @@ -170,6 +170,18 @@ The full command is `cargo build --release --target=x86_64-unknown-linux-musl -- For more information, see the [Building from Source page](https://the.exa.website/install/source). +### Developing on Nix (experimental) ❄️ + +If you have a working Nix installation with flake support, you can use nix to manage your dev environment. + + nix develop + +The Nix Flake has a few features: +- Run `nix flake check` to run `treefmt` on the repo. +- Run `nix build` and manually test `./results/bin/eza -- ` for easy debugging. +- Run `nix build .#test` to run `cargo test` via the flake. +- Run `nix build .#clippy` to lint with clippy (still work in progress). + ### Testing with Vagrant