keepmenu: 1.3.1 -> 1.4.0

Elliot bf378019 100a1550

+27 -12
+27 -12
pkgs/applications/misc/keepmenu/default.nix
··· 1 - { lib, python3Packages, fetchPypi, xvfb-run }: 1 + { lib, python3Packages, fetchFromGitHub, xvfb-run, xdotool, dmenu }: 2 2 3 3 python3Packages.buildPythonApplication rec { 4 4 pname = "keepmenu"; 5 - version = "1.3.1"; 5 + version = "1.4.0"; 6 + format = "pyproject"; 6 7 7 - src = fetchPypi { 8 - inherit pname version; 9 - hash = "sha256-AGuJY7IirzIjcu/nY9CzeOqU1liwcRijYLi8hGN/pRg="; 8 + src = fetchFromGitHub { 9 + owner = "firecat53"; 10 + repo = "keepmenu"; 11 + rev = version; 12 + hash = "sha256-3vFg+9Nw+NhuPJbrmBahXwa13wXlBg5IMYwJ+unn88k="; 10 13 }; 11 14 12 - preConfigure = '' 13 - export HOME=$TMPDIR 14 - mkdir -p $HOME/.config/keepmenu 15 - cp config.ini.example $HOME/.config/keepmenu/config.ini 16 - ''; 15 + nativeBuildInputs = with python3Packages; [ 16 + hatchling 17 + hatch-vcs 18 + ]; 19 + 20 + env.SETUPTOOLS_SCM_PRETEND_VERSION = version; 17 21 18 22 propagatedBuildInputs = with python3Packages; [ 19 23 pykeepass 20 24 pynput 21 25 ]; 22 26 23 - nativeCheckInputs = [ xvfb-run ]; 27 + nativeCheckInputs = [ xvfb-run xdotool dmenu ]; 28 + 29 + postPatch = '' 30 + substituteInPlace tests/keepmenu-config.ini tests/tests.py \ 31 + --replace "/usr/bin/dmenu" "dmenu" 32 + ''; 33 + 24 34 checkPhase = '' 25 - xvfb-run python setup.py test 35 + runHook preCheck 36 + 37 + xvfb-run python tests/tests.py 38 + 39 + runHook postCheck 26 40 ''; 27 41 28 42 pythonImportsCheck = [ "keepmenu" ]; ··· 32 46 description = "Dmenu/Rofi frontend for Keepass databases"; 33 47 license = licenses.gpl3Only; 34 48 maintainers = with maintainers; [ elliot ]; 49 + platforms = platforms.linux; 35 50 }; 36 51 }