https://github.com/rupurt/xxdnix
Nix flake for xxd supporting wider columns
https://github.com/rupurt/xxdnix
Last synced: about 1 year ago
JSON representation
Nix flake for xxd supporting wider columns
- Host: GitHub
- URL: https://github.com/rupurt/xxdnix
- Owner: rupurt
- License: mit
- Created: 2023-06-13T23:51:08.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-07-26T16:28:54.000Z (almost 3 years ago)
- Last Synced: 2025-02-05T06:46:24.126Z (over 1 year ago)
- Language: C
- Homepage:
- Size: 12.7 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# xxdnix
Nix [flake](https://nixos.wiki/wiki/Flakes) for [xxd](https://manpages.org/xxd) supporting wider columns
- 384
- 512
- 768
- 1024 `[default]`
Based on [https://grail.eecs.csuohio.edu/~somos/xxd.c](https://grail.eecs.csuohio.edu/~somos/xxd.c)
### Option 1. Use the `xxd` CLI within your own flake
```nix
{
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.
```sh
# run from devshell
nix develop -c $SHELL
xxd --version
```
```sh
# run as application
nix run .#xxd -- --version
```
### Option 2. Run the `xxd` CLI directly with `nix run`
```nix
nix run github:rupurt/xxdnix -- --version
```
## Authors
- Alex Kwiatkowski - alex+git@fremantle.io
## License
`xxdnix` is released under the [MIT license](./LICENSE)