From fde83078469f404e71a00635df841c7c3679bb76 Mon Sep 17 00:00:00 2001 From: Ilya Kolpakov Date: Thu, 14 Dec 2017 15:13:51 +0100 Subject: [PATCH] pythonPackages.inflection: use fetchpypi, run tests (0.3.1) --- .../python-modules/inflection/default.nix | 30 ++++++++++--------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/pkgs/development/python-modules/inflection/default.nix b/pkgs/development/python-modules/inflection/default.nix index f4b7a1f0fc7..bccf49c56ad 100644 --- a/pkgs/development/python-modules/inflection/default.nix +++ b/pkgs/development/python-modules/inflection/default.nix @@ -1,21 +1,23 @@ -{ lib, fetchurl, buildPythonPackage, pytest } : +{ lib, fetchPypi, buildPythonPackage, pytest } : buildPythonPackage rec { - version = "0.3.1"; - name = "inflection-${version}"; + pname = "inflection"; + version = "0.3.1"; - src = fetchurl { - url= "mirror://pypi/i/inflection/${name}.tar.gz"; - sha256 = "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"; - }; + src = fetchPypi { + inherit pname version; + sha256 = "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"; + }; - propagatedBuildInputs = [ pytest ]; + checkInputs = [ pytest ]; + # Suppress overly verbose output if tests run successfully + checkPhase = ''pytest >/dev/null || pytest''; - meta = { - homepage = https://github.com/jpvanhal/inflection; - description = "A port of Ruby on Rails inflector to Python"; - maintainers = with lib.maintainers; [ NikolaMandic ilya-kolpakov ]; - license = lib.licenses.mit; - }; + meta = { + homepage = https://github.com/jpvanhal/inflection; + description = "A port of Ruby on Rails inflector to Python"; + maintainers = with lib.maintainers; [ NikolaMandic ilya-kolpakov ]; + license = lib.licenses.mit; + }; }