What is the `patchShebangs` command in Nix build expressions?

I believe this is what nix pills tries to achieve to a large extent. Nix has surprising little included in it. Most of what we think of “nixpkgs” is actually the “nixpkgs repository”, which is why the starting point of almost all nix expressions is import <nixpkgs> {}, stdenv.mkDerivation, or something similar. For example, patchShebangs command is only available during the build if you source the setuphook provided by the stdenv default builder (you get this by default when using stdenv.mkDerivation).

1 Like