From e95d07b81e04f6d98b2f8df82fed69651c66fd13 Mon Sep 17 00:00:00 2001 From: dish Date: Sat, 9 Nov 2024 13:36:27 -0500 Subject: [PATCH] archivebox: modernize --- pkgs/by-name/ar/archivebox/package.nix | 27 +++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/pkgs/by-name/ar/archivebox/package.nix b/pkgs/by-name/ar/archivebox/package.nix index 69f58336d323b3..b0f28635a098fe 100644 --- a/pkgs/by-name/ar/archivebox/package.nix +++ b/pkgs/by-name/ar/archivebox/package.nix @@ -11,6 +11,8 @@ readability-extractor, chromium, yt-dlp, + versionCheckHook, + nix-update-script, }: let @@ -66,11 +68,11 @@ python.pkgs.buildPythonApplication rec { fetchSubmodules = true; }; - nativeBuildInputs = with python.pkgs; [ + build-system = with python.pkgs; [ pdm-backend ]; - propagatedBuildInputs = + dependencies = with python.pkgs; [ # Core Libraries @@ -117,7 +119,6 @@ python.pkgs.buildPythonApplication rec { pocket sonic-client yt-dlp - # Plugin dependencies ] ++ python.pkgs.python-benedict.optional-dependencies.io @@ -137,6 +138,12 @@ python.pkgs.buildPythonApplication rec { ]; }; + nativeInstallCheckInputs = [ + versionCheckHook + ]; + + pythonImportsCheck = [ "archivebox" ]; + makeWrapperArgs = [ "--set USE_NODE True" # used through dependencies, not needed explicitly @@ -159,14 +166,20 @@ python.pkgs.buildPythonApplication rec { ] ); - meta = with lib; { + passthru = { + updateScript = nix-update-script { }; + }; + + meta = { description = "Open source self-hosted web archiving"; homepage = "https://archivebox.io"; - license = licenses.mit; - maintainers = with maintainers; [ + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ siraben viraptor + pyrox0 ]; - platforms = platforms.unix; + platforms = lib.platforms.unix; + mainProgram = "archivebox"; }; }