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

lightdm_gtk_greeter: fix configureFlags to not be one long string #57560

Merged

Conversation

dtzWill
Copy link
Member

@dtzWill dtzWill commented Mar 13, 2019

Motivation for this change

For whatever reason, setting configureFlagsArray causes
the configure invocation to escape spaces between parameters:

configure flags: --disable-static --disable-dependency-tracking --prefix=/nix/store/4bn8dsr743dp0g5j020jf8why5hkld3p-lightdm-gtk-greeter-2.0.6 --localstatedir=/var\ --sysconfdir=/etc\ --disable-indicator-services-command\ --enable-at-spi-command=/nix/store/li9bsxl8qja8qw0pa70xd572gw5hqsdm-at-spi2-core-2.30.1/libexec/at-spi-bus-launcher\ \ --launch-immediately

This actually doesn't break the build (!) but it does break
lightdm pretty badly for me and it's not hard to imagine why :).

Instead, use configureFlags as normal but just append the command
in preConfigure directly, so we can preserve the space.

cc @worldofpeace

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • 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/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

For whatever reason, setting `configureFlagsArray` causes
the configure invocation to escape spaces between parameters:

configure flags: --disable-static --disable-dependency-tracking --prefix=/nix/store/4bn8dsr743dp0g5j020jf8why5hkld3p-lightdm-gtk-greeter-2.0.6 --localstatedir=/var\ --sysconfdir=/etc\ --disable-indicator-services-command\ --enable-at-spi-command=/nix/store/li9bsxl8qja8qw0pa70xd572gw5hqsdm-at-spi2-core-2.30.1/libexec/at-spi-bus-launcher\ \ --launch-immediately

This actually doesn't break the build (!) but it does break
lightdm pretty badly for me and it's not hard to imagine why :).

Instead, use configureFlags as normal but just append the command
in `preConfigure` directly, so we can preserve the space.
] ++ stdenv.lib.optional useGTK2 "--with-gtk2";

preConfigure = ''
configureFlagsArray+=( --enable-at-spi-command="${at-spi2-core}/libexec/at-spi-bus-launcher --launch-immediately" )
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

*facepalm

What I probably meant to do

@worldofpeace
Copy link
Contributor

I'm pretty confused as to how I ran the tests locally and they worked.

Copy link
Contributor

@worldofpeace worldofpeace left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ran a test in a vm and it looked good.

Verified that configureFlags looked appropriate

@dtzWill
Copy link
Member Author

dtzWill commented Mar 13, 2019

No worries, thanks for testing and I'm sure there's an explanation but I'm not sure it's worth chasing down ;). Glad this does the job, all good :)

@dtzWill dtzWill merged commit 88cd06d into NixOS:master Mar 13, 2019
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

3 participants