2023-12-02 17:49:55 +00:00
|
|
|
{ lib
|
|
|
|
, stdenvNoCC
|
|
|
|
, fetchFromGitHub
|
|
|
|
, makeWrapper
|
|
|
|
, scdoc
|
|
|
|
, coreutils
|
|
|
|
, util-linux
|
|
|
|
, jq
|
|
|
|
, libnotify
|
|
|
|
, withHyprland ? true
|
|
|
|
, hyprland
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenvNoCC.mkDerivation rec {
|
|
|
|
pname = "hdrop";
|
2023-12-29 09:47:11 +00:00
|
|
|
version = "0.3.0";
|
2023-12-02 17:49:55 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Schweber";
|
|
|
|
repo = "hdrop";
|
|
|
|
rev = "v${version}";
|
2023-12-29 09:47:11 +00:00
|
|
|
hash = "sha256-IVLc1USBkkIBEll1jRIAAszyGCmpw5Sy74Zyalv3W+w=";
|
2023-12-02 17:49:55 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
makeWrapper
|
|
|
|
scdoc
|
|
|
|
];
|
|
|
|
|
|
|
|
makeFlags = [ "PREFIX=$(out)" ];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/hdrop --prefix PATH ':' \
|
|
|
|
"${lib.makeBinPath ([
|
|
|
|
coreutils
|
|
|
|
util-linux
|
|
|
|
jq
|
|
|
|
libnotify
|
|
|
|
]
|
|
|
|
++ lib.optional withHyprland hyprland)}"
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Emulate 'tdrop' in Hyprland (run, show and hide specific programs per keybind)";
|
|
|
|
homepage = "https://github.com/Schweber/hdrop";
|
|
|
|
changelog = "https://github.com/Schweber/hdrop/releases/tag/v${version}";
|
|
|
|
license = licenses.agpl3;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ Schweber ];
|
|
|
|
mainProgram = "hdrop";
|
|
|
|
};
|
|
|
|
}
|