From 0f1c9d20e47751d43a1dcd585ea2371164ecab97 Mon Sep 17 00:00:00 2001 From: Mark Joshwel Date: Wed, 22 Jan 2025 01:22:12 +0800 Subject: [PATCH] chore(docs,nix): nix flake, update docs --- .gitignore | 1 + Cargo.lock | 2 +- Cargo.toml | 2 +- README.md | 21 ++++++------ flake.lock | 94 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ flake.nix | 29 +++++++++++++++++ 6 files changed, 136 insertions(+), 13 deletions(-) create mode 100644 flake.lock create mode 100644 flake.nix diff --git a/.gitignore b/.gitignore index ea8c4bf..1a14b40 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /target +/releases \ No newline at end of file diff --git a/Cargo.lock b/Cargo.lock index 1337cb1..df25aa3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -153,7 +153,7 @@ dependencies = [ [[package]] name = "sidestepper" -version = "5.0.0" +version = "5.3.5" dependencies = [ "ignore", ] diff --git a/Cargo.toml b/Cargo.toml index cce9d0d..2aa5feb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sidestepper" -version = "5.0.0" +version = "5.3.5" edition = "2021" [dependencies] diff --git a/README.md b/README.md index 2a5db80..08cb00b 100644 --- a/README.md +++ b/README.md @@ -15,17 +15,13 @@ there was a better way to check a boolean result lol ## quickstart -**note:** there aren't any releases nor a nix flake yet! - ### installing a binary -**note:** all non-windows builds are statically linked - -- Windows -- Linux -- macOS universal -- macOS amd64 -- macOS aarch64 +- [Windows](https://forge.joshwel.co/mark/sidestepper/releases/download/latest/sidestepper-windows-x86_64.exe) +- [Linux (static binary, musl)](https://forge.joshwel.co/mark/sidestepper/releases/download/latest/sidestepper-linux-x86_64) +- [macOS universal](https://forge.joshwel.co/mark/sidestepper/releases/download/latest/sidestepper-macos-universal) +- [macOS x86_64](https://forge.joshwel.co/mark/sidestepper/releases/download/latest/sidestepper-macos-x86_84) +- [macOS aarch64](https://forge.joshwel.co/mark/sidestepper/releases/download/latest/sidestepper-macos-aarch64) (also available in the 'releases' tab wherever this repository is situated in) @@ -34,7 +30,9 @@ there was a better way to check a boolean result lol 1. [get rust and cargo](https://doc.rust-lang.org/cargo/getting-started/installation.html#install-rust-and-cargo) 2. run `cargo build release` -**nix users, rejoice:** run `nix run github:markjoshwel/sidestepper` or `nix run git+:https://forge.joshwel.co/mark/sidestepper` +**nix users, rejoice:** `nix run github:markjoshwel/sidestepper` or +`git+https://forge.joshwel.co/mark/sidestepper` (or nix build it, or add it to +your profile, or your system configuration, whatever) ### running it @@ -59,7 +57,8 @@ but if you want it to output external-tool-friendly output to stdout, pass in ## historical changes -- v5 (i3/a5) - 3rd implementation, rewritten in rust lol (no longer using iod-ttt, just piggybacking off [ignore](https://crates.io/crates/ignore)'s WalkBuilder) +- v5 (i3/a5) - 3rd implementation, rewritten in rust lol (no longer using iod-ttt, + just piggybacking off [ignore](https://crates.io/crates/ignore)'s WalkBuilder) - v4 (i2/a4) - optimised single iod-ttt - v3 (i2/a3) - faster matching by remembering ignored directories (ignore on demand, 'iod') - v2 (i2/a2) - 2nd implementation, corrected ignored directory matching (named 'trytrytry', 'ttt') diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..1d363ff --- /dev/null +++ b/flake.lock @@ -0,0 +1,94 @@ +{ + "nodes": { + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "naersk": { + "inputs": { + "nixpkgs": "nixpkgs" + }, + "locked": { + "lastModified": 1736429655, + "narHash": "sha256-BwMekRuVlSB9C0QgwKMICiJ5EVbLGjfe4qyueyNQyGI=", + "owner": "nix-community", + "repo": "naersk", + "rev": "0621e47bd95542b8e1ce2ee2d65d6a1f887a13ce", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "naersk", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1737370608, + "narHash": "sha256-hFA6SmioeqvGW/XvZa9bxniAeulksCOcj3kokdNT/YE=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "300081d0cc72df578b02d914df941b8ec62240e6", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "type": "indirect" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1737062831, + "narHash": "sha256-Tbk1MZbtV2s5aG+iM99U8FqwxU/YNArMcWAv6clcsBc=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "5df43628fdf08d642be8ba5b3625a6c70731c19c", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "naersk": "naersk", + "nixpkgs": "nixpkgs_2" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..76215f8 --- /dev/null +++ b/flake.nix @@ -0,0 +1,29 @@ +{ + description = "run + build + develop flake for sidestepper"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + flake-utils.url = "github:numtide/flake-utils"; + naersk.url = "github:nix-community/naersk"; + }; + + outputs = { self, nixpkgs, flake-utils, naersk }: + flake-utils.lib.eachDefaultSystem (system: + let + inherit (nixpkgs) lib; + pkgs = (import nixpkgs) { + inherit system; + }; + naersk' = pkgs.callPackage naersk {}; + in + { + defaultPackage = naersk'.buildPackage { + src = ./.; + }; + + devShells.default = pkgs.mkShell { + nativeBuildInputs = with pkgs; [ rustc cargo cargo-zigbuild zig ]; + }; + } + ); +}