2022-01-18 12:41:07 +01:00
|
|
|
{ lib, fetchFromGitHub, python3, makeWrapper }:
|
2018-09-16 21:47:47 +02:00
|
|
|
|
2022-01-18 12:41:07 +01:00
|
|
|
python3.pkgs.buildPythonApplication rec {
|
2020-03-29 12:34:50 +02:00
|
|
|
pname = "headphones";
|
2022-02-22 15:49:32 +01:00
|
|
|
version = "0.6.0-beta.5";
|
2018-09-16 21:47:47 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "rembo10";
|
|
|
|
repo = "headphones";
|
|
|
|
rev = "v${version}";
|
2022-02-22 15:49:32 +01:00
|
|
|
sha256 = "1ddqk5ch1dlh895cm99li4gb4a596mvq3d0gah9vrbn6fyhp3b4v";
|
2018-09-16 21:47:47 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
dontBuild = true;
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
installPhase = ''
|
2022-02-22 15:49:32 +01:00
|
|
|
runHook preInstall
|
|
|
|
|
2021-10-15 06:46:57 +02:00
|
|
|
mkdir -p $out/bin $out/opt/headphones
|
|
|
|
cp -R {data,headphones,lib,Headphones.py} $out/opt/headphones
|
2018-09-16 21:47:47 +02:00
|
|
|
|
2021-10-15 06:46:57 +02:00
|
|
|
echo v${version} > $out/opt/headphones/version.txt
|
|
|
|
|
|
|
|
makeWrapper $out/opt/headphones/Headphones.py $out/bin/headphones
|
2022-02-22 15:49:32 +01:00
|
|
|
|
|
|
|
runHook postInstall
|
2018-09-16 21:47:47 +02:00
|
|
|
'';
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2018-09-16 21:47:47 +02:00
|
|
|
description = "Automatic music downloader for SABnzbd";
|
2022-02-22 15:49:32 +01:00
|
|
|
license = licenses.gpl3Plus;
|
2019-07-02 06:12:25 +02:00
|
|
|
homepage = "https://github.com/rembo10/headphones";
|
2021-01-15 08:07:56 +01:00
|
|
|
maintainers = with lib.maintainers; [ rembo10 ];
|
2018-09-16 21:47:47 +02:00
|
|
|
};
|
|
|
|
}
|