feat: add custom scripts.

This commit is contained in:
CronyAkatsuki 2025-03-18 18:20:13 +01:00
parent 84bf820b93
commit f1c37c598f
4 changed files with 48 additions and 0 deletions

View file

@ -0,0 +1,7 @@
#!/usr/bin/env sh
for File in *.cue; do
[ -f "$File" ] || continue
chdman createcd -i "$File" -o "${File%.cue}.chd"
rm -v "$File" "${File%.cue}"*.bin
done

View file

@ -0,0 +1,23 @@
{pkgs, ...}:
with pkgs;
stdenv.mkDerivation {
pname = "scripts";
version = "1";
src = ./bin;
nativeBuildInputs = [makeWrapper];
installPhase = ''
mkdir -p $out/bin
# move scripts to bin
mv ./* $out/bin
# Fix shebangs for scripts
patchShebangs $out/bin
# Add dependencies to the runtime for my cue2chd script
wrapProgram $out/bin/cue2chd \
--prefix PATH : ${lib.makeBinPath [mame-tools]}
'';
}