From aa122cbae78ce97d60c0c98ba14df753d97e40b1 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Sun, 30 Jan 2022 19:06:58 +0300 Subject: style: format entire depot with nixpkgs-fmt This CL can be used to compare the style of nixpkgs-fmt against other formatters (nixpkgs, alejandra). Change-Id: I87c6abff6bcb546b02ead15ad0405f81e01b6d9e Reviewed-on: https://cl.tvl.fyi/c/depot/+/4397 Tested-by: BuildkiteCI Reviewed-by: sterni Reviewed-by: lukegb Reviewed-by: wpcarro Reviewed-by: Profpatsch Reviewed-by: kanepyork Reviewed-by: tazjin Reviewed-by: cynthia Reviewed-by: edef Reviewed-by: eta Reviewed-by: grfn --- nix/writeExecline/default.nix | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'nix/writeExecline') diff --git a/nix/writeExecline/default.nix b/nix/writeExecline/default.nix index 8626aa46080f..5169b01386ea 100644 --- a/nix/writeExecline/default.nix +++ b/nix/writeExecline/default.nix @@ -14,9 +14,10 @@ name: # "env": don’t substitute, set # and 0…n environment vaariables, where n=$# # "none": don’t substitute or set any positional arguments # "env-no-push": like "env", but bypass the push-phase. Not recommended. - argMode ? "var", - # Number of arguments to be substituted as variables (passed to "var"/"-s" or "var-full"/"-S" - readNArgs ? 0, + argMode ? "var" +, # Number of arguments to be substituted as variables (passed to "var"/"-s" or "var-full"/"-S" + readNArgs ? 0 +, }: # Nested list of lists of commands. # Inner lists are translated to execline blocks. @@ -24,7 +25,7 @@ argList: let env = - if argMode == "var" then "s${toString readNArgs}" + if argMode == "var" then "s${toString readNArgs}" else if argMode == "var-full" then "S${toString readNArgs}" else if argMode == "env" then "" else if argMode == "none" then "P" @@ -32,7 +33,7 @@ let else abort ''"${toString argMode}" is not a valid argMode, use one of "var", "var-full", "env", "none", "env-no-push".''; in - depot.nix.writeScript name '' - #!${pkgs.execline}/bin/execlineb -W${env} - ${depot.nix.escapeExecline argList} - '' +depot.nix.writeScript name '' + #!${pkgs.execline}/bin/execlineb -W${env} + ${depot.nix.escapeExecline argList} +'' -- cgit 1.4.1