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

gts: propagate glib #68084

Merged
merged 1 commit into from Dec 28, 2019
Merged

gts: propagate glib #68084

merged 1 commit into from Dec 28, 2019

Conversation

lopsided98
Copy link
Contributor

Motivation for this change

GTS's pkgconfig file contains the following line:

Requires: glib-2.0,gthread-2.0,gmodule-2.0

This causes some build systems (at least CMake, I'm not sure about autotools) to require glib to be available when depending on gts. Rather than manually adding a dependency on glib alongside each usage of gts, I thought it might be a good idea to propagate glib. This problem with this is that now gts has a reference to glib.dev, slightly increasing its closure size. I'm not sure if there are any other packages in nixpkgs that have dealt with this issue.

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 nix-review --run "nix-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)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
Notify maintainers

cc @viric

@lopsided98
Copy link
Contributor Author

I noticed that some packages (https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/compilers/openjdk/8.nix#L225) manually add a propagated build input to a non-default output. I wonder if we should try to add a dev output to gts that propagates glib.

@lopsided98
Copy link
Contributor Author

I enabled multiple outputs and it looks like that does what is needed automatically without any closure size issues. gts.dev now propagates glib.dev.

I had to add autoreconfHook because the included configure script is too old to understand --docdir.

Copy link
Contributor

@jtojnar jtojnar left a comment

Choose a reason for hiding this comment

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

Did not verify the preconditions but this is the correct solution for them. Thanks.

@jtojnar jtojnar merged commit 59b0ab2 into NixOS:master Dec 28, 2019
@jtojnar
Copy link
Contributor

jtojnar commented Dec 28, 2019

Thanks, and sorry it took so long to merge.

@lopsided98 lopsided98 deleted the gts-propagate-glib branch December 28, 2019 19:41
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

2 participants