depot/pkgs/servers/headphones/default.nix
Luke Granger-Brown 57725ef3ec Squashed 'third_party/nixpkgs/' content from commit 76612b17c0ce
git-subtree-dir: third_party/nixpkgs
git-subtree-split: 76612b17c0ce71689921ca12d9ffdc9c23ce40b2
2024-11-10 23:59:47 +00:00

40 lines
991 B
Nix

{ lib, fetchFromGitHub, python3, makeWrapper }:
python3.pkgs.buildPythonApplication rec {
pname = "headphones";
version = "0.6.3";
format = "other";
src = fetchFromGitHub {
owner = "rembo10";
repo = "headphones";
rev = "v${version}";
sha256 = "195v0ylhqd49bqq3dpig5nh0kivmwgmn0977fknix9j14jpvmd3b";
};
dontBuild = true;
doCheck = false;
nativeBuildInputs = [ makeWrapper ];
installPhase = ''
runHook preInstall
mkdir -p $out/bin $out/opt/headphones
cp -R {data,headphones,lib,Headphones.py} $out/opt/headphones
echo v${version} > $out/opt/headphones/version.txt
makeWrapper $out/opt/headphones/Headphones.py $out/bin/headphones
runHook postInstall
'';
meta = with lib; {
description = "Automatic music downloader for SABnzbd";
license = licenses.gpl3Plus;
homepage = "https://github.com/rembo10/headphones";
maintainers = with lib.maintainers; [ rembo10 ];
mainProgram = "headphones";
};
}