Skip to content

Commit

Permalink
Fix languages searcher to include all metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasjm committed Mar 12, 2024
1 parent f2bc1f7 commit 050e665
Show file tree
Hide file tree
Showing 14 changed files with 8 additions and 30 deletions.
12 changes: 8 additions & 4 deletions codedown.nix
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ let
(pkgsMaster.callPackage ./languages/rust {})
];

lib = pkgsStable.lib;

in

rec {
Expand Down Expand Up @@ -72,16 +74,18 @@ rec {

languages = languagesFn false;
languagesSearcher = common.searcher' {
packages = languagesFn true;
packageMustBeDerivation = false;
packages = let
filterOverrideKeys = lib.filterAttrs (k: _: !(lib.hasPrefix "override") k);
in
filterOverrideKeys (lib.mapAttrs (n: v: v.build {}) (languagesFn true));
};
languagesIcons = common.searcherIcons' {
packages = languagesFn true;
packageMustBeDerivation = false;
};

settingsSchemas = pkgsStable.lib.mapAttrs (attr: value:
common.safeEval (pkgsStable.lib.attrByPath ["meta" "settingsSchema"] [] value)
settingsSchemas = lib.mapAttrs (attr: value:
common.safeEval (lib.attrByPath ["meta" "settingsSchema"] [] value)
) languages;

mkCodeDownEnvironment = callPackage ./codedown/mkCodeDownEnvironment.nix {
Expand Down
2 changes: 0 additions & 2 deletions languages/bash/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,6 @@ lib.listToAttrs (map (x:
};
};
};

inherit meta;
};
}
) (lib.filter (x: lib.hasAttr x pkgs) baseCandidates))
2 changes: 0 additions & 2 deletions languages/clojure/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,6 @@ listToAttrs (map (x:
};
};
};

inherit meta;
};
}

Expand Down
2 changes: 0 additions & 2 deletions languages/coq/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,6 @@ lib.listToAttrs (map (x:
};
};
};

inherit meta;
};
}
) (lib.filter (x: lib.hasAttr x pkgs) baseCandidates))
2 changes: 0 additions & 2 deletions languages/cpp/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,6 @@ if cling == null then {} else
};
};
};

inherit meta;
};
}
) baseCandidates)
2 changes: 0 additions & 2 deletions languages/go/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,6 @@ listToAttrs (map (x:
};
};
};

inherit meta;
};
}

Expand Down
2 changes: 0 additions & 2 deletions languages/haskell/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,6 @@ listToAttrs (mapAttrsToList (compilerName: snapshot:
};
};
};

inherit meta;
};
}
) (lib.filterAttrs (k: _: !(hasPrefix "override") k) compilers))
2 changes: 0 additions & 2 deletions languages/julia/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,5 @@ mapAttrs (attr: value:
};
};
};

inherit meta;
}
) baseCandidates
2 changes: 0 additions & 2 deletions languages/octave/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,6 @@ listToAttrs (map (x:
};
};
};

inherit meta;
};
}
) (filter (x: hasAttr x pkgs) baseCandidates))
Expand Down
2 changes: 0 additions & 2 deletions languages/postgres/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,5 @@ in
};
};
};

inherit meta;
};
}
2 changes: 0 additions & 2 deletions languages/python/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,6 @@ lib.listToAttrs (map (x:
};
};
};

inherit meta;
};
}
) (lib.filter (x: lib.hasAttr x pkgs) baseCandidates))
2 changes: 0 additions & 2 deletions languages/r/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,5 @@ listToAttrs [{
};
};
};

inherit meta;
};
}]
2 changes: 0 additions & 2 deletions languages/ruby/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,6 @@ listToAttrs (map (x:
};
};
};

inherit meta;
};
}

Expand Down
2 changes: 0 additions & 2 deletions languages/rust/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,6 @@ listToAttrs (map (x:
};
};
};

inherit meta;
};
}
) (filter (x: hasAttr x pkgs) baseCandidates))

0 comments on commit 050e665

Please sign in to comment.