depot/third_party/nixpkgs/pkgs/by-name/hd/hdrop/package.nix
Default email 23b612e36f Project import generated by Copybara.
GitOrigin-RevId: ae5c332cbb5827f6b1f02572496b141021de335f
2024-01-25 23:12:00 +09:00

52 lines
1.1 KiB
Nix
Executable file

{ lib
, stdenvNoCC
, fetchFromGitHub
, makeWrapper
, scdoc
, coreutils
, util-linux
, jq
, libnotify
, withHyprland ? true
, hyprland
}:
stdenvNoCC.mkDerivation rec {
pname = "hdrop";
version = "0.4.4";
src = fetchFromGitHub {
owner = "Schweber";
repo = "hdrop";
rev = "v${version}";
hash = "sha256-eLOu7xmFphTxCtyyXdM9VkNcUpefefuZMAQtOV4FVtU=";
};
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";
};
}