From 80f7dc9c5572b7561a116ebf3b1b6df5905aee23 Mon Sep 17 00:00:00 2001 From: Chris Ostrouchov Date: Mon, 15 Oct 2018 23:39:15 -0400 Subject: [PATCH] pythonPackages.imagesize: refactor move to python-modules --- .../python-modules/imagesize/default.nix | 21 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 17 +-------------- 2 files changed, 22 insertions(+), 16 deletions(-) create mode 100644 pkgs/development/python-modules/imagesize/default.nix 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 { };