Skip to content

gignsky/wrapd

Repository files navigation

CI Nix Docs Release Update README with --help Output

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

Installation & Usage

Run immediately without installing (using Nix)

$ nix run github:gignsky/wrapd -- {optional-arguments (i.e. --help)}

Installation

With Nix Shell (temporary installation in current shell)

$ nix shell github:gignsky/wrapd

With NixOS (using flakes)

In your flake.nix file:

  1. add inputs.wrapd.url = "github:gignsky/wrapd"; to your inputs
  2. inside of your environment.systemPackages often defined under: outputs.nixosConfigurations.{hostname}.nixpkgs.lib.nixosSystem.modules
  3. add either:
    1. inputs.wrapd.packages.${system}.wrapd
    2. inputs.wrapd.packages.${system}.default

Download the binary

  1. Navigate to https://github.com/gignsky/wrapd/releases
  2. Download the latest (or desired) release for your operating system
    1. As of the time of this writing only x86_64 binaries are compiled for GNU/Linux and windows
  3. if using Linux run chmod +x ./{downloaded-binary}
  4. 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
    1. 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.

Compile the binary yourself

  1. git clone this repository:
    1. $ git clone https://github.com/gignsky/wrapd.git
  2. cd into the directory:
    1. $ cd wrapd
  3. enter development environment:
    1. $ nix develop
  4. build binary with justfile (uses nix build command) or build with cargo
    1. $ just build
      1. nix build command
      2. produces a binary in ./result/bin/wrapd
    2. $ cargo build
      1. cargo build command (debug)
      2. produces a debug binary in ./target/debug/wrapd
    3. $ cargo build --release
      1. cargo build command (release)
      2. produces a debug binary in ./target/release/wrapd
  5. 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)
    1. NOTE: This is not an issue if installed using nix, whether that be flakes and NixOS or nix shell

Usage

When downloading the binary or compiling yourself

$ ./{downloaded-binary} {optional-arguments (i.e. --help)}

When installed via Nix

$ wrapd {optional-arguments (i.e. --help)}

Optional Arguments (automatically generated by github action)

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

Development (Flakes)

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

Tips

  • 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 using rustfmt, nixpkgs-fmt, etc.).

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •