Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / applications / misc / keepmenu / default.nix
blob1e6735d656166d73344d2629583619b78601f480
1 { lib, python3Packages, fetchFromGitHub, xvfb-run, xdotool, dmenu }:
3 python3Packages.buildPythonApplication rec {
4   pname = "keepmenu";
5   version = "1.4.0";
6   format = "pyproject";
8   src = fetchFromGitHub {
9     owner = "firecat53";
10     repo = "keepmenu";
11     rev = version;
12     hash = "sha256-3vFg+9Nw+NhuPJbrmBahXwa13wXlBg5IMYwJ+unn88k=";
13   };
15   nativeBuildInputs = with python3Packages; [
16     hatchling
17     hatch-vcs
18   ];
20   env.SETUPTOOLS_SCM_PRETEND_VERSION = version;
22   propagatedBuildInputs = with python3Packages; [
23     pykeepass
24     pynput
25   ];
27   nativeCheckInputs = [ xvfb-run xdotool dmenu ];
29   postPatch = ''
30     substituteInPlace tests/keepmenu-config.ini tests/tests.py \
31       --replace "/usr/bin/dmenu" "dmenu"
32   '';
34   checkPhase = ''
35     runHook preCheck
37     xvfb-run python tests/tests.py
39     runHook postCheck
40   '';
42   pythonImportsCheck = [ "keepmenu" ];
44   meta = with lib; {
45     homepage = "https://github.com/firecat53/keepmenu";
46     description = "Dmenu/Rofi frontend for Keepass databases";
47     license = licenses.gpl3Only;
48     maintainers = with maintainers; [ elliot ];
49     platforms = platforms.linux;
50   };