* flake-info: don't render definition lists
Nothing uses them in nixpkgs and they mess up descriptions that have a
line starting with a tilde.
* Bump VERSION
* Search programs provided by a package
Use the `programs.sqlite` database provided with nixpkgs channels to
populate a `package_programs` field so that searches for e.g. `make` return
`gnumake` with a higher priority.
* Bump VERSION
* frontend: show programs
Make the exports lazy using a closure, so that we can abort early if
the index exists before doing the expensive work.
Raise an error if neither `--json` nor `--push` is specified.
Flakes are staying strict for now because determining the index name is
too tightly coupled with the actual exports.
...for some value of "support". For now, just skip them without causing
an error. Later, maybe figure out a way to display them properly.
An example of a pattern is `lib.systems.inspect.patterns.isGnu`.
Co-authored-by: Rok Garbas <rok@garbas.si>
I think it is surprising that `flake-info` tries to build things in
order to index flakes. Hence, forbid IFD.
`--read-only` is for performance, see https://github.com/NixOS/nix/pull/6323
* flake-info: rely on upstream for extracting nixpkgs options
Use the `options.json` generated in nixpkgs to be more in sync with the
manual.
Also fixes usage of `nixpkgs-archive` with local paths.
* Bump VERSION
* Make the channel importer versions dynamic
* few things fromt he list
1. add nixos-org-configurations as input to flake.nix
2. evaluate channels.nix file and export channels via environment variable.
that environment variable (lets call it NIXOS_CHANNELS) should be present
during the build and inside the nix shell. the content of the variable can
be JSON.
3. we pickup the NIXOS_CHANNELS environment variable in
frontend/webpack.config.js and pass it further to webpack process, just
like we do with ELASTICSEARCH_MAPPING_SCHEMA_VERSION.
4. we forward NIXOS_CHANNELS to Elm via frontend/src/index.js as an Elm
application flag. Just like we do with other variables there.
* Decode nixosChannels in Elm
* Use nixosChannels that came via application flag
* read nixos channels in github action
* defaultNixOSChannel should be calculated
* add two pointers where the check should be added
* pass nixosChannels to flake-info and remove title, rather calculate it
* Add NixosChannels struct validation and validation Error
* Read NIXOS_CHANNEL variable
* Check channel
* Add channel struct to fix parsing NIXOS_CHANNELS
* Use `eachDefaultSystem` instead of listing them manually
* Add individual dev shells for frontend and backend
* Update .github/workflows/import-to-elasticsearch.yml
Co-authored-by: Naïm Favier <n@monade.li>
* use both development environments by default (as it was)
but still provide devShells for each of the subprojects
* pkgs.lib → lib everywhere
and define lib = nixpkgs.lib before the call to eachDefaultSystem
Also, version = lib.fileContents ./VERSION;
* Update flake.nix
Co-authored-by: Naïm Favier <n@monade.li>
* typo
* bumping version to test the changes to import-to-elasticsearch github action
* some invisibile characters needed to be removed
* typo
* will this work
* typo
* forgot the checkout step
* add some debugging
* typo
* read NIXOS_CHANNELS from environment not via argument
* fix for the NIXOS_CHANNELS variable
Co-authored-by: Janne Heß <janne@hess.ooo>
Co-authored-by: ysndr <me@ysndr.de>
Co-authored-by: Naïm Favier <n@monade.li>
* flake-info: fix import of `null` defaults and examples
Currently they're being treated as missing fields, and hence displayed
as "Not given" on the frontend.
* Bump VERSION
* frontend/Options: don't show missing fields
Co-authored-by: Rok Garbas <rok@garbas.si>
* Show default outputs
Following https://github.com/NixOS/nix/pull/6242, we now have access to
default outputs so we can single them out in the frontend.
We can also drop `--out-path`, which speeds up import quite a lot and
doesn't require increasing swap space or allowing broken/unfree
packages anymore.
* Use nixUnstable in CI
* Bump VERSION
As mentioned in [^1] this PR includes a bump in swap size of the github action evaluating nixpkgs.
This is subject to change once a tentative change to Nix is merged.
^1: https://github.com/NixOS/nixos-search/pull/419#issuecomment-1065356169
—
* flake-info: use packages-config.nix straight from nixpkgs
No need to override anything anymore, see discussion at
https://github.com/NixOS/nixos-search/pull/343#issuecomment-1021147104
* flake-info: query package outputs
`package_outputs` is now set to the actual outputs of the derivation
instead of `meta.outputsToInstall`
Also updates nixpkgs to get Rust 1.57 which has HashMap.into_keys
* frontend: show package outputs
* Drop 21.05 channel
* Increase swap space in import-nixpkgs worker
* Bump VERSION
* frontend: improvements and refactoring
- move licenses to the end (without a line break)
- pluralise "Licenses:" conditionally
- change the homepage emoji from a house to a world
- replace backwards List.append pipelines with ++ chains
- avoid text nodes in <ul> outside of <li>
- improve rendering of maintainers
* frontend: sort package outputs
* `nix flake {info -> metadata}`
* Fix error variant for io errors
* Enable backtrace support for anyhow
* Improve error printing
* Write error report file
* Format workflow file
* Use report file
* Set non-zero exit status if a group fails
* Do not use `local`
* Apply suggestions from review
* Move exit outside the loop
* Fix multi line output
* Fix var substitution
* Different work around for multi lines
* flake_info.nix: remove helper fn `default`
Nix has builtin syntax for fetching attrs with a default value.
* flake_info.nix: minor refactor
- Remove commented out code
- Simplify pkg filtering
- Break overlong line
* flake_info.nix: support flake attr `nixosModule`
* Support default modules in rust backend and elm
Co-authored-by: Yannik Sander <me@ysndr.de>
The files in nixos-search and nixpkgs have already unnecessarily
diverged — more than they should given that the only difference is that
the search ignores unfree packages (while nixpkgs includes them for the
benefit of repology).
Since we update the NIX_PATH when calling nix-env in nixpkgs_info.rs, we
can simply import the packages-config.nix from nixpkgs using that
information and update it with our addition `allowUnfree = false`.
Fixes#337.
* Extract pandoc function to own module
* Bump schema version
* Make string handling more explicit
* Update logging and pandoc crates
* Improve serializing error handling
* Serialize values as string (for elastic)
* Perform option doc parsing entirely in rust
* Show non pandoc'ed results as code elements
* Parse correct html string
* Change expected `option_type` type to String
* Allow treat string unparsable as html like non-docbook strings
* Improve deserializing error reporting using serde_path_to_error
* Format code
There was a discussion around this when search.nixos.org was redesigned
and the conclusion was that nixpkgs is a collection of free and open
source software. We shouldn't list the unfree stuff.