From 6c1e1d053c1b38aa144061631d35fa5f10051f90 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 22 Sep 2024 12:54:16 +0200 Subject: [PATCH 1/3] onthespot: add async-timeout --- pkgs/by-name/on/onthespot/package.nix | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/pkgs/by-name/on/onthespot/package.nix b/pkgs/by-name/on/onthespot/package.nix index 696a7e51f78e..f1bdd48cf3ec 100644 --- a/pkgs/by-name/on/onthespot/package.nix +++ b/pkgs/by-name/on/onthespot/package.nix @@ -10,7 +10,7 @@ python3.pkgs.buildPythonApplication rec { pname = "onthespot"; version = "0.5"; - format = "pyproject"; + pyproject = true; src = fetchFromGitHub { owner = "casualsnek"; @@ -19,12 +19,23 @@ python3.pkgs.buildPythonApplication rec { hash = "sha256-VaJBNsT7uNOGY43GnzhUqDQNiPoFZcc2UaIfOKgkufg="; }; + pythonRemoveDeps = [ + "PyQt5-Qt5" + "PyQt5-stubs" + # Doesn't seem to be used in the sources and causes + # build issues + "PyOgg" + ]; + + pythonRelaxDeps = true; + nativeBuildInputs = with python3.pkgs; [ copyDesktopItems libsForQt5.wrapQtAppsHook ]; - propagatedBuildInputs = with python3.pkgs; [ + dependencies = with python3.pkgs; [ + async-timeout charset-normalizer defusedxml ffmpeg @@ -43,16 +54,6 @@ python3.pkgs.buildPythonApplication rec { zeroconf ]; - pythonRemoveDeps = [ - "PyQt5-Qt5" - "PyQt5-stubs" - # Doesn't seem to be used in the sources and causes - # build issues - "PyOgg" - ]; - - pythonRelaxDeps = true; - postInstall = '' install -Dm444 $src/src/onthespot/resources/icon.png $out/share/icons/hicolor/256x256/apps/onthespot.png ''; From 364a8c30fd18cfb89fe9f24d57e5d8a88ecbc03b Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 22 Sep 2024 12:55:09 +0200 Subject: [PATCH 2/3] onthespot: format with nixfmt --- pkgs/by-name/on/onthespot/package.nix | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/pkgs/by-name/on/onthespot/package.nix b/pkgs/by-name/on/onthespot/package.nix index f1bdd48cf3ec..52829c70ef39 100644 --- a/pkgs/by-name/on/onthespot/package.nix +++ b/pkgs/by-name/on/onthespot/package.nix @@ -1,10 +1,11 @@ -{ lib -, copyDesktopItems -, fetchFromGitHub -, makeDesktopItem -, python3 -, libsForQt5 -, ffmpeg +{ + lib, + copyDesktopItems, + fetchFromGitHub, + makeDesktopItem, + python3, + libsForQt5, + ffmpeg, }: python3.pkgs.buildPythonApplication rec { From aba7ee13a4de1754db714422f173825ada6d1e0e Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 23 Sep 2024 22:28:18 +0200 Subject: [PATCH 3/3] onthespot: remove with.lib --- pkgs/by-name/on/onthespot/package.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/by-name/on/onthespot/package.nix b/pkgs/by-name/on/onthespot/package.nix index 52829c70ef39..ebda24f08696 100644 --- a/pkgs/by-name/on/onthespot/package.nix +++ b/pkgs/by-name/on/onthespot/package.nix @@ -74,13 +74,13 @@ python3.pkgs.buildPythonApplication rec { }) ]; - meta = with lib; { + meta = { description = "QT based Spotify music downloader written in Python"; homepage = "https://github.com/casualsnek/onthespot"; changelog = "https://github.com/casualsnek/onthespot/releases/tag/v${version}"; - license = licenses.gpl2Only; - maintainers = with maintainers; [ onny ]; - platforms = platforms.linux; + license = lib.licenses.gpl2Only; + maintainers = with lib.maintainers; [ onny ]; + platforms = lib.platforms.linux; mainProgram = "onthespot_gui"; }; }