nur-packages/pkgs/by-name/be/betanin/package.nix
xeals 3ef84a6b8c
Some checks failed
CI / checks (nur) (push) Successful in 3m29s
CI / build-and-update (xeals, xeals) (push) Failing after 15m41s
betanin: 0.4.0 -> 0.5.6
2024-08-15 14:11:32 +10:00

74 lines
1.5 KiB
Nix

{ lib
, buildNpmPackage
, fetchFromGitHub
, python3
, beets
}:
let
version = "0.5.6";
src = fetchFromGitHub {
owner = "sentriz";
repo = "betanin";
rev = "v${version}";
hash = "sha256-8JzZfxXzey6vGwsnpXTea/gTMFwmeeavimn5njHIEg0=";
};
client = buildNpmPackage {
pname = "betanin_client";
inherit version src;
sourceRoot = "${src.name}/betanin_client";
npmDepsHash = "sha256-VkCQKpkDCTDejv8eRAN2Zfbq8TlWLdtqVJU3fo9hQrI=";
NODE_OPTIONS = "--openssl-legacy-provider";
};
in
python3.pkgs.buildPythonApplication {
pname = "betanin";
inherit version src;
format = "pyproject";
patches = [ ./paths.patch ];
postPatch = ''
export clientDistDir="${client}/lib/node_modules/betanin/dist/"
export libPrefix="${python3.libPrefix}"
substituteAllInPlace betanin/paths.py
'';
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
];
meta = {
homepage = "https://github.com/sentriz/betanin";
description = "beets based mitm of your torrent client and music player";
license = lib.licenses.gpl3Only;
maintainers = [ ];
platforms = lib.platforms.linux;
};
}