diff --git a/pkgs/shells/nushell/plugins/default.nix b/pkgs/shells/nushell/plugins/default.nix index 1305cd7183f4..f73b2d43b7d2 100644 --- a/pkgs/shells/nushell/plugins/default.nix +++ b/pkgs/shells/nushell/plugins/default.nix @@ -3,27 +3,39 @@ config, newScope, dbus, + versionCheckHook, }: lib.makeScope newScope ( self: - with self; - { - gstat = callPackage ./gstat.nix { }; - formats = callPackage ./formats.nix { }; - polars = callPackage ./polars.nix { }; - query = callPackage ./query.nix { }; - net = callPackage ./net.nix { }; - units = callPackage ./units.nix { }; - highlight = callPackage ./highlight.nix { }; - dbus = callPackage ./dbus.nix { - inherit dbus; - nushell_plugin_dbus = self.dbus; - }; - skim = callPackage ./skim.nix { }; - semver = callPackage ./semver.nix { }; - } - // lib.optionalAttrs config.allowAliases { - regex = throw "`nu_plugin_regex` is no longer compatible with the current Nushell release."; - } + + lib.mapAttrs + ( + _n: p: + p.overrideAttrs { + doInstallCheck = true; + nativeInstallCheckInputs = [ versionCheckHook ]; + } + ) + ( + with self; + { + gstat = callPackage ./gstat.nix { }; + formats = callPackage ./formats.nix { }; + polars = callPackage ./polars.nix { }; + query = callPackage ./query.nix { }; + net = callPackage ./net.nix { }; + units = callPackage ./units.nix { }; + highlight = callPackage ./highlight.nix { }; + dbus = callPackage ./dbus.nix { + inherit dbus; + nushell_plugin_dbus = self.dbus; + }; + skim = callPackage ./skim.nix { }; + semver = callPackage ./semver.nix { }; + } + // lib.optionalAttrs config.allowAliases { + regex = throw "`nu_plugin_regex` is no longer compatible with the current Nushell release."; + } + ) )