pdfding: 1.9.0 -> 1.10.0 (#540184)
This commit is contained in:
@@ -17,6 +17,11 @@
|
||||
secretKeyFile = pkgs.writeText "secretKeyFile" "test123";
|
||||
};
|
||||
|
||||
# NOTE: on aarch64-linux github actions runer due to lack of kvm, we need to delay pdfding start and give it more time to finish
|
||||
systemd.services.pdfding.wantedBy = lib.mkIf pkgs.stdenv.hostPlatform.isAarch64 (lib.mkForce [ ]);
|
||||
systemd.services.pdfding.serviceConfig.TimeoutStartSec =
|
||||
lib.mkIf pkgs.stdenv.hostPlatform.isAarch64 "900";
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
sqlite
|
||||
];
|
||||
@@ -60,6 +65,7 @@
|
||||
|
||||
# create admin
|
||||
machine.wait_for_unit("multi-user.target")
|
||||
machine.succeed("systemctl start pdfding.service")
|
||||
machine.wait_for_open_port(${toString port})
|
||||
machine.succeed("DJANGO_SUPERUSER_PASSWORD=admin pdfding-manage createsuperuser --no-input --username admin --email admin@localhost")
|
||||
|
||||
|
||||
@@ -22,6 +22,14 @@
|
||||
installTestHelpers = true;
|
||||
};
|
||||
|
||||
# NOTE: on aarch64-linux github actions runer due to lack of kvm, we need to delay pdfding start and give it more time to finish
|
||||
systemd.services.pdfding.wantedBy = lib.mkIf pkgs.stdenv.hostPlatform.isAarch64 (lib.mkForce [ ]);
|
||||
systemd.services.pdfding.serviceConfig.TimeoutStartSec =
|
||||
lib.mkIf pkgs.stdenv.hostPlatform.isAarch64 "900";
|
||||
systemd.services.pdfding-background.wantedBy = lib.mkIf pkgs.stdenv.hostPlatform.isAarch64 (
|
||||
lib.mkForce [ ]
|
||||
);
|
||||
|
||||
environment.systemPackages = [
|
||||
config.services.postgresql.finalPackage
|
||||
];
|
||||
@@ -46,6 +54,8 @@
|
||||
|
||||
# create admin
|
||||
machine.wait_for_unit("multi-user.target")
|
||||
machine.succeed("systemctl start pdfding.service")
|
||||
machine.succeed("systemctl start pdfding-background.service")
|
||||
machine.wait_for_open_port(${toString port})
|
||||
|
||||
machine.succeed("DJANGO_SUPERUSER_PASSWORD=admin pdfding-manage createsuperuser --no-input --username admin --email admin@localhost")
|
||||
|
||||
@@ -31,12 +31,20 @@ in
|
||||
backup.schedule = "*/1 * * * *";
|
||||
backup.endpoint = "[::]:3900";
|
||||
extraEnvironment.BACKUP_BUCKET_NAME = "pdfding-bucket";
|
||||
extraEnvironment.BACKUP_REGION = "garage";
|
||||
extraEnvironment.BACKUP_REGION = "us-east-1";
|
||||
|
||||
envFiles = [ pdfding-s3-keys ];
|
||||
installTestHelpers = true;
|
||||
};
|
||||
|
||||
# NOTE: on aarch64-linux github actions runer due to lack of kvm, we need to delay pdfding start and give it more time to finish
|
||||
systemd.services.pdfding.wantedBy = lib.mkIf pkgs.stdenv.hostPlatform.isAarch64 (lib.mkForce [ ]);
|
||||
systemd.services.pdfding.serviceConfig.TimeoutStartSec =
|
||||
lib.mkIf pkgs.stdenv.hostPlatform.isAarch64 "900";
|
||||
systemd.services.pdfding-background.wantedBy = lib.mkIf pkgs.stdenv.hostPlatform.isAarch64 (
|
||||
lib.mkForce [ ]
|
||||
);
|
||||
|
||||
# Setup a local garage service for the backup feature
|
||||
# taken from garage nixosTest
|
||||
services.garage = {
|
||||
@@ -48,7 +56,7 @@ in
|
||||
rpc_secret = "5c1915fa04d0b6739675c61bf5907eb0fe3d9c69850c83820f51b4d25d13868c";
|
||||
|
||||
s3_api = {
|
||||
s3_region = "garage";
|
||||
s3_region = "us-east-1";
|
||||
api_bind_addr = "[::]:3900";
|
||||
root_domain = ".s3.garage";
|
||||
};
|
||||
@@ -113,6 +121,8 @@ in
|
||||
|
||||
# create admin
|
||||
machine.wait_for_unit("multi-user.target")
|
||||
machine.succeed("systemctl start pdfding.service")
|
||||
machine.succeed("systemctl start pdfding-background.service")
|
||||
machine.wait_for_open_port(${toString port})
|
||||
machine.succeed("DJANGO_SUPERUSER_PASSWORD=admin pdfding-manage createsuperuser --no-input --username admin --email admin@localhost")
|
||||
|
||||
@@ -140,7 +150,7 @@ in
|
||||
-F "description=" \
|
||||
-F "collection=1" \
|
||||
-F "use_file_name=on" \
|
||||
-F "name=test-upload" \
|
||||
-F "name=dummy" \
|
||||
-F "file=@{test_pdf};type=application/pdf" \
|
||||
-F "csrfmiddlewaretoken=$csrf_token" \
|
||||
-H "Referer: {endpoint}/pdf/add" \
|
||||
|
||||
@@ -33,7 +33,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
npmDeps = fetchNpmDeps {
|
||||
inherit (finalAttrs) src;
|
||||
name = "pdfding-${finalAttrs.version}-npm-deps";
|
||||
hash = "sha256-fxhDP/kyDfL1uiZCUNr2Cd6vDnyb9V+gTSNPyjSIm18=";
|
||||
hash = "sha256-TDX2xoHj07aUeuLPt/TlgkdRdTiv3fNbriChzEB4EXk=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
||||
@@ -12,12 +12,12 @@ let
|
||||
in
|
||||
python.pkgs.buildPythonPackage (finalAttrs: {
|
||||
pname = "pdfding";
|
||||
version = "1.9.0";
|
||||
version = "1.10.0";
|
||||
src = fetchFromGitHub {
|
||||
owner = "mrmn2";
|
||||
repo = "PdfDing";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-r3hO92iriQ/0KDl+D/0j5RoneTTCDmt8m4e7ugzyOPs=";
|
||||
hash = "sha256-C1osj8V9+z3ahl4+zUtyI22GMtSgNLzfdGttL7gPDvY=";
|
||||
};
|
||||
pyproject = true;
|
||||
|
||||
@@ -132,11 +132,11 @@ python.pkgs.buildPythonPackage (finalAttrs: {
|
||||
'';
|
||||
|
||||
pythonRelaxDeps = [
|
||||
"django"
|
||||
"gunicorn"
|
||||
"huey"
|
||||
"nh3"
|
||||
"psycopg2-binary"
|
||||
"pypdf"
|
||||
"pypdfium2"
|
||||
];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user