Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ibus-with-plugins: fix ibus-setup #31458

Closed
wants to merge 1 commit into from
Closed

Conversation

cstrahan
Copy link
Contributor

This makes ibus-daemon find ibus-setup through a env var,
so we can continue to leave Python out of the ibus closure.

Motivation for this change

Fixes: #31454, #30265

Related to: #31094

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

This makes ibus-daemon find ibus-setup through a env var,
so we can continue to leave Python out of the ibus closure.
@cstrahan
Copy link
Contributor Author

I would recommend merging this first, and then #31094 can be rebased on top later. The scope of this PR is much smaller, and certainly uncontroversial.

@orivej
Copy link
Contributor

orivej commented Nov 10, 2017

If you want to avoid patching, you can just write exec $NIX_IBUS_SETUP_PATH into the original ibus-setup.

For the record, I have discovered that ibus-setup is only referenced by libexec/ibus-ui-gtk3, which is only referenced by share/ibus/component/gtkpanel.xml, which is only referenced by its directory in IBUS_COMPONENT_PATH, which is a colon separated list of directories; but I was not able to use this information to simplify the solution.

@lukateras
Copy link
Member

lukateras commented Nov 10, 2017

I disagree with this approach. I think python3.buildEnv should be patched so that it doesn't pull in dev paths. By itself pygobject3 or python3 don't do that:

$ nix-build '<nixpkgs>' -A python3Packages.pygobject3
/nix/store/7mdkm7j6kn18zsadkv6g0j2cpwxg8v5r-python3.6-pygobject-3.24.1
$ nix-store --query --requisites result
/nix/store/mjx71lmnlf4psm9942djjcd8b56hyk8b-glibc-2.26-75
/nix/store/43h1b33sickcv3d4gsm0ypsngza06x5l-pcre-8.41
/nix/store/nb8114h6xhkcf0l8jc42hr5fcqay908g-libffi-3.2.1
/nix/store/qz2lprii3jxy0wybggj4h3304ij7m56p-zlib-1.2.11
/nix/store/vly150v5s6l5y4pvh8lw2z09wq4syj1s-util-linux-2.31
/nix/store/0cgwsihhxi6vzix5vdchrvj8m4qzb3r1-glib-2.54.1
/nix/store/q87ni9psb36rh7as0xmw8r4i5sabg2iy-libXdmcp-1.1.2
/nix/store/x406s840qhnrckrphzqnzmkjacwqdinr-libXau-1.0.8
/nix/store/vmqni292w8yb9ds6bcadq7ym1n06pixs-libxcb-1.12
/nix/store/7kk1999bpav8lp097g671dxpjzcaxfqw-libX11-1.6.5
/nix/store/410gjj0q962wbwy0ynchgx6ds1kwp1cv-libXfixes-5.0.2
/nix/store/a83mwdh3xla231kjk1w475awzyk1yhfq-libpng-apng-1.6.34
/nix/store/vbcyvh7rlbmpp85pssmcx4r8nn883dqa-bzip2-1.0.6.0.1
/nix/store/6b12yg3y7dbak7k99fxkz3n0fzaz0r0g-freetype-2.7.1
/nix/store/lwqfv7k2c227d29xjb81dk6lq8h0h0ry-libXext-1.3.3
/nix/store/8nzbr0k8dwvnjac2wili08im3il1rl05-libXxf86vm-1.1.4
/nix/store/8gn2b5vvlazg608cj1y5l4igp9rckmnq-dejavu-fonts-minimal-2.37
/nix/store/jrasy4ivdfs0z117wra3l3ylwgkc5aaz-expat-2.2.5
/nix/store/aaj5jf73ac4jwv885djxrs4drqkv0jhx-fontconfig-2.12.1-lib
/nix/store/c9pv9kl83134gspxmy6dbq41r1kzksbh-libxshmfence-1.2
/nix/store/imlh65g6gxcj4b9fni46pvzwmpr9czx2-libxml2-2.9.5
/nix/store/ck57nbay428qi5dx3r0fr2paqnxh9jci-wayland-1.12.0
/nix/store/hlhvvc6ghc8l0bwk6rs8grzs6rxdm4fn-libXrender-0.9.10
/nix/store/rbc04km5yfbjwrsn9mzsw1bybmg43s9v-libXdamage-1.1.4
/nix/store/xdqb5gzl5gr9vdi1xshnk53yligpals2-libpciaccess-0.13.5
/nix/store/vvng84xliafz3iwzxbm7cf17niwp00zp-libdrm-2.4.84
/nix/store/q353py5mrssppbfzpamm2n4n79w4l984-mesa-noglu-17.2.4
/nix/store/swi9n1azsvv36bsbpm98pn87zlsm6vi6-pixman-0.34.0
/nix/store/gy1cj8n212pgx400f34615z1cdy1krji-cairo-1.14.10
/nix/store/yiixwpqlnxxisx64q9jb043049751qbp-gobject-introspection-1.54.1
/nix/store/7mdkm7j6kn18zsadkv6g0j2cpwxg8v5r-python3.6-pygobject-3.24.1
$ nix-build '<nixpkgs>' -A python3
/nix/store/166s7l3yjqfc8dj5hfqjb09dbfvp1850-python3-3.6.3
$ nix-store --query --requisites result
/nix/store/mjx71lmnlf4psm9942djjcd8b56hyk8b-glibc-2.26-75
/nix/store/cqjq489nydhz27rjlrhcxx9bizwxr56j-attr-2.4.47
/nix/store/szf0cpzndm3ic2vh344sr024r19jdxx1-acl-2.2.52
/nix/store/0abay33zgwqgchdzzq6h88ac4963smwf-coreutils-8.28
/nix/store/4ada72n7785wwazv42fhsnxjvilaa3aj-bash-4.4-p12
/nix/store/5fcpyi3vlxbgllb4dnxrqydyfy2f7s8v-gdbm-1.13
/nix/store/az10kjba9f71m2kr39wcgqyv9klz347w-xz-5.2.3
/nix/store/gn56m9xpwk33xxrp8xrj2jr6d57jspic-ncurses-6.0-20170902
/nix/store/jrasy4ivdfs0z117wra3l3ylwgkc5aaz-expat-2.2.5
/nix/store/mlmwnxqd5p75lnwdmnw6i5vrh4fhfh2p-openssl-1.0.2m
/nix/store/nb8114h6xhkcf0l8jc42hr5fcqay908g-libffi-3.2.1
/nix/store/qz2lprii3jxy0wybggj4h3304ij7m56p-zlib-1.2.11
/nix/store/vbcyvh7rlbmpp85pssmcx4r8nn883dqa-bzip2-1.0.6.0.1
/nix/store/z90s4radpf90mdmmaw9ld33rs371rdgf-sqlite-3.21.0
/nix/store/zmjhihhfb9kxmb55zr3qw949mljfy2l1-readline-6.3p08
/nix/store/166s7l3yjqfc8dj5hfqjb09dbfvp1850-python3-3.6.3

