From 250ac961c138aa67757a20d517f8d0c9a99b49d1 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Fri, 22 Nov 2024 00:26:44 +0100 Subject: [PATCH 1/3] nagstamon: move to by-name Co-authored-by: liberodark --- .../default.nix => by-name/na/nagstamon/package.nix} | 8 ++++---- pkgs/top-level/all-packages.nix | 4 ---- 2 files changed, 4 insertions(+), 8 deletions(-) rename pkgs/{tools/misc/nagstamon/default.nix => by-name/na/nagstamon/package.nix} (73%) diff --git a/pkgs/tools/misc/nagstamon/default.nix b/pkgs/by-name/na/nagstamon/package.nix similarity index 73% rename from pkgs/tools/misc/nagstamon/default.nix rename to pkgs/by-name/na/nagstamon/package.nix index f004ad9b42fdd..9dfe9ac9067e5 100644 --- a/pkgs/tools/misc/nagstamon/default.nix +++ b/pkgs/by-name/na/nagstamon/package.nix @@ -1,6 +1,6 @@ -{ lib, fetchurl, pythonPackages }: +{ lib, fetchurl, python3Packages }: -pythonPackages.buildPythonApplication rec { +python3Packages.buildPythonApplication rec { pname = "nagstamon"; version = "3.14.0"; @@ -12,8 +12,8 @@ pythonPackages.buildPythonApplication rec { # Test assumes darwin doCheck = false; - build-system = with pythonPackages; [ setuptools ]; - dependencies = with pythonPackages; [ configparser pyqt6 psutil requests + build-system = with python3Packages; [ setuptools ]; + dependencies = with python3Packages; [ configparser pyqt6 psutil requests beautifulsoup4 keyring requests-kerberos lxml dbus-python python-dateutil pysocks ]; meta = with lib; { diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 4bd94a5606516..e8bb70705d8f6 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4258,10 +4258,6 @@ with pkgs; mx-puppet-discord = callPackage ../servers/mx-puppet-discord { }; - nagstamon = callPackage ../tools/misc/nagstamon { - pythonPackages = python3Packages; - }; - nanoemoji = with python3Packages; toPythonApplication nanoemoji; nbtscanner = callPackage ../tools/security/nbtscanner { From 697286bf4dd701fb2e55ac51251f9561c6b8cbf2 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Fri, 22 Nov 2024 00:28:31 +0100 Subject: [PATCH 2/3] nagstamon: format Co-authored-by: liberodark --- pkgs/by-name/na/nagstamon/package.nix | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/pkgs/by-name/na/nagstamon/package.nix b/pkgs/by-name/na/nagstamon/package.nix index 9dfe9ac9067e5..f09082bdd197a 100644 --- a/pkgs/by-name/na/nagstamon/package.nix +++ b/pkgs/by-name/na/nagstamon/package.nix @@ -1,4 +1,8 @@ -{ lib, fetchurl, python3Packages }: +{ + lib, + fetchurl, + python3Packages, +}: python3Packages.buildPythonApplication rec { pname = "nagstamon"; @@ -13,13 +17,27 @@ python3Packages.buildPythonApplication rec { doCheck = false; build-system = with python3Packages; [ setuptools ]; - dependencies = with python3Packages; [ configparser pyqt6 psutil requests - beautifulsoup4 keyring requests-kerberos lxml dbus-python python-dateutil pysocks ]; + dependencies = with python3Packages; [ + configparser + pyqt6 + psutil + requests + beautifulsoup4 + keyring + requests-kerberos + lxml + dbus-python + python-dateutil + pysocks + ]; meta = with lib; { description = "Status monitor for the desktop"; homepage = "https://nagstamon.de/"; license = licenses.gpl2Plus; - maintainers = with maintainers; [ pSub liberodark ]; + maintainers = with maintainers; [ + pSub + liberodark + ]; }; } From a848fde40e15114c70c9d2a5e97d94e4fa4605ef Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Fri, 22 Nov 2024 00:31:11 +0100 Subject: [PATCH 3/3] nagstamon: 3.14.0 -> 3.16.2 Co-authored-by: liberodark Diff: https://github.com/HenriWahl/Nagstamon/compare/v3.14.0...v3.16.2 Changelog: https://github.com/HenriWahl/Nagstamon/releases/tag/v3.16.2 --- pkgs/by-name/na/nagstamon/package.nix | 60 +++++++++++++++++++-------- 1 file changed, 42 insertions(+), 18 deletions(-) diff --git a/pkgs/by-name/na/nagstamon/package.nix b/pkgs/by-name/na/nagstamon/package.nix index f09082bdd197a..f25d5e4d68a58 100644 --- a/pkgs/by-name/na/nagstamon/package.nix +++ b/pkgs/by-name/na/nagstamon/package.nix @@ -1,43 +1,67 @@ { lib, - fetchurl, + fetchFromGitHub, python3Packages, + qt6Packages, }: python3Packages.buildPythonApplication rec { pname = "nagstamon"; - version = "3.14.0"; + version = "3.16.2"; - src = fetchurl { - url = "https://github.com/HenriWahl/Nagstamon/archive/refs/tags/v${version}.tar.gz"; - sha256 = "sha256-9RxQ/rfvoyjSUsY4tmAkBdVQqZYi3X6PBzQYFIeenzA="; + src = fetchFromGitHub { + owner = "HenriWahl"; + repo = "Nagstamon"; + rev = "refs/tags/v${version}"; + hash = "sha256-9w8ux+AeSg0vDhnk28/2eCE2zYLvAjD7mB0pJBMFs2I="; }; - # Test assumes darwin - doCheck = false; - build-system = with python3Packages; [ setuptools ]; + + nativeBuildInputs = [ qt6Packages.wrapQtAppsHook ]; + + buildInputs = [ + qt6Packages.qtmultimedia + qt6Packages.qtsvg + ]; + + dontWrapQtApps = true; + + preFixup = '' + makeWrapperArgs+=("''${qtWrapperArgs[@]}") + ''; + dependencies = with python3Packages; [ - configparser - pyqt6 - psutil - requests + arrow beautifulsoup4 + configparser + dbus-python keyring - requests-kerberos lxml - dbus-python - python-dateutil + psutil + pyqt6 pysocks + python-dateutil + requests + requests-kerberos + ]; + + nativeCheckInputs = with python3Packages; [ + pylint + pytestCheckHook ]; - meta = with lib; { + meta = { description = "Status monitor for the desktop"; homepage = "https://nagstamon.de/"; - license = licenses.gpl2Plus; - maintainers = with maintainers; [ + changelog = "https://github.com/HenriWahl/Nagstamon/releases/tag/v${version}"; + license = lib.licenses.gpl2Plus; + maintainers = with lib.maintainers; [ pSub liberodark ]; + mainProgram = "nagstamon.py"; + # NameError: name 'bdist_rpm_options' is not defined. Did you mean: 'bdist_mac_options'? + badPlatforms = [ lib.systems.inspect.patterns.isDarwin ]; }; }