Skip to content

Commit

Permalink
Merge branch 'main' into Introduce-Clap-POC
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinFillon committed Sep 8, 2023
2 parents f78d00d + f5b4f75 commit 14fa6d1
Show file tree
Hide file tree
Showing 12 changed files with 316 additions and 255 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/flake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
name: Build Nix targets
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Check Nix flake inputs
uses: DeterminateSystems/flake-checker-action@v5 # This action
- name: Install Nix
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/flakehub-backfill.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
id-token: "write"
contents: "read"
steps:
- uses: "actions/checkout@v3"
- uses: "actions/checkout@v4"
with:
ref: "refs/tags/${{ inputs.tag }}"
- uses: "DeterminateSystems/nix-installer-action@main"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/flakehub-publish-tagged.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
id-token: "write"
contents: "read"
steps:
- uses: "actions/checkout@v3"
- uses: "actions/checkout@v4"
- uses: "DeterminateSystems/nix-installer-action@main"
- uses: "DeterminateSystems/flakehub-push@main"
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@v1
Expand Down
49 changes: 34 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ eza is a modern, maintained replacement for ls, built on [exa](https://github.co
**README Sections:** [Options](#options)[Installation](#installation)[Development](#development)

[![Built with Nix](https://img.shields.io/badge/Built_With-Nix-5277C3.svg?logo=nixos&labelColor=73C3D5)](https://nixos.org)
[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg)](code_of_conduct.md)
[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg)](CODE_OF_CONDUCT.md)
<a href="https://matrix.to/#/#eza:gitter.im"><img alt="Gitter" src="https://img.shields.io/gitter/room/eza-community/eza?logo=element&link=https%3A%2F%2Fapp.gitter.im%2F%23%2Froom%2F%23eza%3Agitter.im&link=Gitter%20matrix%20room%20for%20Eza"></a>

[![Unit tests](https://github.com/eza-community/eza/actions/workflows/unit-tests.yml/badge.svg)](https://github.com/eza-community/eza/actions/workflows/unit-tests.yml)
Expand Down Expand Up @@ -60,7 +60,7 @@ If you want to pass arguments this way, use e.g. `nix run github:eza-community/e
<h1>Installation</h1>
</a>

eza is available for macOS and Linux.
eza is available for Windows, macOS and Linux.

### Cargo (crates.io)

Expand All @@ -83,11 +83,30 @@ If you already have a Rust environment set up, you can use the `cargo install` c
Cargo will build the `eza` binary and place it in `$HOME/.cargo`.

### Arch Linux
[![AUR package](https://repology.org/badge/version-for-repo/aur/eza.svg)](https://repology.org/project/eza/versions)

Eza is available in the [AUR](https://aur.archlinux.org/packages/eza-git).
[![Arch Linux package](https://repology.org/badge/version-for-repo/arch/eza.svg)](https://repology.org/project/eza/versions)

Eza is available in the [\[extra\]](https://archlinux.org/packages/extra/x86_64/eza/) repository of Arch Linux.

```bash
pacman -S eza
```

### Debian and Ubuntu

Eza is available from [deb.gierens.de](http://deb.gierens.de). The GPG public
key is in this repo under [deb.asc](/deb.asc).

To install eza from this repo use:
```bash
wget -qO- https://raw.githubusercontent.com/eza-community/eza/main/deb.asc | sudo tee /etc/apt/trusted.gpg.d/gierens.asc
echo "deb http://deb.gierens.de stable main" | sudo tee /etc/apt/sources.list.d/gierens.list
sudo apt update
sudo apt install -y eza
```

### Nix (Linux, MacOS)

### Nix
[![nixpkgs unstable package](https://repology.org/badge/version-for-repo/nix_unstable/eza.svg)](https://repology.org/project/eza/versions)

Eza is available from [Nixpkgs](https://github.com/NixOS/nixpkgs).
Expand All @@ -104,18 +123,18 @@ For `nix-env` users:
nix-env -i eza
```

### Debian and Ubuntu
Eza is available from [deb.gierens.de](http://deb.gierens.de). The GPG public
key is in this repo under [deb.asc](/deb.asc).
### Brew (MacOS)

[![Homebrew package](https://repology.org/badge/version-for-repo/homebrew/eza.svg)](https://repology.org/project/eza/versions)

To install eza from this repo use:
```bash
wget -qO- https://raw.githubusercontent.com/eza-community/eza/main/deb.asc | sudo tee /etc/apt/trusted.gpg.d/gierens.asc
echo "deb http://deb.gierens.de stable main" | sudo tee /etc/apt/sources.list.d/gierens.list
sudo apt update
sudo apt install -y eza
```

Eza is available from [Homebrew](https://formulae.brew.sh/formula/eza#default).

To install eza, run:

```shell
brew install eza
```

---
Click sections to expand.
Expand Down
38 changes: 37 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,47 @@
mode = "clippy";
inherit buildInputs;
};

vhs = pkgs.buildGoModule rec {
pname = "vhs";
version = "0.6.0";

src = pkgs.fetchFromGitHub {
owner = "PThorpe92";
repo = pname;
rev = "70ff84c3b192a2f3379adf56dd873c63bc8163ac";
hash = "sha256-QgE9XpJKZSJDjY2Z2GC1ndWgwXOJaB1fzvGUGFFf5XM=";
};

vendorHash = "sha256-zugGnhLrqqqVjMFZrO4rrSj3UzyHWpLra1rxyGG2ga4=";

nativeBuildInputs = with pkgs; [installShellFiles makeWrapper];

ldflags = ["-s" "-w" "-X=main.Version=${version}"];

postInstall = ''
wrapProgram $out/bin/vhs --prefix PATH : ${pkgs.lib.makeBinPath (pkgs.lib.optionals pkgs.stdenv.isLinux [pkgs.chromium] ++ [pkgs.ffmpeg pkgs.ttyd])}
$out/bin/vhs man > vhs.1
installManPage vhs.1
installShellCompletion --cmd vhs \
--bash <($out/bin/vhs completion bash) \
--fish <($out/bin/vhs completion fish) \
--zsh <($out/bin/vhs completion zsh)
'';

meta = with pkgs.lib; {
description = "A tool for generating terminal GIFs with code";
homepage = "https://github.com/charmbracelet/vhs";
changelog = "https://github.com/charmbracelet/vhs/releases/tag/v${version}";
license = licenses.mit;
maintainers = with maintainers; [cafkafk];
};
};
};

# For `nix develop`:
devShells.default = pkgs.mkShell {
nativeBuildInputs = with pkgs; [toolchain just pandoc vhs convco];
nativeBuildInputs = with pkgs; [toolchain just pandoc packages.vhs convco];
};

# For `nix flake check`
Expand Down
72 changes: 36 additions & 36 deletions tests/references/eza-blocksize.txt
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@

────────────────────────────────────────────────────────────────────────────────
> cd tests/itest
> cargo run -q -- -l --blocksize
> cargo run -q -- -l --blocksize --no-user --no-time --no-filesize



Expand All @@ -94,7 +94,7 @@

────────────────────────────────────────────────────────────────────────────────
> cd tests/itest
> cargo run -q -- -l --blocksize
> cargo run -q -- -l --blocksize --no-user --no-time --no-filesize



Expand All @@ -113,40 +113,40 @@

────────────────────────────────────────────────────────────────────────────────
> cd tests/itest
> cargo run -q -- -l --blocksize
.rw-r--r-- 0 0 ces 20 Aug 06:45 a
.rw-r--r-- 0 0 ces 20 Aug 06:45 b
.rw-r--r-- 0 0 ces 20 Aug 06:45 c
.rw-r--r-- 0 0 ces 20 Aug 06:45 d
.rw-r--r-- 0 0 ces 20 Aug 06:45 e
.rw-r--r-- 0 0 ces 20 Aug 06:45 f
.rw-r--r-- 0 0 ces 20 Aug 06:45 g
.rw-r--r-- 0 0 ces 20 Aug 06:45 h
.rw-r--r-- 0 0 ces 20 Aug 06:45 i
.rw-r--r-- 0 0 ces 20 Aug 06:45 j
.rw-r--r-- 0 0 ces 20 Aug 06:45 k
.rw-r--r-- 0 0 ces 20 Aug 06:45 l
.rw-r--r-- 0 0 ces 20 Aug 06:45 m
.rw-r--r-- 0 0 ces 20 Aug 06:45 n
.rw-r--r-- 0 0 ces 20 Aug 06:45 o
.rw-r--r-- 0 0 ces 20 Aug 06:45 p
> cargo run -q -- -l --blocksize --no-user --no-time --no-filesize
.rw-r--r-- 0 a
.rw-r--r-- 0 b
.rw-r--r-- 0 c
.rw-r--r-- 0 d
.rw-r--r-- 0 e
.rw-r--r-- 0 f
.rw-r--r-- 0 g
.rw-r--r-- 0 h
.rw-r--r-- 0 i
.rw-r--r-- 0 j
.rw-r--r-- 0 k
.rw-r--r-- 0 l
.rw-r--r-- 0 m
.rw-r--r-- 0 n
.rw-r--r-- 0 o
.rw-r--r-- 0 p
────────────────────────────────────────────────────────────────────────────────
> cd tests/itest
> cargo run -q -- -l --blocksize
.rw-r--r-- 0 0 ces 20 Aug 06:45 a
.rw-r--r-- 0 0 ces 20 Aug 06:45 b
.rw-r--r-- 0 0 ces 20 Aug 06:45 c
.rw-r--r-- 0 0 ces 20 Aug 06:45 d
.rw-r--r-- 0 0 ces 20 Aug 06:45 e
.rw-r--r-- 0 0 ces 20 Aug 06:45 f
.rw-r--r-- 0 0 ces 20 Aug 06:45 g
.rw-r--r-- 0 0 ces 20 Aug 06:45 h
.rw-r--r-- 0 0 ces 20 Aug 06:45 i
.rw-r--r-- 0 0 ces 20 Aug 06:45 j
.rw-r--r-- 0 0 ces 20 Aug 06:45 k
.rw-r--r-- 0 0 ces 20 Aug 06:45 l
.rw-r--r-- 0 0 ces 20 Aug 06:45 m
.rw-r--r-- 0 0 ces 20 Aug 06:45 n
.rw-r--r-- 0 0 ces 20 Aug 06:45 o
.rw-r--r-- 0 0 ces 20 Aug 06:45 p
> cargo run -q -- -l --blocksize --no-user --no-time --no-filesize
.rw-r--r-- 0 a
.rw-r--r-- 0 b
.rw-r--r-- 0 c
.rw-r--r-- 0 d
.rw-r--r-- 0 e
.rw-r--r-- 0 f
.rw-r--r-- 0 g
.rw-r--r-- 0 h
.rw-r--r-- 0 i
.rw-r--r-- 0 j
.rw-r--r-- 0 k
.rw-r--r-- 0 l
.rw-r--r-- 0 m
.rw-r--r-- 0 n
.rw-r--r-- 0 o
.rw-r--r-- 0 p
────────────────────────────────────────────────────────────────────────────────
Loading

0 comments on commit 14fa6d1

Please sign in to comment.