**Observations** `lib.callPackageWith` doesn't bring `pkgs.xorg` the way regular `pkgs.callPackage` does. https://github.com/NixOS/nixpkgs/blob/42cd7da40a9c88dd0ec2ea4f2682093f54c6c41a/lib/customisation.nix#L259-L324 https://github.com/NixOS/nixpkgs/blob/42cd7da40a9c88dd0ec2ea4f2682093f54c6c41a/pkgs/top-level/splice.nix#L142-L160 Since `pkgs.callPackage` is just `pkgs.newScope { }`: https://github.com/NixOS/nixpkgs/blob/42cd7da40a9c88dd0ec2ea4f2682093f54c6c41a/pkgs/top-level/splice.nix#L170 we should be recommending `pkgs.newScope` as a less unwieldy method that properly preserves the `pkgs.callPackage` behavior. **Problem** <!-- Given what you're observing, what's the problem? --> **Approaches** <!-- Do you know of any potential solutions? If so, list them here. --> **Willing to help?** <!-- Are you willing to help make the change? --> **Priorities** Add :+1: to [issues you find important](https://github.com/NixOS/nix.dev/issues?q=is%3Aissue+is%3Aopen+sort%3Areactions-%2B1-desc).
Observations
lib.callPackageWithdoesn't bringpkgs.xorgthe way regularpkgs.callPackagedoes.https://github.com/NixOS/nixpkgs/blob/42cd7da40a9c88dd0ec2ea4f2682093f54c6c41a/lib/customisation.nix#L259-L324
https://github.com/NixOS/nixpkgs/blob/42cd7da40a9c88dd0ec2ea4f2682093f54c6c41a/pkgs/top-level/splice.nix#L142-L160
Since
pkgs.callPackageis justpkgs.newScope { }:https://github.com/NixOS/nixpkgs/blob/42cd7da40a9c88dd0ec2ea4f2682093f54c6c41a/pkgs/top-level/splice.nix#L170
we should be recommending
pkgs.newScopeas a less unwieldy method that properly preserves thepkgs.callPackagebehavior.Problem
Approaches
Willing to help?
Priorities
Add 👍 to issues you find important.