char/flake
nixos flake
git clone https://git.t4t.associates/char/flake
bbd1227
main
1{ 2stdenvNoCC , 3zig , 4fetchgit , 5lib , 6} : 7stdenvNoCC . mkDerivation { 8pname = "abbr-dir" ; 9version = "0.1.0" ; 10 11src = fetchgit { 12url = "https://github.com/char/abbr-dir.git" ; 13rev = "refs/heads/main" ; 14hash = "sha256-PkCX6W/c5ZnczDICBFe7bLCJZecvb+9dPeVOeJr+yjE=" ; 15}; 16 17nativeBuildInputs = [ zig ]; 18 19dontConfigure = true ; 20buildPhase = '' 21export ZIG_GLOBAL_CACHE_DIR = $ TMPDIR /zig-cache 22zig build -Doptimize=ReleaseSafe 23'' ; 24installPhase = '' 25mkdir -p $ out /bin 26cp zig-out/bin/abbr-dir $ out /bin/ 27'' ; 28 29meta = with lib ; { 30description = "Abbreviate a path for display in a shell prompt" ; 31homepage = "https://github.com/char/abbr-dir" ; 32mainProgram = "abbr-dir" ; 33platforms = platforms . linux ++ platforms . darwin ; 34}; 35}