Commit graph

16 commits

Author SHA1 Message Date
Marco Daniel Martins 0498effc41
Cleanup unused frontend code (#653)
* frontend: remove unnecessary imports & js files

* frontend: cleanup code with elm-review - remove unused code

* frontend: remove duplicate viewport
2023-05-04 14:51:19 +02:00
Valentin Gagarin 3a42ce9545
move programs to the top of the metadata display (#620)
* move programs to the top of the metadata display

rename to "programs provided", since where they are provided
is an implementation detail irrelevant to users of `nix-shell -p`.

* Fix CSS

---------

Co-authored-by: Naïm Favier <n@monade.li>
2023-02-16 10:18:09 +01:00
Valentin Gagarin ad5fab6ce5
refine the warning on using nix-env (#619)
* refine the warning on using `nix-env`

also highlight the command name

* Format

---------

Co-authored-by: Naïm Favier <n@monade.li>
2023-02-16 10:00:06 +01:00
Naïm Favier dff4ba7132
Search programs provided by a package (#610)
* 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
2023-02-07 16:31:17 +01:00
Naïm Favier 4bea45b150
Remove reverse fields (#579) 2022-12-06 23:58:51 +01:00
Naïm Favier ba0b05b998
Render Markdown in option docs for flakes and longDescription (#539) 2022-10-28 15:49:15 +02:00
MatthewCroughan a76f3f779c
Show nix-shell instructions first instead of NixOS Configuration (#526) 2022-08-29 13:23:49 +02:00
Naïm Favier d94c60ca12
frontend: remove trailing whitespace in installation instructions (#522) 2022-08-25 18:33:15 +02:00
Philip Munksgaard 9e5f095369
Add support for sourcehut links (#517)
* Add support for SourceHut flakes

* Update flake-info/README.md

Co-authored-by: Naïm Favier <n@monade.li>

Co-authored-by: Naïm Favier <n@monade.li>
2022-08-23 14:42:06 +02:00
MatthewCroughan f504a9fdd7
encourage NixOS configuration, nix-shell and discourage nix-env (#514)
Co-authored-by: Naïm Favier <n@monade.li>
2022-08-11 15:35:57 +02:00
erikarvstedt 0453790a74
Flakes search: Include flake name (#499) 2022-07-28 15:11:00 +02:00
Naïm Camille Favier 7e0226d427
frontend: select package name on click (#497)
Fixes https://github.com/NixOS/nixos-search/issues/496
2022-07-04 12:59:23 +02:00
Rok Garbas eea6cd3ffb
Feat/dynamic import (#473)
* 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>
2022-04-24 23:48:01 +02:00
Naïm Favier ff22728d9a
Fix display of null and missing defaults and examples (#457)
* 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>
2022-04-07 23:57:35 +02:00
Rok Garbas b389e378c2
Some frontend cleanup (#459)
* remove Debug.log statements

* move View.Components.SearchInput.viewBucket into Search module

* combine 2 version of viewSearchInput

* moving viewFlakes function to Search module

and removing View.Components.SearchInput module

* removing View.Components module

* use :: instead of List.append
2022-03-31 16:32:28 +02:00
Naïm Favier b316bc13cc
Workflow improvements (#458)
- Separate building flake-info into a new workflow that's triggered on push
  and on relevant pull requests
- Move frontend-related files into a `frontend` subdirectory
2022-03-30 20:45:35 +02:00