configuration.nix/packages/scripts/misc/default.nix

37 lines
705 B
Nix
Raw Normal View History

2023-11-04 16:12:45 +05:30
{ lib
, stdenvNoCC
, makeWrapper
, hyprland
2024-05-15 00:58:51 +05:30
, kitty
, libnotify
, rofi-wayland
, tmux
2023-11-04 16:12:45 +05:30
,
2023-05-18 16:11:26 +05:30
}:
2023-04-06 01:27:09 +05:30
stdenvNoCC.mkDerivation {
2024-05-18 10:24:28 +05:30
pname = "misc-scripts";
version = "0.1";
2023-04-06 01:27:09 +05:30
src = ./.;
2023-11-04 16:12:45 +05:30
nativeBuildInputs = [ makeWrapper ];
2023-04-06 01:27:09 +05:30
installPhase = ''
2023-11-09 20:31:28 +05:30
runHook preInstall
2023-04-06 01:27:09 +05:30
mkdir -p $out/bin
2023-07-15 10:52:02 +05:30
2023-04-06 01:27:09 +05:30
cp power-menu.sh $out/bin/power-menu
chmod +x $out/bin/power-menu
2023-04-06 03:08:26 +05:30
cp tmux-sessions.sh $out/bin/tmux-sessions
chmod +x $out/bin/tmux-sessions
2023-04-06 03:29:01 +05:30
2023-07-15 10:52:02 +05:30
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]}
2023-04-06 01:27:09 +05:30
'';
}