diff --git a/modules/languages/bash/default.nix b/modules/languages/bash/default.nix index 92fd3ed..3789e6e 100644 --- a/modules/languages/bash/default.nix +++ b/modules/languages/bash/default.nix @@ -21,6 +21,9 @@ let languageServers = lib.optionals settings.lsp.bash-language-server.enable [(callPackage ./language_server_bash { inherit kernelName; })]; + packageOptions = {}; + packageSearch = common.searcher packageOptions; + in symlinkJoin { @@ -44,14 +47,14 @@ symlinkJoin { version = bash.version; icon = ./bash-logo-128x128.png; inherit settingsSchema; + hasPackages = packageOptions != {}; }; versions = { bash = bash.version; bash-language-server = nodePackages.bash-language-server.version; bash_kernel = python3.pkgs.bash_kernel.version; }; - packageOptions = {}; - packageSearch = common.searcher {}; + inherit packageOptions packageSearch; inherit settingsSchema settings; modes = { inherit attrs extensions; diff --git a/modules/languages/clojure/default.nix b/modules/languages/clojure/default.nix index f25ea1f..7ed09af 100644 --- a/modules/languages/clojure/default.nix +++ b/modules/languages/clojure/default.nix @@ -53,6 +53,7 @@ symlinkJoin { version = clojure.version; icon = ./clojure-logo-64x64.png; inherit settingsSchema; + hasPackages = packageOptions != {}; }; inherit packageOptions packageSearch; versions = { diff --git a/modules/languages/coq/default.nix b/modules/languages/coq/default.nix index cd7fc56..96ed493 100644 --- a/modules/languages/coq/default.nix +++ b/modules/languages/coq/default.nix @@ -47,6 +47,7 @@ symlinkJoin { inherit displayName settingsSchema; version = coq.version; icon = coq_jupyter.sizedLogo "64"; + hasPackages = packageOptions != {}; }; inherit packageOptions packageSearch; versions = { diff --git a/modules/languages/cpp/default.nix b/modules/languages/cpp/default.nix index 28db8d7..153013c 100644 --- a/modules/languages/cpp/default.nix +++ b/modules/languages/cpp/default.nix @@ -65,6 +65,7 @@ symlinkJoin { version = clang.version; icon = getAttr flavor icons; inherit settingsSchema; + hasPackages = packageOptions != {}; }; inherit packageOptions packageSearch; versions = { diff --git a/modules/languages/go/default.nix b/modules/languages/go/default.nix index 3d20e33..89d39ea 100644 --- a/modules/languages/go/default.nix +++ b/modules/languages/go/default.nix @@ -49,6 +49,7 @@ symlinkJoin { version = go.version; icon = ./go-logo-64x64.png; inherit settingsSchema; + hasPackages = packageOptions != {}; }; args = { inherit packages attrs extensions settings; diff --git a/modules/languages/haskell/default.nix b/modules/languages/haskell/default.nix index 7494289..9f25266 100644 --- a/modules/languages/haskell/default.nix +++ b/modules/languages/haskell/default.nix @@ -84,6 +84,7 @@ symlinkJoin { description = "An advanced, purely functional programming language (GHC ${version})"; inherit version displayName settingsSchema; icon = ./haskell-logo-64x64.png; + hasPackages = packageOptions != {}; }; inherit packageOptions packageSearch; versions = { diff --git a/modules/languages/julia/default.nix b/modules/languages/julia/default.nix index a09d8b1..a0e7c21 100644 --- a/modules/languages/julia/default.nix +++ b/modules/languages/julia/default.nix @@ -50,8 +50,7 @@ let displayName = "Julia"; kernelName = "julia"; - packageOptions = {}; - packageSearch = common.searcher' { + packageOptions = { packages = lib.listToAttrs (map (x: { name = x; value = { @@ -63,6 +62,7 @@ let }) (import ./julia-modules/package-names.nix)); packageMustBeDerivation = false; }; + packageSearch = common.searcher' packageOptions; juliaToUse = juliaWithPackages ( ["IJulia"] @@ -102,6 +102,7 @@ symlinkJoin { inherit displayName settingsSchema; version = julia.version; icon = ./julia-logo-64x64.png; + hasPackages = packageOptions != {}; }; args = { inherit attrs extensions settings packages; diff --git a/modules/languages/octave/default.nix b/modules/languages/octave/default.nix index 189e51e..47ebd4c 100644 --- a/modules/languages/octave/default.nix +++ b/modules/languages/octave/default.nix @@ -66,6 +66,7 @@ symlinkJoin { version = octave.version; icon = ./octave-logo-64x64.png; inherit settingsSchema; + hasPackages = packageOptions != {}; }; versions = { octave = octave.version; diff --git a/modules/languages/postgres/default.nix b/modules/languages/postgres/default.nix index c9d3afb..f4b5a29 100644 --- a/modules/languages/postgres/default.nix +++ b/modules/languages/postgres/default.nix @@ -46,6 +46,7 @@ symlinkJoin { icon = ./postgres-logo-64x64.png; inherit version; inherit settingsSchema; + hasPackages = packageOptions != {}; }; inherit packageOptions packageSearch; versions = { diff --git a/modules/languages/python/default.nix b/modules/languages/python/default.nix index c785384..357f3e5 100644 --- a/modules/languages/python/default.nix +++ b/modules/languages/python/default.nix @@ -72,6 +72,7 @@ symlinkJoin { inherit displayName settingsSchema; version = python3.version; icon = ./python-logo-64x64.png; + hasPackages = packageOptions != {}; }; inherit packageOptions packageSearch; versions = { diff --git a/modules/languages/r/default.nix b/modules/languages/r/default.nix index d9dd445..03d8779 100644 --- a/modules/languages/r/default.nix +++ b/modules/languages/r/default.nix @@ -66,6 +66,7 @@ symlinkJoin { displayName = "R"; version = R.version; icon = ./r-logo-64x64.png; + hasPackages = packageOptions != {}; }; inherit packageOptions packageSearch versions; inherit settingsSchema settings; diff --git a/modules/languages/ruby/default.nix b/modules/languages/ruby/default.nix index d586759..157005a 100644 --- a/modules/languages/ruby/default.nix +++ b/modules/languages/ruby/default.nix @@ -52,6 +52,7 @@ symlinkJoin { version = ruby.version; icon = ./iruby-64x64.png; inherit settingsSchema; + hasPackages = packageOptions != {}; }; args = { inherit attrs extensions settings packages; diff --git a/modules/languages/rust/default.nix b/modules/languages/rust/default.nix index 876dede..f9e9f1d 100644 --- a/modules/languages/rust/default.nix +++ b/modules/languages/rust/default.nix @@ -84,6 +84,7 @@ symlinkJoin { inherit displayName; icon = ./rust-logo-64x64.png; inherit settingsSchema; + hasPackages = packageOptions != {}; }; args = { inherit attrs extensions settings packages; diff --git a/nix/uiMetadata.nix b/nix/uiMetadata.nix index 3b83fc2..1cf3ee9 100644 --- a/nix/uiMetadata.nix +++ b/nix/uiMetadata.nix @@ -28,6 +28,8 @@ rec { download_page = contents.meta.downloadPage; }) // (lib.optionalAttrs (lib.hasAttrByPath ["meta" "displayName"] contents) { display_name = contents.meta.displayName; + }) // (lib.optionalAttrs (lib.hasAttrByPath ["meta" "hasPackages"] contents) { + has_packages = contents.meta.hasPackages; }) // (lib.optionalAttrs (lib.hasAttrByPath ["meta" "lessCommon"] contents) { less_common = contents.meta.lessCommon; }) // (lib.optionalAttrs (contents ? "settingsSchema") {