1
0
Files
nix-shared/pkgs/tb-dev-scripts/default.nix
Timo Bingmann 22cedc6712 tb-scripts: add ,optipng and ,zipdir utility scripts
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>
2025-12-08 23:47:02 -08:00

31 lines
852 B
Nix

{ pkgs, lib }:
pkgs.symlinkJoin {
name = "tb-dev-scripts";
meta = {
description = "Custom development scripts for TB";
maintainers = [ ];
};
paths = [
(pkgs.writers.writePython3Bin ",cmake_update_fetchcontent" {
libraries = [ ];
makeWrapperArgs = [
"--prefix PATH : ${lib.makeBinPath [ pkgs.git ]}"
];
} (builtins.readFile ./cmake_update_fetchcontent.py))
(pkgs.writers.writePython3Bin ",video_loop_extractor" {
libraries = [ pkgs.python3Packages.librosa pkgs.python3Packages.numpy ];
makeWrapperArgs = [
"--prefix PATH : ${lib.makeBinPath [ pkgs.ffmpeg ]}"
];
} (builtins.readFile ./video_loop_extractor.py))
(pkgs.writeShellApplication {
name = ",optipng";
runtimeInputs = [ pkgs.optipng ];
text = builtins.readFile ./optipng;
})
];
}