1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 ua-parser, 6}: 7 8buildPythonPackage rec { 9 pname = "user-agents"; 10 version = "2.2.0"; 11 format = "setuptools"; 12 13 # PyPI is missing devices.json 14 src = fetchFromGitHub { 15 owner = "selwin"; 16 repo = "python-user-agents"; 17 rev = "v${version}"; 18 sha256 = "0pcbjqj21c2ixhl414bh2h8khi8y1igzfpkyqwan1pakix0lq45a"; 19 }; 20 21 propagatedBuildInputs = [ ua-parser ]; 22 23 meta = with lib; { 24 description = "Python library to identify devices by parsing user agent strings"; 25 homepage = "https://github.com/selwin/python-user-agents"; 26 license = licenses.mit; 27 platforms = platforms.unix; 28 maintainers = with maintainers; [ dotlambda ]; 29 }; 30}