diff --git a/pkgs/development/python-modules/puremagic/default.nix b/pkgs/development/python-modules/puremagic/default.nix new file mode 100644 index 000000000000..c635cdac186a --- /dev/null +++ b/pkgs/development/python-modules/puremagic/default.nix @@ -0,0 +1,29 @@ +{ lib, buildPythonPackage, fetchPypi +}: + +buildPythonPackage rec { + pname = "puremagic"; + version = "1.10"; + + src = fetchPypi { + inherit pname version; + sha256 = "025ih5q1qa40x88j7ngsdr5sf0dp400kwlfzz60i7v6fh0ms1zkg"; + }; + + postPatch = '' + substituteInPlace setup.py \ + --replace '"argparse"' "" + ''; + + # test data not included on pypi + doCheck = false; + + pythonImportsCheck = [ "puremagic" ]; + + meta = with lib; { + description = "Pure python implementation of magic file detection"; + license = licenses.mit; + homepage = "https://github.com/cdgriffith/puremagic"; + maintainers = with maintainers; [ globin ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index b6c7c6e64ff3..3f729c461493 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -5275,6 +5275,8 @@ in { pure-python-adb-homeassistant = callPackage ../development/python-modules/pure-python-adb-homeassistant { }; + puremagic = callPackage ../development/python-modules/puremagic { }; + purl = callPackage ../development/python-modules/purl { }; pushbullet = callPackage ../development/python-modules/pushbullet { };