nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ stdenv
2, lib
3, buildPythonApplication
4, dataclasses
5, fetchPypi
6, libX11
7, libXinerama
8, libXrandr
9, pytestCheckHook
10, pythonOlder
11}:
12
13buildPythonApplication rec {
14 pname = "screeninfo";
15 version = "0.8";
16
17 disabled = pythonOlder "3.6";
18
19 src = fetchPypi {
20 inherit pname version;
21 sha256 = "9501bf8b8458c7d1be4cb0ac9abddddfa80b932fb3f65bfcb54f5586434b1dc5";
22 };
23
24 propagatedBuildInputs = lib.optionals (pythonOlder "3.7") [
25 dataclasses
26 ];
27
28 buildInputs = [
29 libX11
30 libXinerama
31 libXrandr
32 ];
33
34 checkInputs = [
35 pytestCheckHook
36 ];
37
38 disabledTestPaths = [
39 # We don't have a screen
40 "screeninfo/test_screeninfo.py"
41 ];
42
43 pythonImportsCheck = [ "screeninfo" ];
44
45 meta = with lib; {
46 broken = stdenv.isDarwin;
47 description = "Fetch location and size of physical screens";
48 homepage = "https://github.com/rr-/screeninfo";
49 license = licenses.mit;
50 maintainers = with maintainers; [ nickhu ];
51 };
52}