biome: 1.9.2 -> 1.9.3 (#349335)
[NixPkgs.git] / pkgs / development / python-modules / pyexiftool / default.nix
blob36ed807a17bba5d481c1025100ebaa77bd15884b
2   lib,
3   buildPythonPackage,
4   pythonOlder,
5   fetchFromGitHub,
6   exiftool,
7   setuptools,
8   pytestCheckHook,
9 }:
11 buildPythonPackage rec {
12   pname = "pyexiftool";
13   version = "0.5.6";
14   pyproject = true;
16   disabled = pythonOlder "3.6";
18   src = fetchFromGitHub {
19     owner = "sylikc";
20     repo = "pyexiftool";
21     rev = "refs/tags/v${version}";
22     hash = "sha256-dgQkbpCbdq2JbupY0DyQbHPR9Bg+bwDo7yN03o3sX+A=";
23   };
25   postPatch = ''
26     substituteInPlace exiftool/constants.py \
27       --replace-fail 'DEFAULT_EXECUTABLE = "exiftool"' \
28                      'DEFAULT_EXECUTABLE = "${lib.getExe exiftool}"'
29   '';
31   nativeBuildInputs = [ setuptools ];
33   pythonImportsCheck = [ "exiftool" ];
35   nativeCheckInputs = [ pytestCheckHook ];
37   meta = {
38     changelog = "https://github.com/sylikc/pyexiftool/blob/${src.rev}/CHANGELOG.md";
39     description = "Python wrapper for exiftool";
40     homepage = "https://github.com/sylikc/pyexiftool";
41     license = with lib.licenses; [
42       bsd3 # or
43       gpl3Plus
44     ];
45     maintainers = with lib.maintainers; [ dotlambda ];
46   };