summary refs log tree commit diff
path: root/pkgs/development/python-modules/filetype/default.nix
blob: 40bbc688e205c8c56e1c4820cd7b2ecea7cfadc2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
{ lib
, buildPythonPackage
, fetchPypi
, python
}:

buildPythonPackage rec {
  pname = "filetype";
  version = "1.0.6";

  src = fetchPypi {
    inherit pname version;
    sha256 = "10985zfx90m527binx3fxvm4nsqmlwf0jj8j8mpbxb8wj8ivkllr";
  };

  checkPhase = ''
    ${python.interpreter} -m unittest discover
  '';

  meta = with lib; {
    description = "Infer file type and MIME type of any file/buffer";
    homepage = "https://github.com/h2non/filetype.py";
    license = licenses.mit;
    maintainers = with maintainers; [ dotlambda ];
  };
}