query
On this page

writeShellScriptBin

pkgs.writeShellScriptBin

Docs pulled from | This Revision | 8 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.

writeShellScriptBin = name: text:
    writeTextFile {
      inherit name;
      executable = true;
      destination = "/bin/${name}";
      text = ''
        #!${runtimeShell}
        ${text}
      '';
      checkPhase = ''
        ${stdenv.shellDryRun} "$target"
      '';
      meta.mainProgram = name;
    };