From 4e7cf17a362bf2f52df12da152f88bf3c9719c6b Mon Sep 17 00:00:00 2001 From: Bobby Rong Date: Fri, 19 Jul 2024 23:28:25 +0800 Subject: [PATCH] python3.pkgs.python-xapp: Renamed from python3.pkgs.xapp * The upstream meson.build project name is python-xapp. * It is too common to require both the xapp and python-xapp in the same package and as a result too easy to result in wrong usages like the one mentioned in pull request 213561. --- pkgs/applications/misc/sticky/default.nix | 2 +- pkgs/applications/video/hypnotix/default.nix | 2 +- pkgs/by-name/wa/warpinator/package.nix | 2 +- pkgs/desktops/cinnamon/cinnamon-common/default.nix | 4 ++-- .../cinnamon/cinnamon-screensaver/default.nix | 2 +- pkgs/desktops/cinnamon/cinnamon-session/default.nix | 2 +- .../python-modules/{xapp => python-xapp}/default.nix | 2 +- pkgs/top-level/python-aliases.nix | 1 + pkgs/top-level/python-packages.nix | 12 ++++++------ 9 files changed, 15 insertions(+), 14 deletions(-) rename pkgs/development/python-modules/{xapp => python-xapp}/default.nix (97%) diff --git a/pkgs/applications/misc/sticky/default.nix b/pkgs/applications/misc/sticky/default.nix index 5d9cf3595782..ce97e13b3f65 100644 --- a/pkgs/applications/misc/sticky/default.nix +++ b/pkgs/applications/misc/sticky/default.nix @@ -47,7 +47,7 @@ stdenv.mkDerivation rec { pythonPath = with python3.pkgs; [ pygobject3 - xapp + python-xapp ]; dontWrapGApps = true; diff --git a/pkgs/applications/video/hypnotix/default.nix b/pkgs/applications/video/hypnotix/default.nix index 00f8eb6b024b..f9c5c2557f5c 100644 --- a/pkgs/applications/video/hypnotix/default.nix +++ b/pkgs/applications/video/hypnotix/default.nix @@ -61,7 +61,7 @@ stdenv.mkDerivation rec { requests setproctitle unidecode - xapp + python-xapp ]; installPhase = '' diff --git a/pkgs/by-name/wa/warpinator/package.nix b/pkgs/by-name/wa/warpinator/package.nix index c14d9778a716..848db3aca897 100644 --- a/pkgs/by-name/wa/warpinator/package.nix +++ b/pkgs/by-name/wa/warpinator/package.nix @@ -22,7 +22,7 @@ let protobuf pygobject3 setproctitle - pp.xapp + python-xapp zeroconf grpcio setuptools diff --git a/pkgs/desktops/cinnamon/cinnamon-common/default.nix b/pkgs/desktops/cinnamon/cinnamon-common/default.nix index c8bac7d9a85a..d7d3975bb1ef 100644 --- a/pkgs/desktops/cinnamon/cinnamon-common/default.nix +++ b/pkgs/desktops/cinnamon/cinnamon-common/default.nix @@ -58,7 +58,7 @@ let setproctitle pygobject3 pycairo - pp.xapp # don't omit `pp.`, see #213561 + python-xapp pillow pyinotify # for looking-glass pytz @@ -179,7 +179,7 @@ stdenv.mkDerivation rec { --prefix XDG_DATA_DIRS : "${gnome.caribou}/share" ) - buildPythonPath "$out ${python3.pkgs.xapp}" + buildPythonPath "$out ${python3.pkgs.python-xapp}" # https://github.com/NixOS/nixpkgs/issues/200397 patchPythonScript $out/bin/cinnamon-spice-updater diff --git a/pkgs/desktops/cinnamon/cinnamon-screensaver/default.nix b/pkgs/desktops/cinnamon/cinnamon-screensaver/default.nix index 7de42ca849a1..f4ba7a16413d 100644 --- a/pkgs/desktops/cinnamon/cinnamon-screensaver/default.nix +++ b/pkgs/desktops/cinnamon/cinnamon-screensaver/default.nix @@ -63,7 +63,7 @@ stdenv.mkDerivation rec { (python3.withPackages (pp: with pp; [ pygobject3 setproctitle - python3.pkgs.xapp # The scope prefix is required + python-xapp pycairo ])) xapp diff --git a/pkgs/desktops/cinnamon/cinnamon-session/default.nix b/pkgs/desktops/cinnamon/cinnamon-session/default.nix index 835e4af12b58..79dd3e555d83 100644 --- a/pkgs/desktops/cinnamon/cinnamon-session/default.nix +++ b/pkgs/desktops/cinnamon/cinnamon-session/default.nix @@ -25,7 +25,7 @@ let pythonEnv = python3.withPackages (pp: with pp; [ - pp.xapp # don't omit `pp.`, see #213561 + python-xapp pygobject3 setproctitle ]); diff --git a/pkgs/development/python-modules/xapp/default.nix b/pkgs/development/python-modules/python-xapp/default.nix similarity index 97% rename from pkgs/development/python-modules/xapp/default.nix rename to pkgs/development/python-modules/python-xapp/default.nix index 631857b89d5b..07e20921736a 100644 --- a/pkgs/development/python-modules/xapp/default.nix +++ b/pkgs/development/python-modules/python-xapp/default.nix @@ -15,7 +15,7 @@ }: buildPythonPackage rec { - pname = "xapp"; + pname = "python-xapp"; version = "2.4.2"; format = "other"; diff --git a/pkgs/top-level/python-aliases.nix b/pkgs/top-level/python-aliases.nix index dc4d8092cf32..6a9bd7130471 100644 --- a/pkgs/top-level/python-aliases.nix +++ b/pkgs/top-level/python-aliases.nix @@ -596,6 +596,7 @@ mapAliases ({ wxPython_4_2 = wxpython; # added 2024-01-07 WSME = wsme; # added 2023-02-19 x11_hash = x11-hash; # added 2023-11-05 + xapp = python-xapp; # added 2024-07-19 xenomapper = throw "xenomapper was moved to pkgs.xenomapper"; # added 2021-12-31 XlsxWriter = xlsxwriter; # added 2023-02-19 Yapsy = yapsy; # added 2023-02-19 diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index c0342015c5ae..436a7e9bf3a5 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -10396,6 +10396,12 @@ self: super: with self; { python-swiftclient = callPackage ../development/python-modules/python-swiftclient { }; + python-xapp = callPackage ../development/python-modules/python-xapp { + inherit (pkgs.buildPackages) meson; + inherit (pkgs) gtk3 gobject-introspection polkit; + inherit (pkgs.cinnamon) xapp; + }; + python-tado = callPackage ../development/python-modules/python-tado { }; python-idzip = callPackage ../development/python-modules/python-idzip { }; @@ -17357,12 +17363,6 @@ self: super: with self; { inherit (pkgs) xapian; }; - xapp = callPackage ../development/python-modules/xapp { - inherit (pkgs.buildPackages) meson; - inherit (pkgs) gtk3 gobject-introspection polkit; - inherit (pkgs.cinnamon) xapp; - }; - xarray = callPackage ../development/python-modules/xarray { }; xarray-dataclasses = callPackage ../development/python-modules/xarray-dataclasses { };