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