Skip to content

Conversation

@ysndr
Copy link
Member

@ysndr ysndr commented Mar 3, 2025

The perl package started depending on apple-sdk via references in lib/perl5/5.40.0/darwin-thread-multi-2level/Config_heavy.pl:

fd --type=file . /nix/store/cwlch1mxd40ayx8qy7hl8q2scrwgqhg6-perl-5.40.0/lib/ -X rg "/nix/store/lsjl29pwp5if71jfgxlv8fifsrpax805-apple-sdk-11.3" {}
/nix/store/cwlch1mxd40ayx8qy7hl8q2scrwgqhg6-perl-5.40.0/lib/perl5/5.40.0/darwin-thread-multi-2level/Config_heavy.pl
1039:incpth='/nix/store/j3dhkx4m14m38drh3f40bccrwrgzlsg5-libcxx-19.1.7-dev/include /nix/store/hklang3njvw0f5mgra9vsvn3c2zi2v45-compiler-rt-libc-19.1.7-dev/include /nix/store/g4qcalcnvm5n393xq8p9swxd8rc0xxzj-libxcrypt-4.4.38/include /nix/store/f4z2y0zn2bmrwywp67y3h21cmb6ky547-libiconv-109-dev/include /nix/store/17a9rq4bw8drbhlr3dijrmxzfqlz8z85-libresolv-83-dev/include /nix/store/34bb5prqghfl0hpindhk8xlc5s2q2xjg-libsbuf-14.1.0-dev/include /nix/store/vzi6s9yh1i12bkj9abyfp43y6x1fdzpl-cups-headers-2.4.11/include /no-such-path/resource-root/include /nix/store/lsjl29pwp5if71jfgxlv8fifsrpax805-apple-sdk-11.3/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include /no-such-path/include'
1087:libpth='/nix/store/g4qcalcnvm5n393xq8p9swxd8rc0xxzj-libxcrypt-4.4.38/lib /no-such-path/resource-root/lib /nix/store/lsjl29pwp5if71jfgxlv8fifsrpax805-apple-sdk-11.3/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib /no-such-path/lib'
1092:libspath=' /nix/store/g4qcalcnvm5n393xq8p9swxd8rc0xxzj-libxcrypt-4.4.38/lib /no-such-path/resource-root/lib /nix/store/lsjl29pwp5if71jfgxlv8fifsrpax805-apple-sdk-11.3/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib /no-such-path/lib'
1331:timeincl='/nix/store/lsjl29pwp5if71jfgxlv8fifsrpax805-apple-sdk-11.3/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/time.h '

This change increases the closure size of perl from ~115MiB to ~1.11GiB on darwin systems.

