nur-packages/pkgs/by-name/be/betanin/package.nix

74 lines
1.5 KiB
Nix
Raw Normal View History

2023-09-27 13:58:41 +10:00
{ lib
2024-08-15 14:05:42 +10:00
, buildNpmPackage
2023-09-27 13:58:41 +10:00
, fetchFromGitHub
, python3
, beets
}:
let
2024-08-15 14:05:42 +10:00
version = "0.5.6";
2023-09-27 13:58:41 +10:00
src = fetchFromGitHub {
2024-08-15 14:05:42 +10:00
owner = "sentriz";
2023-09-27 13:58:41 +10:00
repo = "betanin";
2024-08-15 14:05:42 +10:00
rev = "v${version}";
hash = "sha256-8JzZfxXzey6vGwsnpXTea/gTMFwmeeavimn5njHIEg0=";
2023-09-27 13:58:41 +10:00
};
2024-08-15 14:05:42 +10:00
client = buildNpmPackage {
pname = "betanin_client";
inherit version src;
sourceRoot = "${src.name}/betanin_client";
npmDepsHash = "sha256-VkCQKpkDCTDejv8eRAN2Zfbq8TlWLdtqVJU3fo9hQrI=";
NODE_OPTIONS = "--openssl-legacy-provider";
2023-09-27 13:58:41 +10:00
};
in
2024-08-15 14:05:42 +10:00
python3.pkgs.buildPythonApplication {
2023-09-27 13:58:41 +10:00
pname = "betanin";
inherit version src;
2024-08-15 14:05:42 +10:00
format = "pyproject";
2023-09-27 13:58:41 +10:00
patches = [ ./paths.patch ];
postPatch = ''
2024-08-15 14:05:42 +10:00
export clientDistDir="${client}/lib/node_modules/betanin/dist/"
2023-09-27 13:58:41 +10:00
export libPrefix="${python3.libPrefix}"
substituteAllInPlace betanin/paths.py
'';
2024-08-15 14:05:42 +10:00
buildInputs = with python3.pkgs; [ setuptools ];
propagatedBuildInputs = (with python3.pkgs; [
apprise
alembic
click
flask
flask-cors
flask-jwt-extended
flask_migrate
flask-restx
flask-socketio
flask-sqlalchemy
gevent
pyxdg
loguru
ptyprocess
python-engineio
python-socketio
sqlalchemy
sqlalchemy-utils
toml
]) ++ [
beets
];
2023-09-27 13:58:41 +10:00
meta = {
homepage = "https://github.com/sentriz/betanin";
description = "beets based mitm of your torrent client and music player";
license = lib.licenses.gpl3Only;
maintainers = [ ];
2024-08-15 14:05:42 +10:00
platforms = lib.platforms.linux;
2023-09-27 13:58:41 +10:00
};
}