A command line utility written entirely in rust that creates tarballs from folders in the current working directory and optionally remove the folders that created those tarballs
$ nix run github:gignsky/wrapd -- {optional-arguments (i.e. --help)}
$ nix shell github:gignsky/wrapd
In your flake.nix
file:
- add
inputs.wrapd.url = "github:gignsky/wrapd";
to your inputs - inside of your
environment.systemPackages
often defined under:outputs.nixosConfigurations.{hostname}.nixpkgs.lib.nixosSystem.modules
- add either:
inputs.wrapd.packages.${system}.wrapd
inputs.wrapd.packages.${system}.default
- Navigate to https://github.com/gignsky/wrapd/releases
- Download the latest (or desired) release for your operating system
- As of the time of this writing only x86_64 binaries are compiled for GNU/Linux and windows
- if using Linux run
chmod +x ./{downloaded-binary}
- if using windows you can run the binary from the command prompt or powershell in order to pass arguments, if double-click running the .exe file the default process of the binary will run in the current folder of the binary without the remove flag
- FUTURE FUNCTIONALITY INTENDED: In the future it is intended that the program will produce a dialog box that allows the user to specify which option arguments to be used.
- git clone this repository:
$ git clone https://github.com/gignsky/wrapd.git
- cd into the directory:
$ cd wrapd
- enter development environment:
$ nix develop
- build binary with justfile (uses nix build command) or build with cargo
$ just build
- nix build command
- produces a binary in
./result/bin/wrapd
$ cargo build
- cargo build command (debug)
- produces a debug binary in
./target/debug/wrapd
$ cargo build --release
- cargo build command (release)
- produces a debug binary in
./target/release/wrapd
- in order to use this compiled binary in any location one must add the binary to their $PATH (this is OS specific and not within the scope of this README)
- NOTE: This is not an issue if installed using nix, whether that be flakes and NixOS or nix shell
$ ./{downloaded-binary} {optional-arguments (i.e. --help)}
$ wrapd {optional-arguments (i.e. --help)}
A command line utility written entirely in Rust that creates tarballs from folders in the current working directory and optionally removes the folders that created those tarballs
Usage: wrapd [OPTIONS] [TARGET_DIR]
Arguments:
[TARGET_DIR] Target folder - Tarball folders in this directory - Default is current directory
Options:
-v Print Verbose output
-r, --remove Remove folders after tarballing
-d, --dry-run Dry run - List folders to be tarballed but do not create tarballs
-h, --help Print help
-V, --version Print version
This repo uses Flakes from the get-go.
# Dev shell
nix develop
# or run via cargo
nix develop -c cargo run
# build
just build
We also provide a justfile
for Makefile'esque commands to be run inside of the devShell.
You can run $ just
inside $ nix develop
to see all available just outputs
- Run
$ just update-flake
to update all flake inputs. - Run
$ just update
to update all flake inputs and cargo dependencies - Run
nix --accept-flake-config run github:juspay/omnix ci
to build all outputs. - [pre-commit] hooks will automatically be setup in Nix shell. You can also run
pre-commit run -a
manually to run the hooks (e.g.: to autoformat the project tree usingrustfmt
,nixpkgs-fmt
, etc.).