nixpkgs/pkgs/by-name/fe/fedifetcher/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

52 lines
1.3 KiB
Nix

{ lib, fetchFromGitHub, python3, stdenv }:
python3.pkgs.buildPythonApplication rec {
pname = "fedifetcher";
version = "7.1.12";
format = "other";
src = fetchFromGitHub {
owner = "nanos";
repo = "FediFetcher";
rev = "refs/tags/v${version}";
hash = "sha256-DWex4pZV9ZVR1bqYcOpTe74ZQCQCQQxjWrv0QgtRY40=";
};
propagatedBuildInputs = with python3.pkgs; [
defusedxml
python-dateutil
requests
xxhash
];
installPhase = ''
runHook preInstall
install -vD find_posts.py $out/bin/fedifetcher
runHook postInstall
'';
checkPhase = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
runHook preCheck
$out/bin/fedifetcher --help>/dev/null
runHook postCheck
'';
meta = with lib; {
description = "Tool for Mastodon that automatically fetches missing replies and posts from other fediverse instances";
longDescription = ''
FediFetcher is a tool for Mastodon that automatically fetches missing
replies and posts from other fediverse instances, and adds them to your
own Mastodon instance.
'';
homepage = "https://blog.thms.uk/fedifetcher";
changelog = "https://github.com/nanos/FediFetcher/releases/tag/v${version}";
license = licenses.mit;
maintainers = teams.c3d2.members;
mainProgram = "fedifetcher";
};
}