nixpkgs/pkgs/applications/misc/rofi-rbw/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

76 lines
1.5 KiB
Nix
Raw Normal View History

{ lib
, buildPythonApplication
, fetchFromGitHub
, configargparse
, setuptools
, poetry-core
, rbw
, waylandSupport ? false
, wl-clipboard
, wtype
, x11Support ? false
, xclip
, xdotool
}:
buildPythonApplication rec {
pname = "rofi-rbw";
2024-05-05 10:05:03 +00:00
version = "1.4.2";
format = "pyproject";
src = fetchFromGitHub {
owner = "fdw";
repo = "rofi-rbw";
2022-06-19 18:56:02 +00:00
rev = "refs/tags/${version}";
2024-05-05 10:05:03 +00:00
hash = "sha256-wUb89GkNB2lEfb42hMvcxpbjc1O+wx8AkFjq7aJwAko=";
};
nativeBuildInputs = [
setuptools
2023-02-08 07:11:48 +00:00
poetry-core
];
buildInputs = [
rbw
] ++ lib.optionals waylandSupport [
wl-clipboard
wtype
] ++ lib.optionals x11Support [
xclip
xdotool
];
propagatedBuildInputs = [ configargparse ];
pythonImportsCheck = [ "rofi_rbw" ];
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";
preFixup = ''
makeWrapperArgs+=(--prefix PATH : ${lib.makeBinPath wrapper_paths} --add-flags "${wrapper_flags}")
'';
meta = with lib; {
description = "Rofi frontend for Bitwarden";
homepage = "https://github.com/fdw/rofi-rbw";
license = licenses.mit;
2023-02-08 07:13:53 +00:00
maintainers = with maintainers; [ equirosa dit7ya ];
platforms = platforms.linux;
mainProgram = "rofi-rbw";
};
}