apple-sdk seems to be referenced via stdenv.cc.fallback_sdk. Following the exisitng pattern in
pkgs/development/interpreters/perl/interpreter.nix, that removes removes references to stdenv.cc and stdenv.cc.cc, this commit also removes the reference to
apple-sdk / stdenv.cc.fallback_sdk.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 25.05 Release Notes (or backporting 24.11 and 25.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@ysndr ysndr requested review from tomberek and uri-canva March 3, 2025 12:25
@nix-owners nix-owners bot requested review from marcusramberg, stigtsp and zakame March 3, 2025 12:26
@ysndr ysndr force-pushed the perl/reference-to-apple-sdk branch from af38d30 to a2183db Compare March 3, 2025 12:27
@ysndr ysndr changed the title perl: filter out refernce to apple-sdk package perl: filter out reference to apple-sdk package Mar 3, 2025
@github-actions github-actions bot added 10.rebuild-darwin: 5001+ This PR causes many rebuilds on Darwin and must target the staging branches. 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. labels Mar 3, 2025
@tomberek
Copy link
Contributor

tomberek commented Mar 3, 2025

Best to target the staging branch.

@ysndr ysndr force-pushed the perl/reference-to-apple-sdk branch from a2183db to f998509 Compare March 3, 2025 17:46
@ysndr ysndr changed the base branch from master to staging March 3, 2025 17:47
@wegank wegank added 12.approvals: 1 This PR was reviewed and approved by one person. 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in any of the changed packages. labels Mar 19, 2025
@wegank wegank added the 2.status: merge conflict This PR has merge conflicts with the target branch label Apr 7, 2025
@ysndr ysndr force-pushed the perl/reference-to-apple-sdk branch from f998509 to f3ebeb1 Compare April 18, 2025 14:55
@ofborg ofborg bot removed the 2.status: merge conflict This PR has merge conflicts with the target branch label Apr 18, 2025
The perl package started depending on `apple-sdk` via references in
`lib/perl5/5.40.0/darwin-thread-multi-2level/Config_heavy.pl`:

```
fd --type=file . /nix/store/cwlch1mxd40ayx8qy7hl8q2scrwgqhg6-perl-5.40.0/lib/ -X rg "/nix/store/lsjl29pwp5if71jfgxlv8fifsrpax805-apple-sdk-11.3" {}
/nix/store/cwlch1mxd40ayx8qy7hl8q2scrwgqhg6-perl-5.40.0/lib/perl5/5.40.0/darwin-thread-multi-2level/Config_heavy.pl
1039:incpth='/nix/store/j3dhkx4m14m38drh3f40bccrwrgzlsg5-libcxx-19.1.7-dev/include /nix/store/hklang3njvw0f5mgra9vsvn3c2zi2v45-compiler-rt-libc-19.1.7-dev/include /nix/store/g4qcalcnvm5n393xq8p9swxd8rc0xxzj-libxcrypt-4.4.38/include /nix/store/f4z2y0zn2bmrwywp67y3h21cmb6ky547-libiconv-109-dev/include /nix/store/17a9rq4bw8drbhlr3dijrmxzfqlz8z85-libresolv-83-dev/include /nix/store/34bb5prqghfl0hpindhk8xlc5s2q2xjg-libsbuf-14.1.0-dev/include /nix/store/vzi6s9yh1i12bkj9abyfp43y6x1fdzpl-cups-headers-2.4.11/include /no-such-path/resource-root/include /nix/store/lsjl29pwp5if71jfgxlv8fifsrpax805-apple-sdk-11.3/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include /no-such-path/include'
1087:libpth='/nix/store/g4qcalcnvm5n393xq8p9swxd8rc0xxzj-libxcrypt-4.4.38/lib /no-such-path/resource-root/lib /nix/store/lsjl29pwp5if71jfgxlv8fifsrpax805-apple-sdk-11.3/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib /no-such-path/lib'
1092:libspath=' /nix/store/g4qcalcnvm5n393xq8p9swxd8rc0xxzj-libxcrypt-4.4.38/lib /no-such-path/resource-root/lib /nix/store/lsjl29pwp5if71jfgxlv8fifsrpax805-apple-sdk-11.3/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib /no-such-path/lib'
1331:timeincl='/nix/store/lsjl29pwp5if71jfgxlv8fifsrpax805-apple-sdk-11.3/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/time.h '
```

This change increases the closure size of `perl` from ~115MiB to ~1.11GiB
on darwin systems.

`apple-sdk` seems to be referenced via `stdenv.cc.fallback_sdk`.
Following the exisitng pattern in
`pkgs/development/interpreters/perl/interpreter.nix`,
that removes removes references to `stdenv.cc` and `stdenv.cc.cc`,
this commit also removes the reference to
`apple-sdk` / `stdenv.cc.fallback_sdk`.
@ysndr ysndr force-pushed the perl/reference-to-apple-sdk branch from f3ebeb1 to 41d3086 Compare April 18, 2025 15:27
@tomberek tomberek merged commit 0fbbdaa into NixOS:staging Apr 18, 2025
23 of 27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 5001+ This PR causes many rebuilds on Darwin and must target the staging branches. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches. 12.approvals: 1 This PR was reviewed and approved by one person. 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in any of the changed packages.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants