diff --git a/pkgs/development/python-modules/imagesize/default.nix b/pkgs/development/python-modules/imagesize/default.nix new file mode 100644 index 000000000000..32a8310334ae --- /dev/null +++ b/pkgs/development/python-modules/imagesize/default.nix @@ -0,0 +1,21 @@ +{ stdenv +, buildPythonPackage +, fetchPypi +}: + +buildPythonPackage rec { + pname = "imagesize"; + version = "0.7.0"; + + src = fetchPypi { + inherit pname version; + sha256 = "0msgz4ncp2nb5nbsxnf8kvxsl6nhwvc3b46ik097fvznl3y10gdv"; + }; + + meta = with stdenv.lib; { + description = "Getting image size from png/jpeg/jpeg2000/gif file"; + homepage = https://github.com/shibukawa/imagesize_py; + license = with licenses; [ mit ]; + }; + +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 7e443419c410..1d7fcc8c62a6 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1884,22 +1884,7 @@ in { ijson = callPackage ../development/python-modules/ijson {}; - imagesize = buildPythonPackage rec { - name = "imagesize-${version}"; - version = "0.7.0"; - - src = pkgs.fetchurl { - url = "mirror://pypi/i/imagesize/${name}.tar.gz"; - sha256 = "0msgz4ncp2nb5nbsxnf8kvxsl6nhwvc3b46ik097fvznl3y10gdv"; - }; - - meta = { - description = "Getting image size from png/jpeg/jpeg2000/gif file"; - homepage = https://github.com/shibukawa/imagesize_py; - license = with licenses; [ mit ]; - }; - - }; + imagesize = callPackage ../development/python-modules/imagesize { }; image-match = callPackage ../development/python-modules/image-match { };