2023-08-22 20:05:09 +00:00
|
|
|
{ lib, python3Packages, fetchFromGitHub, xvfb-run, xdotool, dmenu }:
|
2022-11-27 09:42:12 +00:00
|
|
|
|
|
|
|
python3Packages.buildPythonApplication rec {
|
|
|
|
pname = "keepmenu";
|
2023-08-22 20:05:09 +00:00
|
|
|
version = "1.4.0";
|
|
|
|
format = "pyproject";
|
2022-11-27 09:42:12 +00:00
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "firecat53";
|
|
|
|
repo = "keepmenu";
|
|
|
|
rev = version;
|
|
|
|
hash = "sha256-3vFg+9Nw+NhuPJbrmBahXwa13wXlBg5IMYwJ+unn88k=";
|
2022-11-27 09:42:12 +00:00
|
|
|
};
|
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
nativeBuildInputs = with python3Packages; [
|
|
|
|
hatchling
|
|
|
|
hatch-vcs
|
|
|
|
];
|
|
|
|
|
2022-11-27 09:42:12 +00:00
|
|
|
propagatedBuildInputs = with python3Packages; [
|
|
|
|
pykeepass
|
|
|
|
pynput
|
|
|
|
];
|
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
nativeCheckInputs = [ xvfb-run xdotool dmenu ];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace tests/keepmenu-config.ini tests/tests.py \
|
|
|
|
--replace "/usr/bin/dmenu" "dmenu"
|
|
|
|
'';
|
|
|
|
|
2022-11-27 09:42:12 +00:00
|
|
|
checkPhase = ''
|
2023-08-22 20:05:09 +00:00
|
|
|
runHook preCheck
|
|
|
|
|
|
|
|
xvfb-run python tests/tests.py
|
|
|
|
|
|
|
|
runHook postCheck
|
2022-11-27 09:42:12 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "keepmenu" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/firecat53/keepmenu";
|
|
|
|
description = "Dmenu/Rofi frontend for Keepass databases";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "keepmenu";
|
2022-11-27 09:42:12 +00:00
|
|
|
license = licenses.gpl3Only;
|
|
|
|
maintainers = with maintainers; [ elliot ];
|
2023-08-22 20:05:09 +00:00
|
|
|
platforms = platforms.linux;
|
2022-11-27 09:42:12 +00:00
|
|
|
};
|
|
|
|
}
|