nixos/home-manager/modules/scripts.nix

38 lines
1013 B
Nix
Raw Normal View History

2024-03-23 20:13:16 +01:00
{ pkgs, ... }:
with pkgs;
stdenv.mkDerivation {
2024-03-23 21:33:18 +01:00
pname = "scripts";
2024-03-23 20:13:16 +01:00
version = "1";
2024-03-23 21:33:18 +01:00
src = ./scripts;
2024-03-23 20:13:16 +01:00
nativeBuildInputs = [ makeWrapper ];
installPhase = ''
mkdir -p $out/bin
2024-03-23 21:33:18 +01:00
# Move scripts to bin
mv ./* $out/bin
# Fix shebangs for the scripts
patchShebangs $out/bin
# Add dependencies to the runtime for my blog script
2024-03-23 20:13:16 +01:00
wrapProgram $out/bin/blog \
--prefix PATH : ${lib.makeBinPath [ hugo rsync git ]}
2024-03-27 12:34:35 +01:00
# 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 ]}
2024-03-30 17:29:13 +01:00
# Add dependencies to the runtime for my sync-backup script
wrapProgram $out/bin/sync-backup \
--prefix PATH : ${lib.makeBinPath [ rsync cryptsetup ]}
2024-04-24 15:12:55 +02:00
wrapProgram $out/bin/megadl \
--prefix PATH : ${lib.makeBinPath [ openssl ]}
2024-03-23 20:13:16 +01:00
'';
}