nixpkgs/pkgs/by-name/py/pyrosimple/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

69 lines
1.4 KiB
Nix

{ lib
, stdenv
, fetchFromGitHub
, nix-update-script
, pyrosimple
, python3
, testers
, withInotify ? stdenv.hostPlatform.isLinux
}:
python3.pkgs.buildPythonApplication rec {
pname = "pyrosimple";
version = "2.14.0";
format = "pyproject";
src = fetchFromGitHub {
owner = "kannibalox";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-lEtyt7i8MyL2VffxNFQkL9RkmGeo6Nof0AOQwf6BUSE=";
};
pythonRelaxDeps = [
"prometheus-client"
"python-daemon"
];
nativeBuildInputs = with python3.pkgs; [
poetry-core
];
propagatedBuildInputs = with python3.pkgs; [
bencode-py
apscheduler
jinja2
python-daemon
importlib-resources
parsimonious
prometheus-client
prompt-toolkit
requests
shtab
python-box
tomli-w
] ++ lib.optionals (pythonOlder "3.11") [
tomli
] ++ lib.optional withInotify inotify;
nativeCheckInputs = with python3.pkgs; [
pytestCheckHook
];
passthru = {
updateScript = nix-update-script { };
tests = testers.testVersion {
package = pyrosimple;
command = "pyroadmin --version";
};
};
meta = with lib; {
description = "RTorrent client";
homepage = "https://kannibalox.github.io/pyrosimple/";
changelog = "https://github.com/kannibalox/pyrosimple/blob/v${version}/CHANGELOG.md";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ ne9z vamega ];
};
}