pdfding: 1.7.2 -> 1.8.0

Signed-off-by: phanirithvij <phanirithvij2000@gmail.com>
This commit is contained in:
phanirithvij
2026-06-05 09:19:46 +05:30
parent b10396a109
commit d31d4d39a8
2 changed files with 22 additions and 12 deletions

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; [