nixpkgs/pkgs/build-support
Greg Pfeil 58eb3d3806 mkshell: refactor Bash snippet
I’ve been using https://github.com/Fuuzetsu/shellcheck-nix-attributes on most of
my derivations, and attaching it to one derived from `mkShell` resulted in

```
shellcheck_buildPhase

In /nix/store/8774inwznc87dwhac90winc9b5k6gmkb-nix-shell_shellcheck_buildPhase line 1:
echo "------------------------------------------------------------" >>$out
^-- SC2129 (style): Consider using { cmd1; cmd2; } >> file instead of individual redirects.
                                                                      ^--^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean:
echo "------------------------------------------------------------" >>"$out"

In /nix/store/8774inwznc87dwhac90winc9b5k6gmkb-nix-shell_shellcheck_buildPhase line 2:
echo " WARNING: the existence of this path is not guaranteed." >>$out
                                                                 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean:
echo " WARNING: the existence of this path is not guaranteed." >>"$out"

In /nix/store/8774inwznc87dwhac90winc9b5k6gmkb-nix-shell_shellcheck_buildPhase line 3:
echo " It is an internal implementation detail for pkgs.mkShell."   >>$out
                                                                      ^--^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean:
echo " It is an internal implementation detail for pkgs.mkShell."   >>"$out"

In /nix/store/8774inwznc87dwhac90winc9b5k6gmkb-nix-shell_shellcheck_buildPhase line 4:
echo "------------------------------------------------------------" >>$out
                                                                      ^--^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean:
echo "------------------------------------------------------------" >>"$out"

In /nix/store/8774inwznc87dwhac90winc9b5k6gmkb-nix-shell_shellcheck_buildPhase line 5:
echo >> $out
        ^--^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean:
echo >> "$out"

In /nix/store/8774inwznc87dwhac90winc9b5k6gmkb-nix-shell_shellcheck_buildPhase line 7:
export >> $out
          ^--^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean:
export >> "$out"

For more information:
  https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ...
  https://www.shellcheck.net/wiki/SC2129 -- Consider using { cmd1; cmd2; } >>...
```
——— https://garnix.io/build/qgxbameB

