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

Unbreak finding gstreamer plugins in $NIX_PROFILES #20207

Merged
merged 2 commits into from Nov 6, 2016

Conversation

bjornfor
Copy link
Contributor

@bjornfor bjornfor commented Nov 6, 2016

Motivation for this change

Making gst-launch and friends find plugins is a generally useful thing. It used to work but got broken with the multiple-outputs change. This PR fixes it.

Also lower the priority on plugins found in $NIX_PROFILES by using --suffix instead of --prefix. This is the saner priority setting IMHO.

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
    • macOS
    • Linux
  • 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.

gst-launch and friends are in the "dev" output now.
Suffix the plugin paths from $NIX_PROFILES instead of prefixing them to
$GST_PLUGIN_SYSTEM_PATH. If a program has specifically set up its plugin
path to some custom/specific version, we don't want plugins from
$NIX_PROFILES to mess things up by having higher priority.
@mention-bot
Copy link

@bjornfor, thanks for your PR! By analyzing the history of the files in this pull request, we identified @ttuegel, @vcunat and @dezgeg to be potential reviewers.

@vcunat
Copy link
Member

vcunat commented Nov 6, 2016

Maybe a separate .bin output would be useful, as .dev won't be installed into standard environments by default.

@bjornfor
Copy link
Contributor Author

bjornfor commented Nov 6, 2016

@dezgeg added the outputBin = "dev" change. Perhaps there was a good reason for using dev instead of bin? @dezgeg, do you expect any breakage if we remove outputBin = "dev" and change --exec-prefix from $dev to $bin?

@vcunat
Copy link
Member

vcunat commented Nov 6, 2016

He just refactored and fixed some issues; it was @ttuegel who split gstreamer and started moving binaries to $dev 6a64edf.

@vcunat
Copy link
Member

vcunat commented Nov 6, 2016

Note that the derivation has no $bin ATM.

@ttuegel
Copy link
Member

ttuegel commented Nov 6, 2016

I put the binaries in $dev because their intended audience seems to be developers working on GStreamer-based applications. If they are useful to end-users, then we should move them into $bin.

As for finding plugins in $NIX_PROFILES: do we want the binaries to find plugins there when the library will not? That might make debugging other applications more difficult for users.

@bjornfor
Copy link
Contributor Author

bjornfor commented Nov 6, 2016

@ttuegel: Good point. But I don't know when I'll have time to move the lookup from the binaries to the libraries. (It's not high priority for me.)

How about merging this now and improve things more later?

@bjornfor
Copy link
Contributor Author

bjornfor commented Nov 6, 2016

I think we should merge as is, so we can backport to stable without risk.

@vcunat vcunat merged commit b1df5bf into NixOS:master Nov 6, 2016
vcunat pushed a commit that referenced this pull request Nov 6, 2016
* gstreamer-1.0: make gst-launch find plugins again

gst-launch and friends are in the "dev" output now.

* gstreamer-1.0: lower priority on plugins from $NIX_PROFILES

Suffix the plugin paths from $NIX_PROFILES instead of prefixing them to
$GST_PLUGIN_SYSTEM_PATH. If a program has specifically set up its plugin
path to some custom/specific version, we don't want plugins from
$NIX_PROFILES to mess things up by having higher priority.

(cherry picked from commit b1df5bf)
It seems very unlikely to break anything.
@vcunat
Copy link
Member

vcunat commented Nov 6, 2016

OK, picked to 16.09 as well. Still, multiple outputs generally behave differently than intended due to the default nix version not containing some relatively old patches #19761 (comment). When/if that gets fixed, people will no longer get the $dev outputs in environments by default...

@bjornfor bjornfor deleted the unbreak-gstreamer-plugins branch November 8, 2016 22:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants