From 80ca27442bbe9378efd75f537fafa38d38607d2c Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 7 May 2022 16:10:26 +0200 Subject: [PATCH] python310Packages.py3exiv2: disable on older Python releases - add pythonImportsCheck --- .../python-modules/py3exiv2/default.nix | 33 +++++++++++++++---- 1 file changed, 26 insertions(+), 7 deletions(-) diff --git a/pkgs/development/python-modules/py3exiv2/default.nix b/pkgs/development/python-modules/py3exiv2/default.nix index e5e21e77d74b..c9949ac91065 100644 --- a/pkgs/development/python-modules/py3exiv2/default.nix +++ b/pkgs/development/python-modules/py3exiv2/default.nix @@ -1,24 +1,43 @@ -{ lib, buildPythonPackage, isPy3k, fetchPypi, stdenv, exiv2, boost, libcxx }: +{ lib +, stdenv +, buildPythonPackage +, pythonOlder +, fetchPypi +, exiv2 +, boost +, libcxx +}: buildPythonPackage rec { pname = "py3exiv2"; version = "0.11.0"; - disabled = !(isPy3k); + format = "setuptools"; + + disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - sha256 = "sha256-ZgDaa4lxmdTaZhkblgRfPMxfVwENp2s6xdKSuD/MqEQ="; + hash = "sha256-ZgDaa4lxmdTaZhkblgRfPMxfVwENp2s6xdKSuD/MqEQ="; }; - buildInputs = [ exiv2 boost ]; + buildInputs = [ + boost + exiv2 + ]; # work around python distutils compiling C++ with $CC (see issue #26709) - NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-I${lib.getDev libcxx}/include/c++/v1"; + NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin [ + "-I${lib.getDev libcxx}/include/c++/v1" + ]; + + pythonImportsCheck = [ + "py3exiv2" + ]; meta = with lib; { - homepage = "https://launchpad.net/py3exiv2"; description = "A Python3 binding to the library exiv2"; - license = licenses.gpl3; + homepage = "https://launchpad.net/py3exiv2"; + license = licenses.gpl3Plus; maintainers = with maintainers; [ vinymeuh ]; platforms = with platforms; linux ++ darwin; };