From 3c5edb16a73932efa21fd2a9a98a9dcfd6216de1 Mon Sep 17 00:00:00 2001 From: Chris Ostrouchov Date: Wed, 17 Oct 2018 11:47:17 -0400 Subject: [PATCH] pythonPackages.minimock: refactor move to python-modules --- .../python-modules/minimock/default.nix | 26 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 19 +------------- 2 files changed, 27 insertions(+), 18 deletions(-) create mode 100644 pkgs/development/python-modules/minimock/default.nix diff --git a/pkgs/development/python-modules/minimock/default.nix b/pkgs/development/python-modules/minimock/default.nix new file mode 100644 index 000000000000..71409785b77d --- /dev/null +++ b/pkgs/development/python-modules/minimock/default.nix @@ -0,0 +1,26 @@ +{ stdenv +, buildPythonPackage +, fetchurl +, nose +}: + +buildPythonPackage rec { + version = "1.2.8"; + pname = "minimock"; + + src = fetchurl { + url = "https://bitbucket.org/jab/minimock/get/${version}.zip"; + sha256 = "c88fa8a7120623f23990a7f086a9657f6ced09025a55e3be8649a30b4945441a"; + }; + + buildInputs = [ nose ]; + + checkPhase = "./test"; + + meta = with stdenv.lib; { + description = "A minimalistic mocking library for python"; + homepage = https://pypi.python.org/pypi/MiniMock; + license = licenses.mit; + }; + +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index bd70364474f7..787677ee59b2 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2756,24 +2756,7 @@ in { milksnake = callPackage ../development/python-modules/milksnake { }; - minimock = buildPythonPackage rec { - version = "1.2.8"; - name = "minimock-${version}"; - - src = pkgs.fetchurl { - url = "https://bitbucket.org/jab/minimock/get/${version}.zip"; - sha256 = "c88fa8a7120623f23990a7f086a9657f6ced09025a55e3be8649a30b4945441a"; - }; - - buildInputs = with self; [ nose ]; - - checkPhase = "./test"; - - meta = { - description = "A minimalistic mocking library for python"; - homepage = https://pypi.python.org/pypi/MiniMock; - }; - }; + minimock = callPackage ../development/python-modules/minimock { }; moviepy = callPackage ../development/python-modules/moviepy { };