From 93b23ce46618a3ca3f4997ff9330ecbf5d26f610 Mon Sep 17 00:00:00 2001 From: Adithya Nair Date: Sat, 15 Jul 2023 10:52:02 +0530 Subject: [PATCH] refactor hooks --- packages/scripts/default.nix | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/packages/scripts/default.nix b/packages/scripts/default.nix index 4a82d4b..15384ab 100644 --- a/packages/scripts/default.nix +++ b/packages/scripts/default.nix @@ -19,28 +19,33 @@ stdenvNoCC.mkDerivation { src = ./.; nativeBuildInputs = [makeWrapper]; - buildInputs = [libnotify rofi-wayland tmux kitty]; installPhase = '' mkdir -p $out/bin + cp power-menu.sh $out/bin/power-menu chmod +x $out/bin/power-menu - wrapProgram $out/bin/power-menu --prefix PATH : ${lib.makeBinPath [libnotify rofi-wayland hyprland]} cp tmux-sessions.sh $out/bin/tmux-sessions chmod +x $out/bin/tmux-sessions - wrapProgram $out/bin/tmux-sessions --prefix PATH : ${lib.makeBinPath [tmux kitty rofi-wayland]} cp chpaper.sh $out/bin/chpaper chmod +x $out/bin/chpaper - wrapProgram $out/bin/chpaper --prefix PATH : ${lib.makeBinPath [imagemagick libnotify swww]} cp wallhaven.sh $out/bin/wallhaven chmod +x $out/bin/wallhaven - wrapProgram $out/bin/wallhaven --prefix PATH : ${lib.makeBinPath [imagemagick libnotify jq curl]} cp youtube.sh $out/bin/youtube chmod +x $out/bin/youtube + + runHook postInstall + ''; + + postInstall = '' + wrapProgram $out/bin/power-menu --prefix PATH : ${lib.makeBinPath [libnotify rofi-wayland hyprland]} + wrapProgram $out/bin/tmux-sessions --prefix PATH : ${lib.makeBinPath [tmux kitty rofi-wayland]} + wrapProgram $out/bin/chpaper --prefix PATH : ${lib.makeBinPath [imagemagick libnotify swww]} + wrapProgram $out/bin/wallhaven --prefix PATH : ${lib.makeBinPath [imagemagick libnotify jq curl]} wrapProgram $out/bin/youtube --prefix PATH : ${lib.makeBinPath [kitty ytfzf rofi-wayland]} ''; }