Rework scripts module.
This commit is contained in:
parent
3c7c565b8d
commit
2be2b6b7e5
@ -2,15 +2,20 @@
|
|||||||
|
|
||||||
with pkgs;
|
with pkgs;
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
pname = "blog";
|
pname = "scripts";
|
||||||
version = "1";
|
version = "1";
|
||||||
src = ./scripts/blog;
|
src = ./scripts;
|
||||||
nativeBuildInputs = [ makeWrapper ];
|
nativeBuildInputs = [ makeWrapper ];
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p $out/bin
|
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 \
|
wrapProgram $out/bin/blog \
|
||||||
--prefix PATH : ${lib.makeBinPath [ hugo rsync git ]}
|
--prefix PATH : ${lib.makeBinPath [ hugo rsync git ]}
|
||||||
'';
|
'';
|
||||||
|
Loading…
Reference in New Issue
Block a user