Add two new shell utility scripts to the custom script packages: ,optipng - Parallel PNG optimization wrapper - Detects available CPU cores and runs optipng in parallel using xargs - Accepts optional file arguments, defaults to all *.png in current dir - Uses maximum compression level (-o7) for best results - Added to tb-dev-scripts package with optipng as runtime dependency ,zipdir - Quick directory archiving helper - Creates a zip archive of the current directory - Names the archive after the directory and places it in parent folder - Uses maximum compression (-9) with extra attributes excluded (-X) - Added to tb-scripts package with zip as runtime dependency 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
25 lines
605 B
Nix
25 lines
605 B
Nix
{ pkgs }:
|
|
|
|
pkgs.symlinkJoin {
|
|
name = "tb-scripts";
|
|
meta = {
|
|
description = "Custom utility scripts for TB - available on all systems";
|
|
maintainers = [ ];
|
|
};
|
|
paths = [
|
|
(pkgs.writeShellApplication {
|
|
name = ",jq_reformat";
|
|
runtimeInputs = [ pkgs.jq ];
|
|
text = builtins.readFile ./jq_reformat.sh;
|
|
})
|
|
(pkgs.writers.writePython3Bin ",rename_lower" {
|
|
libraries = [ ];
|
|
} (builtins.readFile ./rename_lower.py))
|
|
(pkgs.writeShellApplication {
|
|
name = ",zipdir";
|
|
runtimeInputs = [ pkgs.zip ];
|
|
text = builtins.readFile ./zipdir;
|
|
})
|
|
];
|
|
}
|