Compare it with combination of the two:

$ nix-build -E "with import <nixpkgs> {}; python3.withPackages (pypkgs: [ pypkgs.pygobject3 ])"
/nix/store/y1qf0lrimj66f60bvjgl6dyhb6j3z7fa-python3-3.6.3-env
$ nix-store --query --requisites result
/nix/store/mjx71lmnlf4psm9942djjcd8b56hyk8b-glibc-2.26-75
/nix/store/cqjq489nydhz27rjlrhcxx9bizwxr56j-attr-2.4.47
/nix/store/szf0cpzndm3ic2vh344sr024r19jdxx1-acl-2.2.52
/nix/store/0abay33zgwqgchdzzq6h88ac4963smwf-coreutils-8.28
/nix/store/43h1b33sickcv3d4gsm0ypsngza06x5l-pcre-8.41
/nix/store/nb8114h6xhkcf0l8jc42hr5fcqay908g-libffi-3.2.1
/nix/store/qz2lprii3jxy0wybggj4h3304ij7m56p-zlib-1.2.11
/nix/store/vly150v5s6l5y4pvh8lw2z09wq4syj1s-util-linux-2.31
/nix/store/0cgwsihhxi6vzix5vdchrvj8m4qzb3r1-glib-2.54.1
/nix/store/q87ni9psb36rh7as0xmw8r4i5sabg2iy-libXdmcp-1.1.2
/nix/store/x406s840qhnrckrphzqnzmkjacwqdinr-libXau-1.0.8
/nix/store/vmqni292w8yb9ds6bcadq7ym1n06pixs-libxcb-1.12
/nix/store/11ad0c2n77dai79lcffchb9rhksz6pr6-libxcb-1.12-dev
/nix/store/4ada72n7785wwazv42fhsnxjvilaa3aj-bash-4.4-p12
/nix/store/5fcpyi3vlxbgllb4dnxrqydyfy2f7s8v-gdbm-1.13
/nix/store/az10kjba9f71m2kr39wcgqyv9klz347w-xz-5.2.3
/nix/store/gn56m9xpwk33xxrp8xrj2jr6d57jspic-ncurses-6.0-20170902
/nix/store/jrasy4ivdfs0z117wra3l3ylwgkc5aaz-expat-2.2.5
/nix/store/mlmwnxqd5p75lnwdmnw6i5vrh4fhfh2p-openssl-1.0.2m
/nix/store/vbcyvh7rlbmpp85pssmcx4r8nn883dqa-bzip2-1.0.6.0.1
/nix/store/z90s4radpf90mdmmaw9ld33rs371rdgf-sqlite-3.21.0
/nix/store/zmjhihhfb9kxmb55zr3qw949mljfy2l1-readline-6.3p08
/nix/store/166s7l3yjqfc8dj5hfqjb09dbfvp1850-python3-3.6.3
/nix/store/1bkj4si57gq4hc9dmjkg5x41df04y3s2-python-recursive-pth-loader-1.0
/nix/store/1hmqll2jczwx0sksbd42qr08kvv8ys9g-zlib-1.2.11-dev
/nix/store/7kk1999bpav8lp097g671dxpjzcaxfqw-libX11-1.6.5
/nix/store/hgijsiad743s2l19xiy6fxqma0ijsmkj-kbproto-1.0.7
/nix/store/iblha6d8cp08viywimcx43w6pn23grqm-xproto-7.0.31
/nix/store/7gzm3aaj5iiw29gcpplja3f6xqcwbk5b-libX11-1.6.5-dev
/nix/store/hlhvvc6ghc8l0bwk6rs8grzs6rxdm4fn-libXrender-0.9.10
/nix/store/nr59rlg0hcfabczaw30v3jlfxcamhd9v-renderproto-0.11.1
/nix/store/3mg0l6aqmbr9id1pg6zlq2kaws0n2z4y-libXrender-0.9.10-dev
/nix/store/3q48k4j5m95gsmnaajxmgr80rw6f4aij-xcb-util-0.4.0
/nix/store/410gjj0q962wbwy0ynchgx6ds1kwp1cv-libXfixes-5.0.2
/nix/store/6v0xs0p5yh2gb0aybcp6w1ygx1gv5gan-xextproto-7.3.0
/nix/store/fy6ffqgh7y4dpffrgwn68fac04db3myz-fixesproto-5.0
/nix/store/djfk2dxl7igbz9fkh00d1jdn2wvfhhd6-libXfixes-5.0.2-dev
/nix/store/rbc04km5yfbjwrsn9mzsw1bybmg43s9v-libXdamage-1.1.4
/nix/store/wkf7gill1s92wkgygqjfd6jpgsy6mcgp-damageproto-1.2.1
/nix/store/3sffl7z3kwd5g4xjhhn03qfrlz0hc4yj-libXdamage-1.1.4-dev
/nix/store/7vqbmwjv8acb3afqvd9bip13xh6f12ps-glibc-2.26-75-bin
/nix/store/ilhkswnnncfz49lrzkfd9sglp3amik06-linux-headers-4.4.10
/nix/store/xd2mlzvlgmskbyyb33lz2vdq15k74xpr-glibc-2.26-75-dev
/nix/store/796cdc13vzh79c101j9x34llyxk0f93w-glibc-iconv-2.26-75
/nix/store/d5lcw25l1xkdaj034hm2gxn64acb50rk-libelf-0.8.13
/nix/store/ni3s4gas1c95aqkkr67pla6k66chkmb8-gcc-6.4.0-lib
/nix/store/xzn1wijp8kk9r6nhcjrhlamdz6i9caar-db-5.3.28
/nix/store/f6pmgza1hha574hm76p98mc2s6gsn3y8-python-2.7.14
/nix/store/ivm3ba9dzw26yggkxlfkxlbly67f35jk-libffi-3.2.1-dev
/nix/store/5bglj2xcnyh54c6jp13mcyrdg2cgc0nq-glib-2.54.1-dev
/nix/store/a83mwdh3xla231kjk1w475awzyk1yhfq-libpng-apng-1.6.34
/nix/store/6b12yg3y7dbak7k99fxkz3n0fzaz0r0g-freetype-2.7.1
/nix/store/7fgr4zvsvyh9p3cqlfkp10z1b2gf2c0z-libXau-1.0.8-dev
/nix/store/lwqfv7k2c227d29xjb81dk6lq8h0h0ry-libXext-1.3.3
/nix/store/8nzbr0k8dwvnjac2wili08im3il1rl05-libXxf86vm-1.1.4
/nix/store/8gn2b5vvlazg608cj1y5l4igp9rckmnq-dejavu-fonts-minimal-2.37
/nix/store/aaj5jf73ac4jwv885djxrs4drqkv0jhx-fontconfig-2.12.1-lib
/nix/store/c9pv9kl83134gspxmy6dbq41r1kzksbh-libxshmfence-1.2
/nix/store/imlh65g6gxcj4b9fni46pvzwmpr9czx2-libxml2-2.9.5
/nix/store/ck57nbay428qi5dx3r0fr2paqnxh9jci-wayland-1.12.0
/nix/store/xdqb5gzl5gr9vdi1xshnk53yligpals2-libpciaccess-0.13.5
/nix/store/vvng84xliafz3iwzxbm7cf17niwp00zp-libdrm-2.4.84
/nix/store/q353py5mrssppbfzpamm2n4n79w4l984-mesa-noglu-17.2.4
/nix/store/swi9n1azsvv36bsbpm98pn87zlsm6vi6-pixman-0.34.0
/nix/store/gy1cj8n212pgx400f34615z1cdy1krji-cairo-1.14.10
/nix/store/yiixwpqlnxxisx64q9jb043049751qbp-gobject-introspection-1.54.1
/nix/store/7mdkm7j6kn18zsadkv6g0j2cpwxg8v5r-python3.6-pygobject-3.24.1
/nix/store/hq27hydp4jnwa0kbccim6ghbd9l6h6q8-python3.6-setuptools-36.6.0
/nix/store/9mhnpcnpp5jmyl80hglmgc9x9zm704fp-python3.6-pycairo-1.10.0
/nix/store/b5kfr19m10awkxi142xazp34pn3hhl4s-expat-2.2.5-dev
/nix/store/fw1ixc551hm7mvpfxcmlzr6y1x3ck2hv-bzip2-1.0.6.0.1-bin
/nix/store/c087577vmkxnzkk3ji3py7n6l9w3l42w-bzip2-1.0.6.0.1-dev
/nix/store/fj9p7myqdr22vkph4m7hbkfrbiksid4s-xcb-util-0.4.0-dev
/nix/store/n9nvbbalvrinp18ainacfdp4r6jl9zd3-libpng-apng-1.6.34-dev
/nix/store/g9r5acpb8z02rl2hrdc48ydn8wdkzk6z-freetype-2.7.1-dev
/nix/store/jaxxc67570yj9kr8dn2bx0zvy5y79xk3-xf86vidmodeproto-2.3.1
/nix/store/k0hkkr6il7h06ls98rqh0kal7gv1vm5n-fontconfig-2.12.1-bin
/nix/store/m4lywa5djs7xj0n3drv3988g27p5ray9-libXext-1.3.3-dev
/nix/store/nvband7p2g72y72bdzs1r4q9bpb4kcsw-fontconfig-2.12.1
/nix/store/pn26pqdk3s7iabxvj9ng07na0mj5w4yj-libXxf86vm-1.1.4-dev
/nix/store/s22z47andfnqb2yra50jpd83pyi6a1i0-libdrm-2.4.84-bin
/nix/store/qbs560giab9zz57m28rcdfyp4apph0hq-libdrm-2.4.84-dev
/nix/store/ws7qwskb077jwsv4nvmjv1bp6ffi8nsq-mesa-noglu-17.2.4-dev
/nix/store/yb52jrxbgj2k9q4dqpa0lr0dl7bwpxyd-fontconfig-2.12.1-dev
/nix/store/w8nlr59a4ky4sd7m8fzld6bk1fq2376c-cairo-1.14.10-dev
/nix/store/y1qf0lrimj66f60bvjgl6dyhb6j3z7fa-python3-3.6.3-env

