$ nix-store -q --references $(nix-build '<nixpkgs>' -A mpvScripts.mpris)
Which lists gcc.
The project has this Makefile (no autotools / autoconf / cmake involved):
Does anybody see right away from the Makefile why is it referencing gcc? Help will be appreciated.
You can use
nix why-depends to find which file pulls it in.
Thanks, I didn’t know about this command. But, in this case, there’s only 1 file and that’s
$out which is the same as
So naturally I’d expect this to be the only one that references it.
$ nix why-depends nixpkgs.mpvScripts.mpris nixpkgs.gcc-unwrapped
After reading NixOS - Nix Pills, I’m thinking that perhaps this:
shrinking RPATHs of ELF executables and libraries in /nix/store/vpjygfwbm23sld6b8dkas1cczbii53m1-mpv-mpris-0.4.so
strip is /nix/store/3b3ighb83nhifa1v4n7855hlbdl1mhf9-binutils-2.31.1/bin/strip
patching script interpreter paths in /nix/store/vpjygfwbm23sld6b8dkas1cczbii53m1-mpv-mpris-0.4.so
checking for references to /build/ in /nix/store/vpjygfwbm23sld6b8dkas1cczbii53m1-mpv-mpris-0.4.so...
Doesn’t remove the reference to gcc because
$out is a file and not a directory?
EDIT: Answer: No that’s not it - even with a different
installPhase that installs mpris.so to a directory it references gcc.
Found it: We don’t run
strip on the output file.
@jtojnar do you happen to know whether the standard fixup phases in Nixpkgs should run
strip? Now that I see that, I remember I noticed
strip is not used also for executables built with
buildGoModule - I mean,
file result/bin/* says
Stripping happens as
and it is only done for files in directories that can be expected to contain elf files:
But strip just removes debugging symbols, I am not sure if that would contain GCC reference.
No idea about
buildGoModule, perhaps they set
Awesome :). Thanks for the references.
I just tried to use
stripAllList like this:
stripAllList = [ "$out" ];
But I think this doesn’t work if
$out is a file and not a directory, per:
Hence, I’ll guess I’ll have to rewrite a bit that mpv plugins system to overcome that…