diff options
author | Tobias Markus <tobias@miglix.eu> | 2023-03-06 18:54:54 +0100 |
---|---|---|
committer | Tobias Markus <tobias@miglix.eu> | 2023-03-07 15:01:59 +0100 |
commit | 6d8041b0532c8b51a93f68c9737feecbb195d32a (patch) | |
tree | 52a028b4bdfd05c6da7982187b47112609fdbb0b /pkgs/build-support/trivial-builders.nix | |
parent | 30343bab5430fc98d0a096146e8b077a2b55124b (diff) |
writeShellApplication: Prefer lib.getExe over unwrapped ShellChecked
writeShellApplication currently uses the unwrapped (passthru) attribute which is simply defined as the ShellCheck Haskell package. Unfortunately the unwrapped version contains everything and the kitchen sink, while the bin output of the top-level shellcheck package contains only the static shellcheck executable. In other words, by using writeShellApplication, currently 3GB of packages have to be unnecessarily fetched just to run the checkPhase. $ nix path-info -Sh $(nix build --print-out-paths --no-link nixpkgs#shellcheck.unwrapped) /nix/store/23x8702b9kqn0r8swah05ky7w5fnh6m2-ShellCheck-0.9.0 3.0G $ nix path-info -Sh $(nix build --print-out-paths --no-link nixpkgs#shellcheck.bin) /nix/store/594izb2jz3c57c7hgxfnb6irypnr4575-shellcheck-0.9.0-bin 45.3M There is no benefit to using shellcheck.unwrapped in this case. Therefore, replace shellcheck.unwrapped with lib.getExe shellcheck.
Diffstat (limited to 'pkgs/build-support/trivial-builders.nix')
-rw-r--r-- | pkgs/build-support/trivial-builders.nix | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pkgs/build-support/trivial-builders.nix b/pkgs/build-support/trivial-builders.nix index 7318d13f6babd..8f207e361dd61 100644 --- a/pkgs/build-support/trivial-builders.nix +++ b/pkgs/build-support/trivial-builders.nix @@ -341,7 +341,7 @@ rec { if checkPhase == null then '' runHook preCheck ${stdenv.shellDryRun} "$target" - ${shellcheck.unwrapped}/bin/shellcheck "$target" + ${lib.getExe shellcheck} "$target" runHook postCheck '' else checkPhase; |