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-E5gM/5MIB65gdyv/I+Kuw8rbjPvtUnbCPXpasaIDzyo=";
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-4ZVb+V/oYfflIZdme6hbpoSBFVV7lk5wLfEzzBqZv/Y=";
46 SETUPTOOLS_SCM_PRETEND_VERSION = version;
51 npmHooks.npmConfigHook
55 propagatedBuildInputs = [
64 env.DJANGO_SETTINGS_MODULE = "hijack.tests.test_app.settings";
68 "-W" "ignore::DeprecationWarning"
71 # needed for npmDeps update
72 passthru.updateScript = nix-update-script { };
75 description = "Allows superusers to hijack (=login as) and work on behalf of another user";
76 homepage = "https://github.com/arteria/django-hijack";
77 changelog = "https://github.com/django-hijack/django-hijack/releases/tag/${version}";
78 license = licenses.mit;
79 maintainers = with maintainers; [ ris ];