From f8465776dd933fb81bf622485dc41756d88c1335 Mon Sep 17 00:00:00 2001 From: Chris Ostrouchov Date: Mon, 15 Oct 2018 15:43:20 -0400 Subject: [PATCH] pythonPackages.factory_boy: refactor move to python-modules --- .../python-modules/factory_boy/default.nix | 24 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 18 +------------- 2 files changed, 25 insertions(+), 17 deletions(-) create mode 100644 pkgs/development/python-modules/factory_boy/default.nix diff --git a/pkgs/development/python-modules/factory_boy/default.nix b/pkgs/development/python-modules/factory_boy/default.nix new file mode 100644 index 000000000000..1e5da699894e --- /dev/null +++ b/pkgs/development/python-modules/factory_boy/default.nix @@ -0,0 +1,24 @@ +{ stdenv +, buildPythonPackage +, fetchPypi +, fake_factory +}: + +buildPythonPackage rec { + pname = "factory_boy"; + version = "2.6.1"; + + src = fetchPypi { + inherit pname version; + sha256 = "0a21f8kq917fj8xgmyp6gy8vcrlzzgwn80qas0d76h3vjbdy0bdq"; + }; + + propagatedBuildInputs = [ fake_factory ]; + + meta = with stdenv.lib; { + description = "A Python package to create factories for complex objects"; + homepage = https://github.com/rbarrois/factory_boy; + license = licenses.mit; + }; + +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index a597d4264018..4b005c290a98 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1756,23 +1756,7 @@ in { fake_factory = callPackage ../development/python-modules/fake_factory { }; - factory_boy = buildPythonPackage rec { - name = "factory_boy-${version}"; - version = "2.6.1"; - - src = pkgs.fetchurl { - url = "mirror://pypi/f/factory_boy/${name}.tar.gz"; - sha256 = "0a21f8kq917fj8xgmyp6gy8vcrlzzgwn80qas0d76h3vjbdy0bdq"; - }; - - propagatedBuildInputs = with self; [ fake_factory ]; - - meta = { - description = "A Python package to create factories for complex objects"; - homepage = https://github.com/rbarrois/factory_boy; - license = licenses.mit; - }; - }; + factory_boy = callPackage ../development/python-modules/factory_boy { }; Fabric = callPackage ../development/python-modules/Fabric { };