From cd599c8fa6b636ece76eebfc49a2cd0439002ef2 Mon Sep 17 00:00:00 2001 From: Symphorien Gibol Date: Mon, 10 Sep 2018 17:29:08 +0200 Subject: [PATCH] pythonPackages.pypillowfight: 0.2 -> 0.2.4 --- .../python-modules/pypillowfight/default.nix | 38 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 30 +-------------- 2 files changed, 39 insertions(+), 29 deletions(-) create mode 100644 pkgs/development/python-modules/pypillowfight/default.nix diff --git a/pkgs/development/python-modules/pypillowfight/default.nix b/pkgs/development/python-modules/pypillowfight/default.nix new file mode 100644 index 000000000000..b1f0a1a8461a --- /dev/null +++ b/pkgs/development/python-modules/pypillowfight/default.nix @@ -0,0 +1,38 @@ +{ stdenv, buildPythonPackage, fetchFromGitLab, nose, pillow +, isPy3k, isPyPy +}: +buildPythonPackage rec { + name = "pypillowfight-${version}"; + version = "0.2.4"; + + src = fetchFromGitLab { + domain = "gitlab.gnome.org"; + group = "World"; + owner = "OpenPaperwork"; + repo = "libpillowfight"; + rev = version; + sha256 = "0wbzfhbzim61fmkm7p7f2rwslacla1x00a6xp50haawjh9zfwc4y"; + }; + + prePatch = '' + echo '#define INTERNAL_PILLOWFIGHT_VERSION "${version}"' > src/pillowfight/_version.h + ''; + + # Disable tests because they're designed to only work on Debian: + # https://github.com/jflesch/libpillowfight/issues/2#issuecomment-268259174 + doCheck = false; + + # Python 2.x is not supported, see: + # https://github.com/jflesch/libpillowfight/issues/1 + disabled = !isPy3k && !isPyPy; + + # This is needed by setup.py regardless of whether tests are enabled. + buildInputs = [ nose ]; + propagatedBuildInputs = [ pillow ]; + + meta = with stdenv.lib; { + description = "Library containing various image processing algorithms"; + inherit (src) homepage; + license = licenses.gpl3Plus; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 9b98a1af7891..a35b9e095b1a 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -3918,35 +3918,7 @@ in { }; }; - pypillowfight = buildPythonPackage rec { - name = "pypillowfight-${version}"; - version = "0.2.1"; - - src = pkgs.fetchFromGitHub { - owner = "jflesch"; - repo = "libpillowfight"; - rev = version; - sha256 = "1rwmajsy9qhl3qhhy5mw0xmr3n8abxcq8baidpn0sxv6yjg2369z"; - }; - - # Disable tests because they're designed to only work on Debian: - # https://github.com/jflesch/libpillowfight/issues/2#issuecomment-268259174 - doCheck = false; - - # Python 2.x is not supported, see: - # https://github.com/jflesch/libpillowfight/issues/1 - disabled = !isPy3k && !isPyPy; - - # This is needed by setup.py regardless of whether tests are enabled. - buildInputs = [ self.nose ]; - propagatedBuildInputs = [ self.pillow ]; - - meta = { - description = "Library containing various image processing algorithms"; - homepage = "https://github.com/jflesch/libpillowfight"; - license = licenses.gpl3Plus; - }; - }; + pypillowfight = callPackage ../development/python-modules/pypillowfight { }; pyprind = callPackage ../development/python-modules/pyprind { };