Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / pyexiftool / default.nix
blobe7240658ef3305a3d0920589d041e3a23031fba7
1 { lib
2 , buildPythonPackage
3 , pythonOlder
4 , fetchFromGitHub
5 , exiftool
6 , setuptools
7 , pytestCheckHook
8 }:
10 buildPythonPackage rec {
11   pname = "pyexiftool";
12   version = "0.5.6";
13   pyproject = true;
15   disabled = pythonOlder "3.6";
17   src = fetchFromGitHub {
18     owner = "sylikc";
19     repo = "pyexiftool";
20     rev = "refs/tags/v${version}";
21     hash = "sha256-dgQkbpCbdq2JbupY0DyQbHPR9Bg+bwDo7yN03o3sX+A=";
22   };
24   postPatch = ''
25     substituteInPlace exiftool/constants.py \
26       --replace-fail 'DEFAULT_EXECUTABLE = "exiftool"' \
27                      'DEFAULT_EXECUTABLE = "${lib.getExe exiftool}"'
28   '';
30   nativeBuildInputs = [
31     setuptools
32   ];
34   pythonImportsCheck = [ "exiftool" ];
36   nativeCheckInputs = [
37     pytestCheckHook
38   ];
40   meta = {
41     changelog = "https://github.com/sylikc/pyexiftool/blob/${src.rev}/CHANGELOG.md";
42     description = "Python wrapper for exiftool";
43     homepage = "https://github.com/sylikc/pyexiftool";
44     license = with lib.licenses; [ bsd3 /* or */ gpl3Plus ];
45     maintainers = with lib.maintainers; [ dotlambda ];
46   };