Skip to content

Packages from nodePackages_latest don't result in executables in $PATH. #145432

@seanparsons

Description

@seanparsons

Describe the bug

A shell including packages from nodePackages_latest like yarn or pnpm don't result in executables on the path the way nodePackages does.

Steps To Reproduce

Steps to reproduce the behavior:

  1. Run nix-shell -p nodePackages_latest.yarn --run "yarn --version"

Expected behavior

I would expect to see the version number of yarn instead of /tmp/nix-shell-433770-0/rc: line 1: yarn: command not found.

Additional context

This works find if nix-shell -p nodePackages.yarn --run "yarn --version" is run instead.

I stumbled on this earlier but I'm not entirely certain if it's related: #142915

Notify maintainers

Apologies @marsam if you're not the most appropriate person to pull into this!

Metadata

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 5.10.76, NixOS, 21.05.3990.372e59d2af7 (Okapi)`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.3.16`
 - channels(root): `"nixos-21.05.3990.372e59d2af7, nixos-hardware"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

Maintainer information:

# a list of nixpkgs attributes affected by the problem
attribute:
# a list of nixos modules affected by the problem
module:

Metadata

Metadata

Assignees

No one assigned

    Labels

    0.kind: bugSomething is broken6.topic: nodejsNode.js is a free, open-source, cross-platform JavaScript runtime environment

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions