nixos/home-manager/modules/scripts.nix

23 lines
455 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 ]}
'';
}