Skip to content

Commit

Permalink
Add hasPackages field to meta
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasjm committed Sep 22, 2024
1 parent e57ffbb commit 8a1d0c2
Show file tree
Hide file tree
Showing 14 changed files with 21 additions and 4 deletions.
7 changes: 5 additions & 2 deletions modules/languages/bash/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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;
Expand Down
1 change: 1 addition & 0 deletions modules/languages/clojure/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ symlinkJoin {
version = clojure.version;
icon = ./clojure-logo-64x64.png;
inherit settingsSchema;
hasPackages = packageOptions != {};
};
inherit packageOptions packageSearch;
versions = {
Expand Down
1 change: 1 addition & 0 deletions modules/languages/coq/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ symlinkJoin {
inherit displayName settingsSchema;
version = coq.version;
icon = coq_jupyter.sizedLogo "64";
hasPackages = packageOptions != {};
};
inherit packageOptions packageSearch;
versions = {
Expand Down
1 change: 1 addition & 0 deletions modules/languages/cpp/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ symlinkJoin {
version = clang.version;
icon = getAttr flavor icons;
inherit settingsSchema;
hasPackages = packageOptions != {};
};
inherit packageOptions packageSearch;
versions = {
Expand Down
1 change: 1 addition & 0 deletions modules/languages/go/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ symlinkJoin {
version = go.version;
icon = ./go-logo-64x64.png;
inherit settingsSchema;
hasPackages = packageOptions != {};
};
args = {
inherit packages attrs extensions settings;
Expand Down
1 change: 1 addition & 0 deletions modules/languages/haskell/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
5 changes: 3 additions & 2 deletions modules/languages/julia/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,7 @@ let
displayName = "Julia";
kernelName = "julia";

packageOptions = {};
packageSearch = common.searcher' {
packageOptions = {
packages = lib.listToAttrs (map (x: {
name = x;
value = {
Expand All @@ -63,6 +62,7 @@ let
}) (import ./julia-modules/package-names.nix));
packageMustBeDerivation = false;
};
packageSearch = common.searcher' packageOptions;

juliaToUse = juliaWithPackages (
["IJulia"]
Expand Down Expand Up @@ -102,6 +102,7 @@ symlinkJoin {
inherit displayName settingsSchema;
version = julia.version;
icon = ./julia-logo-64x64.png;
hasPackages = packageOptions != {};
};
args = {
inherit attrs extensions settings packages;
Expand Down
1 change: 1 addition & 0 deletions modules/languages/octave/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ symlinkJoin {
version = octave.version;
icon = ./octave-logo-64x64.png;
inherit settingsSchema;
hasPackages = packageOptions != {};
};
versions = {
octave = octave.version;
Expand Down
1 change: 1 addition & 0 deletions modules/languages/postgres/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ symlinkJoin {
icon = ./postgres-logo-64x64.png;
inherit version;
inherit settingsSchema;
hasPackages = packageOptions != {};
};
inherit packageOptions packageSearch;
versions = {
Expand Down
1 change: 1 addition & 0 deletions modules/languages/python/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ symlinkJoin {
inherit displayName settingsSchema;
version = python3.version;
icon = ./python-logo-64x64.png;
hasPackages = packageOptions != {};
};
inherit packageOptions packageSearch;
versions = {
Expand Down
1 change: 1 addition & 0 deletions modules/languages/r/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ symlinkJoin {
displayName = "R";
version = R.version;
icon = ./r-logo-64x64.png;
hasPackages = packageOptions != {};
};
inherit packageOptions packageSearch versions;
inherit settingsSchema settings;
Expand Down
1 change: 1 addition & 0 deletions modules/languages/ruby/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ symlinkJoin {
version = ruby.version;
icon = ./iruby-64x64.png;
inherit settingsSchema;
hasPackages = packageOptions != {};
};
args = {
inherit attrs extensions settings packages;
Expand Down
1 change: 1 addition & 0 deletions modules/languages/rust/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ symlinkJoin {
inherit displayName;
icon = ./rust-logo-64x64.png;
inherit settingsSchema;
hasPackages = packageOptions != {};
};
args = {
inherit attrs extensions settings packages;
Expand Down
2 changes: 2 additions & 0 deletions nix/uiMetadata.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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") {
Expand Down

0 comments on commit 8a1d0c2

Please sign in to comment.