Gst_all_1.gstreamer packages does not install gst-launch-1.0, etc

Hi, I am relatively new to NixOS and am having some trouble with gstreamer. I installed gstreamer via

nix-env -iA gst_all_1.gstreamer

I expected this to give me access to the gst-launch-1.0 command; however, this is not the case.
When investigating I found a ‘/nix/store/*-gstreamer-1.16.2-dev/bin’ was were the executables were placed, but this does not get included in the path.

Do I need to do something to use packages that end with “-dev”?
I also found a packages, but it links to the same .drv file. What is this?

I tried searching for documentation on outputs with “-dev” or “.dev” packages but couldn’t find much of anything. I initially used the stable channel but had the same issue so I am currently running the unstable channel. I am on amd64 hardware running NixOS.

If someone could point me towards what I need to get the gstreamer applications working it would be greatly appreciated.

If you want the gst-launch-1.0 the executable exists in

nix-env -iA # the .dev is a different package output

and that’s why you’ve found traces of this program at a path like gstreamer-1.16.2-dev/bin, the gstreamer package is a split package. It a similar concept to how like development headers can exists in different packages in debian.

I figured this out with a tool called nix-locate

❯ nix-locate bin/gst-launch-1.0                                               ~
(wineStaging.out)                                   406 x /nix/store/p2dccbybqlzsbm8wgxg8aqj74pqc8w4y-gstreamer-1.16.0-dev/bin/gst-launch-1.0                             406 x /nix/store/2p9ki5pl8apf0k762qy9apbdd2sj85x5-gstreamer-1.16.0-dev/bin/gst-launch-1.0

You may be also wondering this:
“Why is it that when I install gst_all_1.gstreamer it’s not a package with the binary I wanted?”.
This is because how the outputs are configured in the gstreamer package.

See the following snippet from the gstreamer expression

outputs = [ "out" "dev" "devdoc" ];
outputBin = "dev";

the first string in the attribute outputs is what will be installed default when you do nix-env -iA gst_all_1.gstreamer, so out. But there’s an attribute outputBin = "dev", this means the output where the binaries (bin) are located is not the default install-able output out but dev.

This is explained in depth in NixOS - Nixpkgs 21.05 manual and NixOS - Nixpkgs 21.05 manual.

1 Like

Thanks for your detailed response. However, I tried installing with

nix-env -iA

but the gst-launch-1.0 executable was still not available. I was still able to track it down in the nix store though. I also installed nix-index and it agrees with you that it should be in, any Ideas?

On the other hand, your explanation was very helpful. I had found those sections of the docs but was struggling to connect it to the nix expressions for gstreamer. Thanks.