2023-08-22 20:05:09 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonApplication
|
|
|
|
, fetchFromGitHub
|
|
|
|
, configargparse
|
|
|
|
, setuptools
|
|
|
|
, poetry-core
|
|
|
|
, rbw
|
|
|
|
|
|
|
|
, waylandSupport ? false
|
|
|
|
, wl-clipboard
|
|
|
|
, wtype
|
|
|
|
|
|
|
|
, x11Support ? false
|
|
|
|
, xclip
|
|
|
|
, xdotool
|
|
|
|
}:
|
2022-05-18 14:49:53 +00:00
|
|
|
|
|
|
|
buildPythonApplication rec {
|
|
|
|
pname = "rofi-rbw";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "1.4.2";
|
2022-05-18 14:49:53 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "fdw";
|
|
|
|
repo = "rofi-rbw";
|
2022-06-26 10:26:21 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2024-05-15 15:35:15 +00:00
|
|
|
hash = "sha256-wUb89GkNB2lEfb42hMvcxpbjc1O+wx8AkFjq7aJwAko=";
|
2022-05-18 14:49:53 +00:00
|
|
|
};
|
|
|
|
|
2022-09-30 11:47:45 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
2023-02-16 17:41:37 +00:00
|
|
|
poetry-core
|
2022-09-30 11:47:45 +00:00
|
|
|
];
|
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
buildInputs = [
|
|
|
|
rbw
|
|
|
|
] ++ lib.optionals waylandSupport [
|
|
|
|
wl-clipboard
|
|
|
|
wtype
|
|
|
|
] ++ lib.optionals x11Support [
|
|
|
|
xclip
|
|
|
|
xdotool
|
|
|
|
];
|
|
|
|
|
2022-05-18 14:49:53 +00:00
|
|
|
propagatedBuildInputs = [ configargparse ];
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "rofi_rbw" ];
|
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
wrapper_paths = [
|
|
|
|
rbw
|
|
|
|
] ++ lib.optionals waylandSupport [
|
|
|
|
wl-clipboard
|
|
|
|
wtype
|
|
|
|
] ++ lib.optionals x11Support [
|
|
|
|
xclip
|
|
|
|
xdotool
|
|
|
|
];
|
|
|
|
|
|
|
|
wrapper_flags =
|
|
|
|
lib.optionalString waylandSupport "--typer wtype --clipboarder wl-copy"
|
|
|
|
+ lib.optionalString x11Support "--typer xdotool --clipboarder xclip";
|
|
|
|
|
2023-04-29 16:46:19 +00:00
|
|
|
preFixup = ''
|
2023-08-22 20:05:09 +00:00
|
|
|
makeWrapperArgs+=(--prefix PATH : ${lib.makeBinPath wrapper_paths} --add-flags "${wrapper_flags}")
|
2023-04-29 16:46:19 +00:00
|
|
|
'';
|
|
|
|
|
2022-05-18 14:49:53 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Rofi frontend for Bitwarden";
|
|
|
|
homepage = "https://github.com/fdw/rofi-rbw";
|
|
|
|
license = licenses.mit;
|
2023-02-16 17:41:37 +00:00
|
|
|
maintainers = with maintainers; [ equirosa dit7ya ];
|
2022-05-18 14:49:53 +00:00
|
|
|
platforms = platforms.linux;
|
2023-08-04 22:07:22 +00:00
|
|
|
mainProgram = "rofi-rbw";
|
2022-05-18 14:49:53 +00:00
|
|
|
};
|
|
|
|
}
|