nixos-search icon indicating copy to clipboard operation
nixos-search copied to clipboard

Difficult to find OCaml 5 via search

Open GabrielDougherty opened this issue 2 years ago • 2 comments

There is a UX issue with finding OCaml 5 via NixOS Search. Ocaml 5 has been packaged as ocaml-ng.ocamlPackages_5_0. If I search for "ocaml," the first result is for OCaml 4.14.1 which is an old version. The latest version, 5.0.0 does not appear on the first or second page of search results. It also does not appear on the next few pages, nor does it appear when I search for "ocaml 5" or "ocaml 5_0" and so on.

Since the package is hard to find, it probably leads to folks thinking that the package does not exist. I only found it through this issue.

GabrielDougherty avatar Mar 12 '23 20:03 GabrielDougherty

This needs fixing in nixpkgs first so that the package is actually exposed in the search, and then we can worry about making it float to the top of the results.

We could

  • add a top-level ocaml_5 alias to ocaml-ng.ocamlPackages_5_0.ocaml
  • add
      ocaml-ng = super.ocaml-ng // {
        ocamlPackages_latest = recurseIntoAttrs super.ocaml-ng.ocamlPackages_latest;
      };
    
    to pkgs/top-level/packages-config.nix

ncfavier avatar Mar 12 '23 20:03 ncfavier

Thanks - opened PR https://github.com/NixOS/nixpkgs/pull/220894

GabrielDougherty avatar Mar 12 '23 20:03 GabrielDougherty