diff options
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/py3exiv2/default.nix')
-rw-r--r-- | nixpkgs/pkgs/development/python-modules/py3exiv2/default.nix | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/py3exiv2/default.nix b/nixpkgs/pkgs/development/python-modules/py3exiv2/default.nix new file mode 100644 index 000000000000..676f6b22990b --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/py3exiv2/default.nix @@ -0,0 +1,33 @@ +{ buildPythonPackage, isPy3k, fetchPypi, stdenv, exiv2, boost, libcxx, substituteAll, python }: + +buildPythonPackage rec { + pname = "py3exiv2"; + version = "0.5.0"; + disabled = !(isPy3k); + + src = fetchPypi { + inherit pname version; + sha256 = "09mv7hcczayzjbd4dsrph16ab21slaiamgph9lwr1kjdw7ri5cpg"; + }; + + buildInputs = [ exiv2 boost ]; + + # work around python distutils compiling C++ with $CC (see issue #26709) + NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.isDarwin "-I${libcxx}/include/c++/v1"; + + # fix broken libboost_python3 detection + patches = [ + (substituteAll { + src = ./setup.patch; + version = "3${stdenv.lib.versions.minor python.version}"; + }) + ]; + + meta = { + homepage = "https://launchpad.net/py3exiv2"; + description = "A Python3 binding to the library exiv2"; + license = with stdenv.lib.licenses; [ gpl3 ]; + maintainers = with stdenv.lib.maintainers; [ vinymeuh ]; + platforms = with stdenv.lib.platforms; linux ++ darwin; + }; +} |