瀏覽代碼

Merge branch 'main' into create-statically-linked-binaries

MartinFillon 2 年之前
父節點
當前提交
03ba014280
共有 6 個文件被更改,包括 26 次插入11 次删除
  1. 4 3
      Justfile
  2. 8 0
      README.md
  3. 6 6
      flake.nix
  4. 1 1
      man/eza.1.md
  5. 6 0
      man/eza_colors-explanation.5.md
  6. 1 1
      man/eza_colors.5.md

+ 4 - 3
Justfile

@@ -74,9 +74,10 @@ all-release: build-release test-release
 # build the man pages
 @man:
     mkdir -p "${CARGO_TARGET_DIR:-target}/man"
-    pandoc --standalone -f markdown -t man man/eza.1.md        > "${CARGO_TARGET_DIR:-target}/man/eza.1"
-    pandoc --standalone -f markdown -t man man/eza_colors.5.md > "${CARGO_TARGET_DIR:-target}/man/eza_colors.5"
-    pandoc --standalone -f markdown -t man man/eza_colors-explanation.5.md > "${CARGO_TARGET_DIR:-target}/man/eza_colors-explanation.5"
+    version=$(cat Cargo.toml | grep ^version | head -n 1 | awk '{print $NF}' | tr -d '"'); \
+    for page in eza.1 eza_colors.5 eza_colors-explanation.5; do \
+        pandoc --standalone -f markdown -t man <(cat "man/${page}.md" | sed "s/\$version/v${version}/g") > "${CARGO_TARGET_DIR:-target}/man/${page}"; \
+    done;
 
 # build and preview the main man page (eza.1)
 @man-1-preview: man

+ 8 - 0
README.md

@@ -181,6 +181,14 @@ Eza is available as the [eza](https://github.com/void-linux/void-packages/tree/m
 sudo xbps-install eza
 ```
 
+### Termux
+
+Eza is available as the [eza](https://github.com/termux/termux-packages/tree/master/packages/eza) package in the official Termux repository.
+
+```bash
+pkg install eza
+```
+
 ### Brew (MacOS)
 
 [![Homebrew package](https://repology.org/badge/version-for-repo/homebrew/eza.svg)](https://repology.org/project/eza/versions)

+ 6 - 6
flake.nix

@@ -34,14 +34,14 @@
         };
 
         treefmtEval = treefmt-nix.lib.evalModule pkgs ./treefmt.nix;
-        buildInputs = with pkgs; lib.optionals stdenv.isDarwin [libiconv darwin.apple_sdk.frameworks.Security];
+        buildInputs = with pkgs; [zlib] ++ lib.optionals stdenv.isDarwin [libiconv darwin.apple_sdk.frameworks.Security];
       in rec {
         # For `nix fmt`
         formatter = treefmtEval.config.build.wrapper;
 
         packages = {
           # For `nix build` `nix run`, & `nix profile install`:
-          default = naersk'.buildPackage {
+          default = naersk'.buildPackage rec {
             pname = "eza";
             version = "latest";
 
@@ -50,7 +50,7 @@
 
             # buildInputs = with pkgs; [ zlib ]
             #   ++ lib.optionals stdenv.isDarwin [ libiconv Security ];
-            buildInputs = buildInputs ++ (with pkgs; [zlib]);
+            inherit buildInputs;
 
             nativeBuildInputs = with pkgs; [cmake pkg-config installShellFiles pandoc];
 
@@ -61,9 +61,9 @@
             # outputs = [ "out" "man" ];
 
             postInstall = ''
-              pandoc --standalone -f markdown -t man man/eza.1.md > man/eza.1
-              pandoc --standalone -f markdown -t man man/eza_colors.5.md > man/eza_colors.5
-              pandoc --standalone -f markdown -t man man/eza_colors-explanation.5.md > man/eza_colors-explanation.5
+              pandoc --standalone -f markdown -t man <(cat "man/eza.1.md" | sed "s/\$version/${version}/g") > man/eza.1
+              pandoc --standalone -f markdown -t man <(cat "man/eza_colors.5.md" | sed "s/\$version/${version}/g") > man/eza_colors.5
+              pandoc --standalone -f markdown -t man <(cat "man/eza_colors-explanation.5.md" | sed "s/\$version/${version}/g")> man/eza_colors-explanation.5
               installManPage man/eza.1 man/eza_colors.5 man/eza_colors-explanation.5
               installShellCompletion \
                 --bash completions/bash/eza \

+ 1 - 1
man/eza.1.md

@@ -1,4 +1,4 @@
-% eza(1) v0.9.0
+% eza(1) $version
 
 <!-- This is the eza(1) man page, written in Markdown. -->
 <!-- To generate the roff version, run `just man`, -->

+ 6 - 0
man/eza_colors-explanation.5.md

@@ -1,3 +1,9 @@
+% eza_colors-explanation(5) $version
+
+<!-- This is the eza_colors-explanation(5) man page, written in Markdown. -->
+<!-- To generate the roff version, run `just man`, -->
+<!-- and the man page will appear in the ‘target’ directory. -->
+
 # Name
 
 eza_colors-explanation — more details on customizing eza colors

+ 1 - 1
man/eza_colors.5.md

@@ -1,4 +1,4 @@
-% eza_colors(5) v0.9.0
+% eza_colors(5) $version
 
 <!-- This is the eza_colors(5) man page, written in Markdown. -->
 <!-- To generate the roff version, run `just man`, -->