The problem is not that Python 3 is pulled into system closure, it's already likely there. The problem is that python3.buildEnv specifically causes dev paths to be pulled in.

@cstrahan
Copy link
Contributor Author

cstrahan commented Nov 10, 2017

@yegortimoshenko

The problem is not that Python 3 is pulled into system closure, it's already likely there. The problem is that python3.buildEnv specifically causes dev paths to be pulled in.

Ah, from @edolstra's original commit message (in af44f99), it looks like you're correct:

ibus: Move ibus-setup to .dev
This removes python3.buildEnv from the runtime closure.

Gimme a sec to see what you're closure looks like...

@cstrahan cstrahan closed this Nov 10, 2017
@cstrahan
Copy link
Contributor Author

cstrahan commented Nov 10, 2017

Whoops. I had some half-baked comment that I started composing a long while ago, and then I tried to close the comment (if that makes sense), but... my blood sugar is low so I ended clicking the "Comment and Close" button.

Oh well.

I'll leave this closed any ways, as #31094 is coming along nicely.

I should go eat something.

@lukateras
Copy link
Member

@cstrahan It's OK! I send half-baked comments (and open half-baked PRs) all the time :-)

Enjoy your meal! 🍜

@lukateras lukateras mentioned this pull request Nov 10, 2017
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants