nixos/home-manager/modules/scripts.nix
2024-04-24 15:12:55 +02:00

38 lines
1013 B
Nix

{ pkgs, ... }:
with pkgs;
stdenv.mkDerivation {
pname = "scripts";
version = "1";
src = ./scripts;
nativeBuildInputs = [ makeWrapper ];
installPhase = ''
mkdir -p $out/bin
# Move scripts to bin
mv ./* $out/bin
# Fix shebangs for the scripts
patchShebangs $out/bin
# Add dependencies to the runtime for my blog script
wrapProgram $out/bin/blog \
--prefix PATH : ${lib.makeBinPath [ hugo rsync git ]}
# Add dependencies to the runtime for my cue2chd script
wrapProgram $out/bin/cue2chd \
--prefix PATH : ${lib.makeBinPath [ mame-tools ]}
# Add dependencies to the runtime for my iso2chd script
wrapProgram $out/bin/iso2chd \
--prefix PATH : ${lib.makeBinPath [ mame-tools ]}
# Add dependencies to the runtime for my sync-backup script
wrapProgram $out/bin/sync-backup \
--prefix PATH : ${lib.makeBinPath [ rsync cryptsetup ]}
wrapProgram $out/bin/megadl \
--prefix PATH : ${lib.makeBinPath [ openssl ]}
'';
}