From 2be2b6b7e5d61f2d2872f6af820dd363a7f55a8b Mon Sep 17 00:00:00 2001 From: Crony Akatsuki Date: Sat, 23 Mar 2024 21:33:18 +0100 Subject: [PATCH] Rework scripts module. --- home-manager/modules/scripts.nix | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/home-manager/modules/scripts.nix b/home-manager/modules/scripts.nix index df48f83..952c8fc 100644 --- a/home-manager/modules/scripts.nix +++ b/home-manager/modules/scripts.nix @@ -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 ]} '';