nixos/home-manager/modules/scripts.nix

31 lines
759 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-23 20:13:16 +01:00
'';
}