diff options
author | zowoq <59103226+zowoq@users.noreply.github.com> | 2020-08-09 17:47:12 +1000 |
---|---|---|
committer | zowoq <59103226+zowoq@users.noreply.github.com> | 2020-08-09 17:47:12 +1000 |
commit | 1439eaf07b6b8b146a5a323240db6875d71ab829 (patch) | |
tree | fadcb493c0d9774c62e368f576f97cadf1966110 /pkgs/build-support/rust | |
parent | debf9a3f0bda5477b8765b7c78e0e8393d7fb416 (diff) |
buildRustCrate: editorconfig fixes
Diffstat (limited to 'pkgs/build-support/rust')
4 files changed, 13 insertions, 13 deletions
diff --git a/pkgs/build-support/rust/build-rust-crate/build-crate.nix b/pkgs/build-support/rust/build-rust-crate/build-crate.nix index f82effdbca7ca..142109cef49ff 100644 --- a/pkgs/build-support/rust/build-rust-crate/build-crate.nix +++ b/pkgs/build-support/rust/build-rust-crate/build-crate.nix @@ -38,7 +38,7 @@ build_bin = if buildTests then "build_bin_test" else "build_bin"; in '' runHook preBuild - + # configure & source common build functions LIB_RUSTC_OPTS="${libRustcOpts}" BIN_RUSTC_OPTS="${binRustcOpts}" diff --git a/pkgs/build-support/rust/build-rust-crate/configure-crate.nix b/pkgs/build-support/rust/build-rust-crate/configure-crate.nix index 8e2f5f7f35e03..a95b356646e1b 100644 --- a/pkgs/build-support/rust/build-rust-crate/configure-crate.nix +++ b/pkgs/build-support/rust/build-rust-crate/configure-crate.nix @@ -43,7 +43,7 @@ in '' noisily cd "${workspace_member}" ''} ${lib.optionalString (workspace_member == null) '' - echo_colored "Searching for matching Cargo.toml (${crateName})" + echo_colored "Searching for matching Cargo.toml (${crateName})" local cargo_toml_dir=$(matching_cargo_toml_dir "${crateName}") if [ -z "$cargo_toml_dir" ]; then echo_error "ERROR configuring ${crateName}: No matching Cargo.toml in $(pwd) found." >&2 @@ -53,7 +53,7 @@ in '' ''} runHook preConfigure - + symlink_dependency() { # $1 is the nix-store path of a dependency # $2 is the target path diff --git a/pkgs/build-support/rust/build-rust-crate/lib.sh b/pkgs/build-support/rust/build-rust-crate/lib.sh index 3bf1992cecd84..d4927b025aa87 100644 --- a/pkgs/build-support/rust/build-rust-crate/lib.sh +++ b/pkgs/build-support/rust/build-rust-crate/lib.sh @@ -153,8 +153,8 @@ matching_cargo_toml_path() { # is referenced there. cargo metadata --no-deps --format-version 1 \ --manifest-path "$manifest_path" \ - | jq -r '.packages[] - | select( .name == "'$expected_crate_name'") + | jq -r '.packages[] + | select( .name == "'$expected_crate_name'") | .manifest_path' } @@ -171,4 +171,4 @@ matching_cargo_toml_dir() { break fi done -} \ No newline at end of file +} diff --git a/pkgs/build-support/rust/build-rust-crate/log.nix b/pkgs/build-support/rust/build-rust-crate/log.nix index a7e2cb4f46396..9054815f4a1bb 100644 --- a/pkgs/build-support/rust/build-rust-crate/log.nix +++ b/pkgs/build-support/rust/build-rust-crate/log.nix @@ -1,23 +1,23 @@ { lib }: let echo_colored_body = start_escape: - # Body of a function that behaves like "echo" but + # Body of a function that behaves like "echo" but # has the output colored by the given start_escape # sequence. E.g. # # * echo_x "Building ..." # * echo_x -n "Running " # - # This is more complicated than apparent at first sight + # This is more complicated than apparent at first sight # because: # * The color markers and the text must be print # in the same echo statement. Otherise, other - # intermingled text from concurrent builds will + # intermingled text from concurrent builds will # be colored as well. # * We need to preserve the trailing newline of the # echo if and only if it is present. Bash likes # to strip those if we capture the output of echo - # in a variable. + # in a variable. # * Leading "-" will be interpreted by test as an # option for itself. Therefore, we prefix it with # an x in `[[ "x$1" =~ ^x- ]]`. @@ -27,13 +27,13 @@ let echo_colored_body = start_escape: echo_args+=" $1" shift done - + local start_escape="$(printf '${start_escape}')" local reset="$(printf '\033[0m')" echo $echo_args $start_escape"$@"$reset ''; echo_conditional_colored_body = colors: start_escape: - if colors == "always" + if colors == "always" then (echo_colored_body start_escape) else ''echo "$@"''; in { @@ -50,7 +50,7 @@ in { noisily = colors: verbose: '' noisily() { ${lib.optionalString verbose '' - echo_colored -n "Running " + echo_colored -n "Running " echo $@ ''} $@ |