From 36af8d34c92924ed9ce91733640a782d239a4e19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=BCrkan=20G=C3=BCr?= Date: Tue, 6 Aug 2019 16:54:14 +0200 Subject: [PATCH] django-postgresql-netfields: init at 1.2.2 --- .../django-postgresql-netfields/default.nix | 49 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 51 insertions(+) create mode 100644 pkgs/development/python-modules/django-postgresql-netfields/default.nix diff --git a/pkgs/development/python-modules/django-postgresql-netfields/default.nix b/pkgs/development/python-modules/django-postgresql-netfields/default.nix new file mode 100644 index 000000000000..35be6f76147c --- /dev/null +++ b/pkgs/development/python-modules/django-postgresql-netfields/default.nix @@ -0,0 +1,49 @@ +{ stdenv +, buildPythonPackage +, django +, netaddr +, six +, fetchFromGitHub +# required for tests +#, djangorestframework +#, psycopg2 +#, unittest2 +}: + +buildPythonPackage rec { + version = "1.2.2"; + pname = "django-postgresql-netfields"; + + src = fetchFromGitHub { + owner = "jimfunk"; + repo = "${pname}"; + rev = "v${version}"; + sha256 = "1rrh38f3zl3jk5ijs6g75dxxvxygf4lczbgc7ahrgzf58g4a48lm"; + }; + + # tests need a postgres database + doCheck = false; + + # keeping the dependencies below as comment for reference + # checkPhase = '' + # python manage.py test + # ''; + + # buildInputs = [ + # djangorestframework + # psycopg2 + # unittest2 + # ]; + + propagatedBuildInputs = [ + django + netaddr + six + ]; + + meta = with stdenv.lib; { + description = "Django PostgreSQL netfields implementation"; + homepage = https://github.com/jimfunk/django-postgresql-netfields; + license = licenses.bsd2; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index fe8f6c98a525..cd535c9f3d61 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -3160,6 +3160,8 @@ in { django_polymorphic = callPackage ../development/python-modules/django-polymorphic { }; + django-postgresql-netfields = callPackage ../development/python-modules/django-postgresql-netfields { }; + django-rest-auth = callPackage ../development/python-modules/django-rest-auth { }; django-sampledatahelper = callPackage ../development/python-modules/django-sampledatahelper { };