nixpkgs/pkgs/applications/misc/keepmenu/default.nix
Martin Weinelt 8056f9250c
treewide: remove redundant SETUPTOOLS_SCM_PRETEND_VERSION usage
The setuptools-scm packages gained a setup hook, that sets it to the
derivation version automatically, so setting it to that manually has
become redundant.

This also affects downstream consumers of setuptools-scm, like hatch-vcs
or flit-scm.
2023-12-20 20:16:39 +01:00

50 lines
1.1 KiB
Nix

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