From 46cc453ef7dbb91cb256f52aca5edc5ccde6a627 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Wed, 18 Sep 2024 14:30:14 +0200 Subject: [PATCH] fedifetcher: check if all requirements are there Until we have a proper wheel, we can check with that if all deps are there. https://github.com/nanos/FediFetcher/issues/177 --- pkgs/tools/misc/fedifetcher/default.nix | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/misc/fedifetcher/default.nix b/pkgs/tools/misc/fedifetcher/default.nix index dc8e9bafe88e..d642dfe4d32b 100644 --- a/pkgs/tools/misc/fedifetcher/default.nix +++ b/pkgs/tools/misc/fedifetcher/default.nix @@ -1,4 +1,4 @@ -{ lib, fetchFromGitHub, python3 }: +{ lib, fetchFromGitHub, python3, stdenv }: python3.pkgs.buildPythonApplication rec { pname = "fedifetcher"; @@ -26,6 +26,14 @@ python3.pkgs.buildPythonApplication rec { runHook postInstall ''; + checkPhase = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' + runHook preCheck + + $out/bin/fedifetcher --help>/dev/null + + runHook postCheck + ''; + meta = with lib; { description = "A tool for Mastodon that automatically fetches missing replies and posts from other fediverse instances"; longDescription = ''