Martin Weinelt 2024-07-01 02:35:24 +02:00
parent 6298ea9c7f
commit 0bafdba04c
No known key found for this signature in database
GPG Key ID: 87C1E9888F856759
2 changed files with 7893 additions and 24 deletions

View File

@ -6,10 +6,10 @@
nix-update-script,
# build-system
gettext,
flit-gettext,
flit-scm,
nodejs,
npmHooks,
setuptools-scm,
# dependencies
django,
@ -21,58 +21,52 @@
buildPythonPackage rec {
pname = "django-hijack";
version = "3.4.5";
format = "setuptools";
version = "3.5.4";
pyproject = true;
src = fetchFromGitHub {
owner = "django-hijack";
repo = "django-hijack";
rev = "refs/tags/${version}";
hash = "sha256-FXh5OFMTjsKgjEeIS+CiOwyGOs4AisJA+g49rCILDsQ=";
hash = "sha256-d8rKn4Hab7y/e/VLhVfr3A3TUhoDtjP7RhCj+o6IbyE=";
};
postPatch = ''
substituteInPlace setup.py \
--replace 'cmd = ["npm", "ci"]' 'cmd = ["true"]' \
--replace 'f"{self.build_lib}/{name}.mo"' 'f"{name}.mo"'
sed -i "/addopts/d" pyproject.toml
sed -i "/addopts/d" setup.cfg
# missing integrity hashes for yocto-queue, yargs-parser
cp ${./package-lock.json} package-lock.json
'';
npmDeps = fetchNpmDeps {
inherit src;
hash = "sha256-cZEr/7FW4vCR8gpraT+/rPwYK9Xn22b5WH7lnuK5L4U=";
inherit src postPatch;
hash = "sha256-npAFpdqGdttE4facBimS/y2SqwnCvOHJhd60SPR/IaA=";
};
nativeBuildInputs = [
gettext
build-system = [
flit-gettext
flit-scm
nodejs
npmHooks.npmConfigHook
setuptools-scm
];
propagatedBuildInputs = [ django ];
dependencies = [ django ];
nativeCheckInputs = [
pytestCheckHook
pytest-django
];
env.DJANGO_SETTINGS_MODULE = "hijack.tests.test_app.settings";
pytestFlagsArray = [
"--pyargs"
"hijack"
"-W"
"ignore::DeprecationWarning"
];
preCheck = ''
export DJANGO_SETTINGS_MODULE=hijack.tests.test_app.settings
'';
# needed for npmDeps update
passthru.updateScript = nix-update-script { };
meta = with lib; {
description = "Allows superusers to hijack (=login as) and work on behalf of another user";
homepage = "https://github.com/arteria/django-hijack";
homepage = "https://github.com/django-hijack/django-hijack";
changelog = "https://github.com/django-hijack/django-hijack/releases/tag/${version}";
license = licenses.mit;
maintainers = with maintainers; [ ris ];

File diff suppressed because it is too large Load Diff