depot/third_party/nixpkgs/pkgs/development/python-modules/django-picklefield/default.nix
Default email 58f8944c92 Project import generated by Copybara.
GitOrigin-RevId: 5aba0fe9766a7201a336249fd6cb76e0d7ba2faf
2020-09-24 23:45:31 -05:00

30 lines
750 B
Nix

{ lib, buildPythonPackage, fetchFromGitHub, django, pytest, pytest-django }:
buildPythonPackage rec {
pname = "django-picklefield";
version = "3.0.1";
# The PyPi source doesn't contain tests
src = fetchFromGitHub {
owner = "gintas";
repo = pname;
rev = "v${version}";
sha256 = "0ni7bc86k0ra4pc8zv451pzlpkhs1nyil1sq9jdb4m2mib87b5fk";
};
propagatedBuildInputs = [ django ];
checkInputs = [ pytest pytest-django ];
checkPhase = ''
PYTHONPATH="$(pwd):$PYTHONPATH" \
DJANGO_SETTINGS_MODULE=tests.settings \
pytest tests/tests.py
'';
meta = {
description = "A pickled object field for Django";
homepage = "https://github.com/gintas/django-picklefield";
license = lib.licenses.mit;
};
}