query
On this page

writeShellScript

pkgs.writeShellScript

Docs pulled from | This Revision | 10 minutes ago


or https://nixos.org/manual/nixpkgs/unstable/#trivial-builder-text-writing


Noogle detected

Implementation

The following is the current implementation of this function.

writeShellScript =
    name: text:
    writeTextFile {
      inherit name;
      executable = true;
      text = ''
        #!${runtimeShell}
        ${text}
      '';
      checkPhase = ''
        ${stdenv.shellDryRun} "$target"
      '';
    };