2023-12-02 18:49:55 +01:00
|
|
|
{ lib
|
|
|
|
, stdenvNoCC
|
|
|
|
, fetchFromGitHub
|
|
|
|
, makeWrapper
|
|
|
|
, scdoc
|
|
|
|
, coreutils
|
|
|
|
, util-linux
|
|
|
|
, jq
|
|
|
|
, libnotify
|
|
|
|
, withHyprland ? true
|
|
|
|
, hyprland
|
2024-03-02 17:55:45 +01:00
|
|
|
, gawk
|
2023-12-02 18:49:55 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenvNoCC.mkDerivation rec {
|
|
|
|
pname = "hdrop";
|
2024-03-02 17:55:45 +01:00
|
|
|
version = "0.5.0";
|
2023-12-02 18:49:55 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Schweber";
|
|
|
|
repo = "hdrop";
|
|
|
|
rev = "v${version}";
|
2024-03-02 17:55:45 +01:00
|
|
|
hash = "sha256-iginpMlgANSPWgFxNC2TYMjf2NKSSzzrjIN8lIsAvX8=";
|
2023-12-02 18:49:55 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
makeWrapper
|
|
|
|
scdoc
|
|
|
|
];
|
|
|
|
|
|
|
|
makeFlags = [ "PREFIX=$(out)" ];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/hdrop --prefix PATH ':' \
|
|
|
|
"${lib.makeBinPath ([
|
|
|
|
coreutils
|
|
|
|
util-linux
|
|
|
|
jq
|
|
|
|
libnotify
|
2024-03-02 17:55:45 +01:00
|
|
|
gawk
|
2023-12-02 18:49:55 +01:00
|
|
|
]
|
|
|
|
++ 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}";
|
2024-03-19 13:26:06 +01:00
|
|
|
license = licenses.agpl3Only;
|
2023-12-02 18:49:55 +01:00
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ Schweber ];
|
|
|
|
mainProgram = "hdrop";
|
|
|
|
};
|
|
|
|
}
|