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

libindicator: Fix indicator path #79832

Closed
wants to merge 1 commit into from

Conversation

ilya-fedin
Copy link
Contributor

@ilya-fedin ilya-fedin commented Feb 11, 2020

Motivation for this change

Currently mate-indicator-applet doesn't find indicator-application, this commit fixes that

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • 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 nixpkgs-review --run "nixpkgs-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.

@worldofpeace
Copy link
Contributor

Same thing with the commit message at #79830 (comment).

@jtojnar
Copy link
Contributor

jtojnar commented Feb 11, 2020

How does this affect programs using the key for installation?

@ilya-fedin
Copy link
Contributor Author

@worldofpeace fixed
@jtojnar there are no such programs in nixpkgs repo, anyway, if they were, they would not build, since indicatorpath pointed to libdir, and it to the libindicator folder in /nix/store

Currently mate-indicator-applet doesn't find indicator-application, this commit fixes that
@jtojnar
Copy link
Contributor

jtojnar commented Feb 12, 2020

pkg-config actually supports installing relative to a package prefix, so a package would do

$ libdir=/nix/store/my-app/lib
$ nix-shell -p pkg-config libindicator --run "pkg-config indicator3-0.4 --define-variable=libdir='$libdir' --variable indicatordir"
/nix/store/my-app/lib/indicators3/7/

See https://www.bassi.io/articles/2018/03/15/pkg-config-and-paths/

If there are such packages, they would work before but not after this patch removed ${libdir} from the .pc file.

@ilya-fedin
Copy link
Contributor Author

If there are such packages, they would work before but not after this patch removed ${libdir} from the .pc file.

indicator-application-gtk3 and mate-indicator-applet are working. Which may not work?

@ilya-fedin
Copy link
Contributor Author

What's needed for this to be merged?

@jtojnar
Copy link
Contributor

jtojnar commented Aug 10, 2020

I do not like this method since it is inconsistent with how we use other foodir pkg-config variables. We typically use it for in-package target paths, not global installation paths – the projects that install stuff to foodir usually outnumber projects that try to read from there (though for ancient libs like this one either might be hard to come by).

For that reason, this should be handled in the individual consumers like mate-indicator-applet in my opinion.

@SuperSandro2000 SuperSandro2000 changed the title Fix indicator path for libindicator libindicator: Fix indicator path Jan 18, 2021
@@ -22,6 +22,8 @@ stdenv.mkDerivation rec {
postPatch = ''
substituteInPlace configure \
--replace 'LIBINDICATOR_LIBS+="$LIBM"' 'LIBINDICATOR_LIBS+=" $LIBM"'
substituteInPlace libindicator/indicator3-0.4.pc.in.in \
--replace 'indicatordir=''${libdir}' 'indicatordir=/run/current-system/sw/lib'
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
--replace 'indicatordir=''${libdir}' 'indicatordir=/run/current-system/sw/lib'��
--replace 'indicatordir=''${libdir}' 'indicatordir=/run/current-system/sw/lib'

@ilya-fedin ilya-fedin closed this Jan 18, 2021
@ilya-fedin ilya-fedin deleted the fix-indicator-path branch March 15, 2022 06:20
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