nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 django,
5 fetchFromGitHub,
6 hatch-vcs,
7 hatchling,
8 python,
9}:
10
11buildPythonPackage rec {
12 pname = "django-pwa";
13 version = "2.0.1";
14 pyproject = true;
15
16 src = fetchFromGitHub {
17 owner = "silviolleite";
18 repo = "django-pwa";
19 tag = version;
20 hash = "sha256-EAjDK3rkjoPw8jyVVZdhMNHmTqr0/ERiMwGMxmVbsls=";
21 };
22
23 build-system = [
24 hatch-vcs
25 hatchling
26 ];
27
28 dependencies = [ django ];
29
30 pythonImportsCheck = [ "pwa" ];
31
32 checkPhase = ''
33 runHook preCheck
34 ${python.interpreter} runtests.py
35 runHook postCheck
36 '';
37
38 meta = {
39 description = "Django app to include a manifest.json and Service Worker instance to enable progressive web app behavior";
40 homepage = "https://github.com/silviolleite/django-pwa";
41 changelog = "https://github.com/silviolleite/django-pwa/releases/tag/${src.tag}";
42 license = lib.licenses.mit;
43 maintainers = with lib.maintainers; [ derdennisop ];
44 };
45}