Transpiling typescript in a derivation

I’m currently working on building a derivation for the Pop_OS! Shell (it’s still a WIP in upstream).

This software uses typescript, and it must be transpiled to javascript in order to be installed on gnome.

I cannot figure out how I am supposed to add tsc in the nativeBuildInputs of this derivation, and I would love to have some hints on how I could manage to this ?

Thank you very much !

Found it in nodePackages.typescript but I’m not sure why it is not shown in nix search typescript.

tsc is part of nodePackages.typescript.

It is marked to prevent recursing into the attributes:

https://github.com/NixOS/nixpkgs/blob/f13d9f2704cdd5ee49cf80f6514f5baf9eb9f2ac/pkgs/top-level/all-packages.nix#L4602

Didn’t know this existed, thank you !

That is actually the default behaviour. dontRecurseIntoAttrs is just an identity function created to contrast with recurseIntoAttrs:

Edit: Since https://github.com/NixOS/nixpkgs/commit/fc64cf65abfd6f42910a639f7ffb996788a95797, it is not an identity any more.