diff --git a/maintainers/flake-module.nix b/maintainers/flake-module.nix index f5ac5c489..8350fea5c 100644 --- a/maintainers/flake-module.nix +++ b/maintainers/flake-module.nix @@ -106,7 +106,6 @@ enable = true; excludes = [ # We haven't linted these files yet - ''^tests/functional/flakes/show\.sh$'' ''^tests/functional/formatter\.sh$'' ''^tests/functional/formatter\.simple\.sh$'' ''^tests/functional/gc-auto\.sh$'' diff --git a/tests/functional/flakes/show.sh b/tests/functional/flakes/show.sh index 7fcc6aca9..a08db115a 100755 --- a/tests/functional/flakes/show.sh +++ b/tests/functional/flakes/show.sh @@ -12,6 +12,7 @@ pushd "$flakeDir" # By default: Only show the packages content for the current system and no # legacyPackages at all nix flake show --json > show-output.json +# shellcheck disable=SC2016 nix eval --impure --expr ' let show_output = builtins.fromJSON (builtins.readFile ./show-output.json); in @@ -23,6 +24,7 @@ true # With `--all-systems`, show the packages for all systems nix flake show --json --all-systems > show-output.json +# shellcheck disable=SC2016 nix eval --impure --expr ' let show_output = builtins.fromJSON (builtins.readFile ./show-output.json); in @@ -33,6 +35,7 @@ true # With `--legacy`, show the legacy packages nix flake show --json --legacy > show-output.json +# shellcheck disable=SC2016 nix eval --impure --expr ' let show_output = builtins.fromJSON (builtins.readFile ./show-output.json); in @@ -80,6 +83,7 @@ cat >flake.nix < show-output.json +# shellcheck disable=SC2016 nix eval --impure --expr ' let show_output = builtins.fromJSON (builtins.readFile ./show-output.json); in @@ -91,11 +95,12 @@ true # Test that nix flake show doesn't fail if one of the outputs contains # an IFD popd -writeIfdFlake $flakeDir -pushd $flakeDir +writeIfdFlake "$flakeDir" +pushd "$flakeDir" nix flake show --json > show-output.json +# shellcheck disable=SC2016 nix eval --impure --expr ' let show_output = builtins.fromJSON (builtins.readFile ./show-output.json); in