Rework scripts module.

This commit is contained in:
CronyAkatsuki 2024-03-23 21:33:18 +01:00
parent 3c7c565b8d
commit 2be2b6b7e5

View File

@ -2,15 +2,20 @@
with pkgs;
stdenv.mkDerivation {
pname = "blog";
pname = "scripts";
version = "1";
src = ./scripts/blog;
src = ./scripts;
nativeBuildInputs = [ makeWrapper ];
installPhase = ''
mkdir -p $out/bin
mv blog $out/bin/blog
patchShebangs $out/bin/blog
# 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 ]}
'';