nixpkgs/pkgs/by-name/on/onthespot/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

87 lines
1.8 KiB
Nix
Raw Permalink Normal View History

2024-09-22 10:55:09 +00:00
{
lib,
copyDesktopItems,
fetchFromGitHub,
makeDesktopItem,
python3,
libsForQt5,
ffmpeg,
2023-07-26 07:54:18 +00:00
}:
python3.pkgs.buildPythonApplication rec {
pname = "onthespot";
version = "0.5";
2024-09-22 10:54:16 +00:00
pyproject = true;
2023-07-26 07:54:18 +00:00
src = fetchFromGitHub {
owner = "casualsnek";
repo = "onthespot";
rev = "refs/tags/v${version}";
2023-07-26 07:54:18 +00:00
hash = "sha256-VaJBNsT7uNOGY43GnzhUqDQNiPoFZcc2UaIfOKgkufg=";
};
2024-09-22 10:54:16 +00:00
pythonRemoveDeps = [
"PyQt5-Qt5"
"PyQt5-stubs"
# Doesn't seem to be used in the sources and causes
# build issues
"PyOgg"
];
pythonRelaxDeps = true;
2023-07-26 07:54:18 +00:00
nativeBuildInputs = with python3.pkgs; [
copyDesktopItems
2024-03-28 13:37:44 +00:00
libsForQt5.wrapQtAppsHook
2023-07-26 07:54:18 +00:00
];
2024-09-22 10:54:16 +00:00
dependencies = with python3.pkgs; [
async-timeout
2023-07-26 07:54:18 +00:00
charset-normalizer
defusedxml
2024-06-10 00:33:57 +00:00
ffmpeg
2023-07-26 07:54:18 +00:00
librespot
music-tag
packaging
pillow
protobuf
pyqt5
pyqt5-sip
2023-07-26 07:54:18 +00:00
pyxdg
requests
setuptools
show-in-file-manager
urllib3
zeroconf
];
2024-06-10 00:33:57 +00:00
postInstall = ''
install -Dm444 $src/src/onthespot/resources/icon.png $out/share/icons/hicolor/256x256/apps/onthespot.png
'';
2023-07-26 07:54:18 +00:00
preFixup = ''
makeWrapperArgs+=("''${qtWrapperArgs[@]}")
'';
2024-06-10 00:33:57 +00:00
desktopItems = [
(makeDesktopItem {
name = "Onthespot";
exec = "onthespot_gui";
icon = "onthespot";
desktopName = "Onthespot";
comment = meta.description;
categories = [ "Audio" ];
})
];
2024-09-23 20:28:18 +00:00
meta = {
2024-06-10 00:33:57 +00:00
description = "QT based Spotify music downloader written in Python";
2023-07-26 07:54:18 +00:00
homepage = "https://github.com/casualsnek/onthespot";
changelog = "https://github.com/casualsnek/onthespot/releases/tag/v${version}";
2024-09-23 20:28:18 +00:00
license = lib.licenses.gpl2Only;
maintainers = with lib.maintainers; [ onny ];
platforms = lib.platforms.linux;
2024-06-10 00:33:57 +00:00
mainProgram = "onthespot_gui";
2023-07-26 07:54:18 +00:00
};
}