14 buildPythonPackage rec {
19 disabled = pythonOlder "3.6";
21 src = fetchFromGitHub {
24 rev = "refs/tags/${version}";
25 hash = "sha256-TEy4wff0eRRkX98yK9054d33Tm6G6qWrd9Iv+ITcFmA=";
32 propagatedBuildInputs = lib.optionals (pythonOlder "3.7") [
37 substituteInPlace screeninfo/enumerators/xinerama.py \
38 --replace 'load_library("X11")' 'ctypes.cdll.LoadLibrary("${libX11}/lib/libX11.so")' \
39 --replace 'load_library("Xinerama")' 'ctypes.cdll.LoadLibrary("${libXinerama}/lib/libXinerama.so")'
40 substituteInPlace screeninfo/enumerators/xrandr.py \
41 --replace 'load_library("X11")' 'ctypes.cdll.LoadLibrary("${libX11}/lib/libX11.so")' \
42 --replace 'load_library("Xrandr")' 'ctypes.cdll.LoadLibrary("${libXrandr}/lib/libXrandr.so")'
50 # We don't have a screen
51 "tests/test_screeninfo.py"
54 pythonImportsCheck = [ "screeninfo" ];
57 broken = stdenv.isDarwin;
58 description = "Fetch location and size of physical screens";
59 homepage = "https://github.com/rr-/screeninfo";
60 license = licenses.mit;
61 maintainers = with maintainers; [ nickhu ];