nix-community / dream2nix

Simplified nix packaging for various programming language ecosystems [maintainer=@DavHau]
https://dream2nix.dev
MIT License
990 stars 122 forks source link

current `dontStrip = true` default causes some python packages to hold on to GCC as a runtime dependency #988

Open abathur opened 3 months ago

abathur commented 3 months ago

Just opening this to document trouble I had in case it helps someone save a few days of flailing--I don't have enough perspective on what kinds of problems were caused by stripping to understand which default is ideal.

Hodgepodge of observations in case they make this more searchable:

Since I extracted a minimal reproducible example in the process of figuring this out, I'll include links in case they help (ignore the repo name, I added it on top of a repro for a different problem I had):

abathur commented 3 months ago

It's a tangent, but one bit of this does still puzzle me if anyone knows what's missing from my mental model.

When I do something like nix run github:nixos/nixpkgs#nix-tree -- --dot .#blah | grep misaka I'll see:

...
  "python3.9-misaka-2.1.1" -> "gcc-13.2.0" [];
  "python3.9-misaka-2.1.1" -> "glibc-2.39-31" [];
  "python3.9-misaka-2.1.1" -> "python3.9-cffi-1.16.0" [];
  "python3.9-misaka-2.1.1" -> "bash-5.2p26" [];
  "python3.9-misaka-2.1.1" -> "python3.9-cffi-1.16.0" [];
  "python3.9-misaka-2.1.1" -> "python3.9-pycparser-2.22" [];
  "python3.9-misaka-2.1.1" -> "glibc-2.39-31-dev" [];
  "python3.9-misaka-2.1.1" -> "python3-3.9.19" [];
...

But then if I just do, say, nix run github:nixos/nixpkgs#nix-tree -- --dot .#prod.pyEnv.pkgs.misaka | grep misaka l only see:

  "python3.9-misaka-2.1.1" -> "glibc-2.39-31" [];
  "python3.9-misaka-2.1.1" -> "python3.9-cffi-1.16.0" [];
  "python3.9-misaka-2.1.1" -> "bash-5.2p26" [];
  "python3.9-misaka-2.1.1" -> "python3.9-pycparser-2.22" [];
  "python3.9-misaka-2.1.1" -> "python3-3.9.19" [];

Anyone know why the latter doesn't indicate the same dependency on GCC as the former?