biome: 1.9.2 -> 1.9.3 (#349335)
[NixPkgs.git] / pkgs / development / python-modules / django-hijack / default.nix
blob097a90f821bc3fe1f278161c5ce059c1cc75cb81
2   lib,
3   fetchFromGitHub,
4   fetchNpmDeps,
5   buildPythonPackage,
6   nix-update-script,
8   # build-system
9   flit-gettext,
10   flit-scm,
11   nodejs,
12   npmHooks,
14   # dependencies
15   django,
17   # tests
18   pytest-django,
19   pytestCheckHook,
22 buildPythonPackage rec {
23   pname = "django-hijack";
24   version = "3.6.1";
25   pyproject = true;
27   src = fetchFromGitHub {
28     owner = "django-hijack";
29     repo = "django-hijack";
30     rev = "refs/tags/${version}";
31     hash = "sha256-xnRVoCs+TyAbvFSBD58MJhwLw7ecKpMFuWewAgmnzqk=";
32   };
34   postPatch = ''
35     sed -i "/addopts/d" pyproject.toml
37   # missing integrity hashes for yocto-queue, yargs-parser
38     cp ${./package-lock.json} package-lock.json
39   '';
41   npmDeps = fetchNpmDeps {
42     inherit src postPatch;
43     hash = "sha256-npAFpdqGdttE4facBimS/y2SqwnCvOHJhd60SPR/IaA=";
44   };
46   build-system = [
47     flit-gettext
48     flit-scm
49     nodejs
50     npmHooks.npmConfigHook
51   ];
53   dependencies = [ django ];
55   nativeCheckInputs = [
56     pytestCheckHook
57     pytest-django
58   ];
60   preCheck = ''
61     export DJANGO_SETTINGS_MODULE=tests.test_app.settings
62   '';
64   # needed for npmDeps update
65   passthru.updateScript = nix-update-script { };
67   meta = with lib; {
68     description = "Allows superusers to hijack (=login as) and work on behalf of another user";
69     homepage = "https://github.com/django-hijack/django-hijack";
70     changelog = "https://github.com/django-hijack/django-hijack/releases/tag/${version}";
71     license = licenses.mit;
72     maintainers = with maintainers; [ ris ];
73   };