summaryrefslogblamecommitdiff
path: root/home/wayland/pkgs/wayland-scripts/default.nix
blob: c96ad22e79662256b14f63f3c9f42b62fc52d7ee (plain) (tree)
1
2
3
4
5
6
7
8
9








              


        
         



                           
                         





















                                                                  

                                                   

                                                      

                                                                       









                                                      
{
  stdenvNoCC,
  lib,
  makeWrapper,

  bash,
  sway,
  ffmpeg,
  libnotify,
  imv,
  grim,
  slurp,
  bemenu,
}:

stdenvNoCC.mkDerivation {
  pname = "wayland-scipts";
  version = "1717606223";
  src = ./src;

  strictDeps = true;
  outputs = [ "out" ];
  buildInputs = [ bash ];
  nativeBuildInputs = [ makeWrapper ];

  postPatch = ''
    for sh in bin/*; do
      patchShebangs --host "$sh"
    done
  '';

  installPhase = ''
    runHook preInstall
    cp -r ./ $out
    runHook postInstall
  '';

  postInstall = ''
    wrapProgram $out/bin/cwall \
      --prefix PATH : ${lib.makeBinPath [ ffmpeg libnotify sway ]}
    wrapProgram $out/bin/daskpass \
      --prefix PATH : ${lib.makeBinPath [ bemenu ]}
    wrapProgram $out/bin/ttyasrt \
      --prefix PATH : ${lib.makeBinPath [ libnotify ]}
    wrapProgram $out/bin/freezshot \
      --prefix PATH : ${lib.makeBinPath [ ffmpeg sway grim slurp imv ]}
  '';

  meta = {
    description = "Wayland scripts for sway";
    homepage = "https://www.sinanmohd.com";
    license = lib.licenses.gpl3;
    platforms = lib.platforms.unix;
    maintainers = with lib.maintainers; [ sinanmohd ];
  };
}