This addresses the shellcheck complaints.
2022-12-07 01:25:48 +01:00
..
add-opengl-runpath
agda
alternatives
appimage Merge pull request #203598 from symphorien/appimage-owd 2022-12-02 20:12:49 +00:00
bintools-wrapper build-support: Use equivalent valid exit code 2022-11-29 19:11:45 +13:00
build-bazel-package buildBazelPackage: optionally run bazel tests in checkPhase 2022-10-03 12:52:57 +02:00
build-fhs-userenv
build-fhs-userenv-bubblewrap FHSEnv: export /etc/shells 2022-10-18 22:59:26 -07:00
build-graalvm-native-image buildGraalvmNativeImage: allow LC_ALL overrides 2022-07-03 18:16:38 +01:00
build-setupcfg
buildenv
cc-wrapper cc-wrapper: fix path to libcxx includes for cross compilers 2022-11-30 18:46:16 +01:00
coq coqPackages.mkCoqDerivation: upgrade to Dune 3 2022-10-02 14:42:28 +02:00
dhall
docker dockerTools: fix nginx test 2022-11-30 15:23:43 +10:00
dotnet buildDotnetModule: generate a NuGet.config with source 2022-11-25 18:50:44 +01:00
emacs emacs: remove warning of xargs when doing AOT native-comp 2022-10-04 02:53:55 +08:00
expand-response-params treewide: add enableParallelBuilding's to bootstrap packages so hashes stay the same 2022-05-25 16:03:14 +03:00
fake-nss fake-nss: Add support for extra passwd and group lines 2022-10-04 00:05:34 +02:00
fetchbitbucket
fetchbower
fetchbzr
fetchcvs treewide: fix bash exit handlers 2022-07-02 16:13:12 +02:00
fetchdarcs
fetchdocker
fetchfirefoxaddon testers.invalidateFetcherByDrvHash: Move from top-level 2022-05-05 12:08:50 +02:00
fetchfossil
fetchgit fetchgit: make sparseCheckout a list of strings 2022-11-15 19:45:33 +01:00
fetchgitea
fetchgithub treewide: make sparseCheckout a list of strings 2022-11-15 19:46:12 +01:00
fetchgitiles
fetchgitlab fetchFromGitLab: don't passthruAttrs fetchGit specific attrs to fetchUrl 2022-10-29 19:12:07 +03:00
fetchgitlocal
fetchgx
fetchhg
fetchipfs
fetchmavenartifact
fetchmtn
fetchnextcloudapp fetchNextcloudApp: rewrite with fetchzip & applyPatches 2022-09-26 20:32:33 +02:00
fetchpatch fetchpatch2: init 2022-07-20 22:47:14 +03:00
fetchrepoorcz
fetchrepoproject
fetchs3
fetchsavannah
fetchsourcehut treewide: extraPostFetch -> postFetch 2022-05-23 17:18:50 +03:00
fetchsvn
fetchsvnrevision
fetchsvnssh
fetchurl tests.fetchurl: remove alias usage 2022-11-24 22:32:34 +02:00
fetchzip fetchzip: auto generate name from pname-version 2022-11-07 13:40:57 -05:00
flutter mkFlutterApp: support apps which don't produce a .packages 2022-12-02 03:22:52 +00:00
go buildGo{Module,Package}: don't run vet linter 2022-08-20 07:37:14 +10:00
icon-conv-tools
install-shell-files
java
kernel splice.nix: start deprecating nativeDrv and crossDrv 2022-11-19 00:04:54 +02:00
libredirect libredirect: Fix cross compilation buildPackages 2022-07-20 10:26:48 +12:00
make-darwin-bundle Merge pull request #165111 from toonn/darwin-bundle-outputBin 2022-04-22 12:04:09 +01:00
make-desktopitem build-support/makeDesktopItem: make overridable 2022-06-09 15:32:44 +01:00
make-pkgconfigitem makePkgconfigItem: init new function to generate pc files 2022-07-20 06:22:39 +03:00
make-startupitem
mkshell mkshell: refactor Bash snippet 2022-12-07 01:25:48 +01:00
mono-dll-fixer
nix-gitignore
node npmHooks.npmInstallHook: pass --no-save to prune 2022-11-25 15:47:05 -05:00
nuke-references treewide: add enableParallelBuilding's to bootstrap packages so hashes stay the same 2022-05-25 16:03:14 +03:00
ocaml ocamlPackages.buildOcaml: remove 2022-10-25 09:40:57 +02:00
oci-tools
pkg-config-wrapper treewide: add enableParallelBuilding's to bootstrap packages so hashes stay the same 2022-05-25 16:03:14 +03:00
portable-service portableService: tooling to create portable service images 2022-09-22 20:11:25 +02:00
prefer-remote-fetch prefer-remote-fetch: don't overwrite fetcher's which set preferLocalBuild explicitly 2022-06-03 14:05:37 +02:00
references-by-popularity dockerTools: prefer local builds 2022-11-18 09:31:53 -05:00
release treewide: *Flags convert to list from str 2022-10-10 15:30:59 +03:00
remove-references-to removeReferencesTo: kill lone hashes 2022-08-25 17:25:58 +02:00
replace-secret
rust Merge pull request #199371 from figsoda/fetchCrate 2022-12-05 18:15:33 -05:00
setup-hooks Merge pull request #182055 from wentasah/moveToOutput-comment-fix 2022-11-18 22:40:50 +00:00
singularity-tools
snap
src-only srcOnly: remove unused binding 2022-09-26 22:18:55 -04:00
substitute
substitute-files
templaterpm maintainers: remove tstrobel 2022-06-29 00:54:53 +02:00
testers testers.testBuildFailure: Read last log line without final newline 2022-12-02 16:12:50 +00:00
trivial-builders tests.trivial-builders.linkFarm: init 2022-11-15 11:47:36 -05:00
vm treewide: change some glibc to stdenv.cc.libc 2022-05-27 05:57:43 +03:00
wrapper-common
writers writers.writeJS: pass arguments to script 2022-10-11 20:16:37 +02:00
build-maven.nix
build-pecl.nix build-pecl: fetch via https 2022-11-21 00:27:34 +01:00
closure-info.nix
make-impure-test.nix makeImpureTest: init function for hardware tests 2022-11-22 16:54:32 +01:00
plugins.nix
replace-dependency.nix replace-dependency: fix a syntax error while generating references.nix 2022-06-12 06:44:30 +04:00
setup-systemd-units.nix
source-from-head-fun.nix
trivial-builders.nix linkFarm: make last entry win in case of list repeats 2022-11-15 11:45:20 -05:00