From e3face0a1b82f5561cf066ebc9b66b4ec9a867e1 Mon Sep 17 00:00:00 2001 From: TheGeneralist <180094941+thegeneralist01@users.noreply.github.com> Date: Mon, 22 Jun 2026 22:37:58 +0200 Subject: [PATCH] fix: bundle tweet scraper in archivr-server Nix wrapper archivr_server now includes the Python scraper and sets ARCHIVR_TWEET_PYTHON and ARCHIVR_TWEET_SCRAPER, matching what the archivr CLI wrapper already does. Without this, browser capture of tweets failed with 'No such file or directory' because the server resolved the scraper relative to cwd. --- flake.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index ca122fb..65e4676 100644 --- a/flake.nix +++ b/flake.nix @@ -129,13 +129,18 @@ pname = "archivr-server-wrapped"; inherit version; nativeBuildInputs = [ pkgs.makeWrapper ]; + buildInputs = [ tweetPython ]; phases = [ "installPhase" ]; installPhase = '' mkdir -p $out/bin $out/libexec/archivr-server $out/share/archivr-server/static cp ${archivr_server_unwrapped}/bin/archivr-server $out/libexec/archivr-server/archivr-server + cp ${./vendor/twitter/scrape_user_tweet_contents.py} $out/libexec/archivr-server/scrape_user_tweet_contents.py + chmod +x $out/libexec/archivr-server/scrape_user_tweet_contents.py cp -r ${./crates/archivr-server/static}/* $out/share/archivr-server/static/ makeWrapper $out/libexec/archivr-server/archivr-server $out/bin/archivr-server \ - --set ARCHIVR_STATIC_DIR $out/share/archivr-server/static + --set ARCHIVR_STATIC_DIR $out/share/archivr-server/static \ + --set ARCHIVR_TWEET_PYTHON ${tweetPython}/bin/python3 \ + --set ARCHIVR_TWEET_SCRAPER $out/libexec/archivr-server/scrape_user_tweet_contents.py ''; }; in