nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib, python3Packages, fetchPypi, netcat-openbsd, nix-update-script }:
2
3python3Packages.buildPythonApplication rec {
4 pname = "flashfocus";
5 version = "2.4.1";
6
7 format = "pyproject";
8
9 src = fetchPypi {
10 inherit pname version;
11 hash = "sha256-O6jRQ6e96b8CuumTD6TGELaz26No7WFZgGSnNSlqzuE=";
12 };
13
14 postPatch = ''
15 substituteInPlace bin/nc_flash_window \
16 --replace "nc" "${lib.getExe netcat-openbsd}"
17 '';
18
19 nativeBuildInputs = with python3Packages; [
20 setuptools
21 ];
22
23 pythonRelaxDeps = [
24 "pyyaml"
25 "xcffib"
26 ];
27
28 propagatedBuildInputs = with python3Packages; [
29 i3ipc
30 xcffib
31 click
32 cffi
33 xpybutil
34 marshmallow
35 pyyaml
36 ];
37
38 # Tests require access to a X session
39 doCheck = false;
40
41 pythonImportsCheck = [ "flashfocus" ];
42
43 passthru.updateScript = nix-update-script { };
44
45 meta = with lib; {
46 homepage = "https://github.com/fennerm/flashfocus";
47 description = "Simple focus animations for tiling window managers";
48 license = licenses.mit;
49 platforms = platforms.linux;
50 maintainers = with maintainers; [ artturin ];
51 };
52}