pdfding: 1.7.2 -> 1.8.0 (#528214)

This commit is contained in:
Ivan Mincik
2026-06-05 08:38:46 +00:00
committed by GitHub
6 changed files with 38 additions and 12 deletions

View File

@@ -34,6 +34,10 @@
# enable mailpit
services.mailpit.instances.default = { };
# allows running nixos test on qemu without kvm, eg. github actions on aarch64-linux
systemd.settings.Manager.DefaultDeviceTimeoutSec = lib.mkForce 1800;
boot.initrd.kernelModules = [ "virtio_console" ];
};
};

View File

@@ -42,6 +42,10 @@
# it only cares about files in static/
))
];
# allows running nixos test on qemu without kvm, eg. github actions on aarch64-linux
systemd.settings.Manager.DefaultDeviceTimeoutSec = lib.mkForce 1800;
boot.initrd.kernelModules = [ "virtio_console" ];
};
};

View File

@@ -25,6 +25,10 @@
environment.systemPackages = [
config.services.postgresql.finalPackage
];
# allows running nixos test on qemu without kvm, eg. github actions on aarch64-linux
systemd.settings.Manager.DefaultDeviceTimeoutSec = lib.mkForce 1800;
boot.initrd.kernelModules = [ "virtio_console" ];
};
};

View File

@@ -92,6 +92,10 @@ in
minio-client
sqlite
];
# allows running nixos test on qemu without kvm, eg. github actions on aarch64-linux
systemd.settings.Manager.DefaultDeviceTimeoutSec = lib.mkForce 1800;
boot.initrd.kernelModules = [ "virtio_console" ];
};
};

View File

@@ -28,13 +28,13 @@ let
};
in
stdenv.mkDerivation (finalAttrs: {
pname = "${pdfding.pname}-frontend";
pname = "pdfding-frontend";
inherit (pdfding) src version;
npmDeps = fetchNpmDeps {
inherit (finalAttrs) src;
name = "${finalAttrs.pname}-${finalAttrs.version}-npm-deps";
hash = "sha256-HOGnzDKg1ca/27u1oQEtOkOl6Cg/7k+aLJEJhbypUhE=";
name = "pdfding-${finalAttrs.version}-npm-deps";
hash = "sha256-fxhDP/kyDfL1uiZCUNr2Cd6vDnyb9V+gTSNPyjSIm18=";
};
nativeBuildInputs = [
@@ -44,6 +44,9 @@ stdenv.mkDerivation (finalAttrs: {
tailwindcss_4
];
strictDeps = true;
__structuredAttrs = true;
# keeping the file structure same as upstream to minimise confusion
buildPhase = ''
runHook preBuild

View File

@@ -12,15 +12,18 @@ let
in
python.pkgs.buildPythonPackage (finalAttrs: {
pname = "pdfding";
version = "1.7.2";
version = "1.8.0";
src = fetchFromGitHub {
owner = "mrmn2";
repo = "PdfDing";
tag = "v${finalAttrs.version}";
hash = "sha256-a12Rq4fd3XEW6ZTsm8ISklpMu0ZKpeBrZXNh9My3vUQ=";
hash = "sha256-ITOsKABToGMJDdCiWH3+nTuuTW5ZuMXcQYv0QyMb19I=";
};
pyproject = true;
strictDeps = true;
__structuredAttrs = true;
# remove supervisor from dependencies
postPatch = ''
sed -i 's/supervisor.*$//' pyproject.toml
@@ -107,9 +110,13 @@ python.pkgs.buildPythonPackage (finalAttrs: {
env.PDFDING_OUT_DIR = "${placeholder "out"}/${python.sitePackages}/pdfding";
makeWrapperArgs = [
"--set-default DATA_DIR /var/lib/pdfding"
"--set-default"
"DATA_DIR"
"/var/lib/pdfding"
# allow for gunicorn processes to have access to Python packages
"--prefix PYTHONPATH : "
"--prefix"
"PYTHONPATH"
":"
"${python.pkgs.makePythonPath finalAttrs.passthru.dependencies}:${finalAttrs.env.PDFDING_OUT_DIR}"
];
@@ -117,21 +124,21 @@ python.pkgs.buildPythonPackage (finalAttrs: {
mkdir -p $out/bin
makeWrapper "$PDFDING_OUT_DIR/manage.py" $out/bin/pdfding-manage \
$makeWrapperArgs
"''${makeWrapperArgs[@]}"
makeWrapper ${lib.getExe python.pkgs.gunicorn} $out/bin/pdfding-start \
--add-flags '--bind ''${HOST_IP:-127.0.0.1}:''${HOST_PORT:-8080} core.wsgi:application' \
$makeWrapperArgs
"''${makeWrapperArgs[@]}"
'';
pythonRelaxDeps = [
"rapidfuzz"
"django"
"django-allauth"
"gunicorn"
"huey"
"nh3"
"psycopg2-binary"
"pypdf"
"pypdfium2"
"whitenoise"
];
checkInputs = with python.pkgs; [