Why does gconf depends on Python2

I’m trying to investigate how can I contribute to the deprecation of Python2 packages in NixOS. I’m using nix-store --query --referrers /nix/store*python2* as my main tool.

I noticed that gconf depends on python2`:

nix-store --query --referrers /nix/store/496hlkwcniy4yi3nix0cps43a3ll2c11-python-2.7.17/
/nix/store/496hlkwcniy4yi3nix0cps43a3ll2c11-python-2.7.17
/nix/store/hs62ixn99hw9a9x480iflawg204f5801-gconf-3.2.6

But gconf calls python3:

The same is with git:

But:

$ nix-store --query --referrers /nix/store/0hk0wj90hbhp27gsqrn38v0jp0n66ri4-python-2.7.16/
/nix/store/0hk0wj90hbhp27gsqrn38v0jp0n66ri4-python-2.7.16
/nix/store/7nglxpv673q873hpiz81p3lsrd3bzvll-bear-2.4.2
/nix/store/xzzzaa0yai1gyydrjjsm3ni2cf1n7z48-git-2.23.0

You should investigate this with 20.03 where the actual cleanups of python2 have happened.
We made gconf not depend on python2 already gnome2.GConf: python2 -> python3 · NixOS/nixpkgs@a52749e · GitHub.

1 Like

@worldofpeace I’m using the unstable channel and since this commit is 2 months old, I’d expect it to be present in my current channels. A proof of that is the following:

$ head ~/.nix-defexpr/channels/nixpkgs/pkgs/desktops/gnome-2/platform/GConf/default.nix
{ stdenv, fetchurl, pkgconfig, dbus-glib, glib, ORBit2, libxml2, polkit, python3, intltool }:

stdenv.mkDerivation rec {
  pname = "gconf";
  version = "3.2.6";

  src = fetchurl {
    url = "mirror://gnome/sources/GConf/${stdenv.lib.versions.majorMinor version}/GConf-${version}.tar.xz";
    sha256 = "0k3q9nh53yhc9qxf1zaicz4sk8p3kzq4ndjdsgpaa2db0ccbj4hr";
  };

And likely:

$ head ~/.nix-defexpr/channels_root/nixos/pkgs/desktops/gnome-2/platform/GConf/default.nix
{ stdenv, fetchurl, pkgconfig, dbus-glib, glib, ORBit2, libxml2, polkit, python3, intltool }:

stdenv.mkDerivation rec {
  pname = "gconf";
  version = "3.2.6";

  src = fetchurl {
    url = "mirror://gnome/sources/GConf/${stdenv.lib.versions.majorMinor version}/GConf-${version}.tar.xz";
    sha256 = "0k3q9nh53yhc9qxf1zaicz4sk8p3kzq4ndjdsgpaa2db0ccbj4hr";
  };

Are you sure it is not just some 2 months+ old derivation? I see no such dependency:

$ nix-store --query --references $(nix-build --no-out-link -A gnome2.GConf.all)
/nix/store/8g1v3sf0xvf044sz1b4kcrg1i86z9bh7-glibc-2.30
/nix/store/bgdsblk9qmdr6v9qspa8mss6c3p4q99y-glib-2.62.4
/nix/store/5dasdi9wpcq8gzfyixhy7jiqkiwhlzzg-polkit-0.116
/nix/store/g20g00saxyssz0ka1xcmcm31bfq6iq31-python3-3.7.6
/nix/store/fvik8jjq1qpkwm2gnnjqfyppd69d78di-glib-2.62.4-dev
/nix/store/gl4m2c55n3kprasks8c0nj4rvxrbjr29-dbus-1.12.16-lib
/nix/store/y8w2dns3pwd7fdhlbh0vcjih3y0ssrlf-dbus-glib-0.110
/nix/store/6r7vqcx3vcj3g2kk79zznyjxpqlvfhx4-dbus-glib-0.110-dev
/nix/store/acnbaqf2yvqkidvyq1iypwi98yfmwcvy-ORBit2-2.14.19
/nix/store/p9v6d6141ymlp4n9hywp52sh3f1cy2ld-libxml2-2.9.10
/nix/store/6slsd5gfwrddvwpvj9qclrzqbsfny1ys-gconf-3.2.6
/nix/store/sxk0ya39adny7z0jjiw9lvalczv2akn6-gconf-3.2.6-dev

Confirmed. I’m waiting for a certain PR which will fix the build of my system - luaPackages.luv: cleanup build by doronbehar · Pull Request #80528 · NixOS/nixpkgs · GitHub - that’s why I’m stuck with that gconf.