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