diff --git a/pkgs/development/python-modules/bcrypt.nix b/pkgs/development/python-modules/bcrypt.nix new file mode 100644 index 000000000000..94f04880c8e1 --- /dev/null +++ b/pkgs/development/python-modules/bcrypt.nix @@ -0,0 +1,23 @@ +{ stdenv, buildPythonPackage, isPyPy, fetchurl +, cffi, pycparser, mock, pytest, py }: + +with stdenv.lib; + +buildPythonPackage rec { + name = "bcrypt-${version}"; + version = "3.1.2"; + + src = fetchurl { + url = "mirror://pypi/b/bcrypt/${name}.tar.gz"; + sha256 = "1al54xafv1aharpb22yv5rjjc63fm60z3pn2shbiq48ah9f1fvil"; + }; + buildInputs = [ pycparser mock pytest py ]; + propagatedBuildInputs = optional (!isPyPy) cffi; + + meta = { + maintainers = with maintainers; [ domenkozar ]; + description = "Modern password hashing for your software and your servers"; + license = licenses.asl20; + homepage = https://github.com/pyca/bcrypt/; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index c971c926619c..fcfe8bebadf6 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4781,24 +4781,7 @@ in { }; }; - bcrypt = buildPythonPackage rec { - name = "bcrypt-${version}"; - version = "3.1.0"; - - src = pkgs.fetchurl { - url = "mirror://pypi/b/bcrypt/${name}.tar.gz"; - sha256 = "e54820d8b9eff357d1003f5b8d4b949a632b76b89610d8a933783fd476033ebe"; - }; - buildInputs = with self; [ pycparser mock pytest py ]; - propagatedBuildInputs = with self; optional (!isPyPy) cffi; - - meta = { - maintainers = with maintainers; [ domenkozar ]; - description = "Modern password hashing for your software and your servers"; - license = licenses.asl20; - homepage = https://github.com/pyca/bcrypt/; - }; - }; + bcrypt = callPackage ../development/python-modules/bcrypt.nix { }; cffi = if isPyPy then null else buildPythonPackage rec { name = "cffi-1.9.1";