From b177e9f700ddb6cb25904da809f2cd10f8f47660 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Thu, 22 Feb 2024 08:10:34 -0800 Subject: [PATCH] python311Packages.pyexiftool: init at 0.5.6 --- .../python-modules/pyexiftool/default.nix | 47 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 49 insertions(+) create mode 100644 pkgs/development/python-modules/pyexiftool/default.nix diff --git a/pkgs/development/python-modules/pyexiftool/default.nix b/pkgs/development/python-modules/pyexiftool/default.nix new file mode 100644 index 000000000000..e7240658ef33 --- /dev/null +++ b/pkgs/development/python-modules/pyexiftool/default.nix @@ -0,0 +1,47 @@ +{ lib +, buildPythonPackage +, pythonOlder +, fetchFromGitHub +, exiftool +, setuptools +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "pyexiftool"; + version = "0.5.6"; + pyproject = true; + + disabled = pythonOlder "3.6"; + + src = fetchFromGitHub { + owner = "sylikc"; + repo = "pyexiftool"; + rev = "refs/tags/v${version}"; + hash = "sha256-dgQkbpCbdq2JbupY0DyQbHPR9Bg+bwDo7yN03o3sX+A="; + }; + + postPatch = '' + substituteInPlace exiftool/constants.py \ + --replace-fail 'DEFAULT_EXECUTABLE = "exiftool"' \ + 'DEFAULT_EXECUTABLE = "${lib.getExe exiftool}"' + ''; + + nativeBuildInputs = [ + setuptools + ]; + + pythonImportsCheck = [ "exiftool" ]; + + nativeCheckInputs = [ + pytestCheckHook + ]; + + meta = { + changelog = "https://github.com/sylikc/pyexiftool/blob/${src.rev}/CHANGELOG.md"; + description = "Python wrapper for exiftool"; + homepage = "https://github.com/sylikc/pyexiftool"; + license = with lib.licenses; [ bsd3 /* or */ gpl3Plus ]; + maintainers = with lib.maintainers; [ dotlambda ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index bdd6908c95fe..64affaf3dff4 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -10533,6 +10533,8 @@ self: super: with self; { pyexcel-xls = callPackage ../development/python-modules/pyexcel-xls { }; + pyexiftool = callPackage ../development/python-modules/pyexiftool { }; + pyexploitdb = callPackage ../development/python-modules/pyexploitdb { }; pyezviz = callPackage ../development/python-modules/pyezviz { };