Skip to content

Latest commit

 

History

History
73 lines (58 loc) · 1.33 KB

README.md

File metadata and controls

73 lines (58 loc) · 1.33 KB

xxdnix

Nix flake for xxd supporting wider columns

  • 384
  • 512
  • 768
  • 1024 [default]

Based on https://grail.eecs.csuohio.edu/~somos/xxd.c

Option 1. Use the xxd CLI within your own flake

{
  inputs.nixpkgs.url = "github:nixos/nixpkgs";
  inputs.xxd.url = "github:rupurt/xxd";
  inputs.flake-utils.url = "github:numtide/flake-utils";

  outputs = {
    self,
    nixpkgs,
    flake-utils,
    xxd,
    ...
  }:
    flake-utils.lib.eachDefaultSystem (system:
      let
        pkgs = import nixpkgs {
          inherit system;
          overlays = [
            xxd.overlays.default
          ];
        };
      in
      {
        devShells.default = pkgs.mkShell {
          packages = [
            pkgs.xxd
          ];
        };
      }
    );
}

The above config will add xxd to your dev shell and also allow you to execute it through the nix CLI utilities.

# run from devshell
nix develop -c $SHELL
xxd --version
# run as application
nix run .#xxd -- --version

Option 2. Run the xxd CLI directly with nix run

nix run github:rupurt/xxdnix -- --version

Authors

License

xxdnix is released under the MIT license