Unverified Commit e1b6c395 authored by Robert Scott's avatar Robert Scott Committed by GitHub
Browse files

Merge pull request #226462 from mweinelt/django-deps

Various django packages
parents b605a205 68bd8123
Loading
Loading
Loading
Loading
+48 −0
Original line number Diff line number Diff line
{ lib
, buildPythonPackage
, fetchPypi
, setuptools
, django
, pytest-django
, pytestCheckHook
}:

buildPythonPackage rec {
  pname = "django-bootstrap3";
  version = "23.1";
  format = "pyproject";

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-cJW3xmqJ87rreOoCh5nr15XSlzn8hgJGBCLnwqGUrTA=";
  };

  nativeBuildInputs = [
    setuptools
  ];

  buildInputs = [
    django
  ];

  pythonImportsCheck = [
    "bootstrap3"
  ];

  nativeCheckInputs = [
    pytest-django
    pytestCheckHook
  ];

  env.DJANGO_SETTINGS_MODULE = "tests.app.settings";

  meta = with lib; {
    description = "Bootstrap 3 integration for Django";
    homepage = "https://github.com/zostera/django-bootstrap3";
    changelog = "https://github.com/zostera/django-bootstrap3/blob/${version}/CHANGELOG.md";
    license = licenses.bsd3;
    maintainers = with maintainers; [ hexa ];
  };
}

+60 −0
Original line number Diff line number Diff line
{ lib
, buildPythonPackage
, fetchFromGitHub

# build
, setuptools

# propagates
, asgiref
, typing-extensions

# tests
, django
, djangorestframework
, graphene-django
, pytestCheckHook
, pytest-django
}:

buildPythonPackage rec {
  pname = "django-countries";
  version = "7.5.1";
  format = "pyproject";

  src = fetchFromGitHub {
    owner = "SmileyChris";
    repo = "django-countries";
    rev = "refs/tags/v${version}";
    hash = "sha256-se6s0sgIfMLW0sIMp/3vK4KdDPQ5ahg6OQCDAs4my4M=";
  };

  nativeBuildInputs = [
    setuptools
  ];

  propagatedBuildInputs = [
    asgiref
    typing-extensions
  ];

  nativeCheckInputs = [
    django
    djangorestframework
    graphene-django
    pytestCheckHook
    pytest-django
  ];

  meta = with lib; {
    description = "Provides a country field for Django models";
    longDescription = ''
      A Django application that provides country choices for use with
      forms, flag icons static files, and a country field for models.
    '';
    homepage = "https://github.com/SmileyChris/django-countries";
    changelog = "https://github.com/SmileyChris/django-countries/blob/v${version}/CHANGES.rst";
    license = licenses.mit;
    maintainers = with maintainers; [ hexa ];
  };
}
+40 −0
Original line number Diff line number Diff line
{ lib
, buildPythonPackage
, fetchFromGitHub
, django
, django-jquery-js
}:

buildPythonPackage rec {
  pname = "django-formset-js-improved";
  version = "0.5.0.3";
  format = "setuptools";

  src = fetchFromGitHub {
    owner = "pretix";
    repo = "django-formset-js";
    rev = "refs/tags/${version}";
    hash = "sha256-bOM24ldXk9WeV0jl6LIJB3BJ5hVWLA1PJTBBnJBoprU=";
  };

  buildInputs = [
    django
  ];

  propagatedBuildInputs = [
    django-jquery-js
  ];

  pythonImportsCheck = [
    "djangoformsetjs"
  ];

  doCheck = false; # no tests

  meta = with lib; {
    description = "A wrapper for a JavaScript formset helper";
    homepage = "https://github.com/pretix/django-formset-js";
    license = licenses.bsd2;
    maintainers = with maintainers; [ hexa ];
  };
}
+53 −0
Original line number Diff line number Diff line
{ lib
, buildPythonPackage
, fetchFromGitHub

# propagates
, python-dateutil

# tests
, django-extensions
, pytest-django
, pytestCheckHook
}:

buildPythonPackage rec {
  pname = "django-hierarkey";
  version = "1.1.0";
  format = "setuptools";

  src = fetchFromGitHub {
    owner = "raphaelm";
    repo = "django-hierarkey";
    # https://github.com/raphaelm/django-hierarkey/commit/c81ace02ca404a8756e2931bb6faf55b6365e140
    rev = "c81ace02ca404a8756e2931bb6faf55b6365e140";
    hash = "sha256-sCARyTjuuAUptlOsFmApnsQpcksP+uYnq0lukXDMcuk=";
  };

  propagatedBuildInputs = [
    python-dateutil
  ];

  pythonImportsCheck = [
    "hierarkey"
  ];

  nativeCheckInputs = [
    django-extensions
    pytest-django
    pytestCheckHook
  ];

  DJANGO_SETTINGS_MODULE = "tests.settings";

  pytestFlagsArray = [
    "tests"
  ];

  meta = with lib; {
    description = "Flexible and powerful hierarchical key-value store for your Django models";
    homepage = "https://github.com/raphaelm/django-hierarkey";
    license = licenses.asl20;
    maintainers = with maintainers; [ hexa ];
  };
}
+35 −0
Original line number Diff line number Diff line
{ lib
, buildPythonPackage
, fetchFromBitbucket
, django
}:

buildPythonPackage rec {
  pname = "django-jquery-js";
  version = "3.1.1";
  format = "setuptools";

  src = fetchFromBitbucket {
    owner = "tim_heap";
    repo = "django-jquery";
    rev = "refs/tags/v${version}";
    hash = "sha256-TzMo31jFhcvlrmq2TJgQyds9n8eATaChnyhnQ7bwdzs=";
  };

  buildInputs = [
    django
  ];

  pythonImportsCheck = [
    "jquery"
  ];

  doCheck = false; # no tests

  meta = with lib; {
    description = "jQuery, bundled up so apps can depend upon it";
    homepage = "https://bitbucket.org/tim_heap/django-jquery";
    license = licenses.mit;
    maintainers = with maintainers; [ hexa ];
  };
}
Loading