nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 dmenu,
3 fetchFromGitHub,
4 lib,
5 python3Packages,
6 xdotool,
7 xsel,
8 xvfb-run,
9}:
10
11python3Packages.buildPythonApplication rec {
12 pname = "keepmenu";
13 version = "1.4.2";
14 pyproject = true;
15
16 src = fetchFromGitHub {
17 owner = "firecat53";
18 repo = "keepmenu";
19 rev = version;
20 hash = "sha256-Kzt2RqyYvOWnbkflwTHzlnpUaruVQvdGys57DDpH9o8=";
21 };
22
23 nativeBuildInputs = with python3Packages; [
24 hatchling
25 hatch-vcs
26 ];
27
28 propagatedBuildInputs = with python3Packages; [
29 pykeepass
30 pynput
31 ];
32
33 nativeCheckInputs = [
34 dmenu
35 xdotool
36 xsel
37 xvfb-run
38 ];
39
40 postPatch = ''
41 substituteInPlace tests/keepmenu-config.ini tests/tests.py \
42 --replace "/usr/bin/dmenu" "dmenu"
43 '';
44
45 checkPhase = ''
46 runHook preCheck
47
48 xvfb-run python tests/tests.py
49
50 runHook postCheck
51 '';
52
53 pythonImportsCheck = [ "keepmenu" ];
54
55 meta = {
56 homepage = "https://github.com/firecat53/keepmenu";
57 description = "Dmenu/Rofi frontend for Keepass databases";
58 mainProgram = "keepmenu";
59 license = lib.licenses.gpl3Only;
60 maintainers = with lib.maintainers; [ elliot ];
61 platforms = lib.platforms.linux;
62 };
63}