21 buildPythonPackage rec {
22 pname = "django-hijack";
24 format = "setuptools";
26 src = fetchFromGitHub {
27 owner = "django-hijack";
28 repo = "django-hijack";
29 rev = "refs/tags/${version}";
30 hash = "sha256-FXh5OFMTjsKgjEeIS+CiOwyGOs4AisJA+g49rCILDsQ=";
34 substituteInPlace setup.py \
35 --replace 'cmd = ["npm", "ci"]' 'cmd = ["true"]' \
36 --replace 'f"{self.build_lib}/{name}.mo"' 'f"{name}.mo"'
38 sed -i "/addopts/d" setup.cfg
41 npmDeps = fetchNpmDeps {
43 hash = "sha256-cZEr/7FW4vCR8gpraT+/rPwYK9Xn22b5WH7lnuK5L4U=";
49 npmHooks.npmConfigHook
53 propagatedBuildInputs = [
62 env.DJANGO_SETTINGS_MODULE = "hijack.tests.test_app.settings";
66 "-W" "ignore::DeprecationWarning"
69 # needed for npmDeps update
70 passthru.updateScript = nix-update-script { };
73 description = "Allows superusers to hijack (=login as) and work on behalf of another user";
74 homepage = "https://github.com/arteria/django-hijack";
75 changelog = "https://github.com/django-hijack/django-hijack/releases/tag/${version}";
76 license = licenses.mit;
77 maintainers = with maintainers; [ ris ];