Commit graph

219 commits

Author SHA1 Message Date
Naïm Favier 5798bb000e
Show default outputs (#452)
* 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
2022-03-27 15:52:54 +02:00
Naïm Favier b2e0ce28fc
flake-info: enforce minimal nix version (#451)
Co-authored-by: Yannik Sander <me@ysndr.de>
2022-03-18 21:57:28 +01:00
Rok Garbas 26caeaf488
Cleanup (#450)
* add direnv support

* elm format

* use flake-utils

* remove unused parts of the code

* only use one workflow to import things

* Build flake-info in separate job

* DEBUG

* Revert "DEBUG"

This reverts commit 6c335e6bd2ba450f1891efe70dfd9bb95f300b31.

* RUST_LOG is a runtime thing
2022-03-17 23:00:10 +01:00
Naïm Favier 6e2650b6d3
flake-info: don't allow options to evaluate disallowed packages (#449)
Options shouldn't evaluate packages in documentation attributes.
These are errors that should be fixed in nixpkgs, which
https://github.com/NixOS/nixpkgs/pull/136909 did.
2022-03-17 22:31:30 +01:00
Yannik Sander d2ca8bb5c9
Import Nixpkgs from path (#445) 2022-03-17 08:14:36 +01:00
jgart 7e00649bda
fix typo (#448) 2022-03-17 08:13:53 +01:00
Naïm Favier f80d3ea4b2
flake: set flake-info as default package (#446)
Makes more sense to have the CLI tool as default package.
2022-03-16 18:49:23 +01:00
Naïm Favier 7be68b6dc0
Show package outputs (#419)
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
2022-03-16 10:43:20 +01:00
dependabot[bot] a5b2b8f0e5
Dependabot(deps): Bump actions/checkout from 2 to 3 (#441)
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-02 12:05:42 +01:00
P 161433f1b1
Adding my repos to public flakes (#440)
* flakes: add stream-alert-bot

* flakes: add python-trovo

* flakes: add multifirefox

* Update flakes/manual.toml

Co-authored-by: Yannik Sander <me@ysndr.de>
Co-authored-by: Yannik Sander <accounts@ysndr.de>
2022-03-01 14:06:27 +01:00
Yannik Sander 33da3a4a0c
Add group reports for flake-group check (#436)
* `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
2022-03-01 13:50:18 +01:00
Yannik Sander d098ad2acb
Filter frontend triggers (#437) 2022-02-28 16:27:28 +01:00
Naïm Favier 188d3a25c8
CI: enable globstar (#439)
* CI: enable globstar
2022-02-28 16:19:31 +01:00
Naïm Favier ba7f332a49
CI: do shallow clones (#438) 2022-02-28 16:16:33 +01:00
Yannik Sander 2b7ce58d2f
Use composite action to reuse setup steps (#433)
* Add github action to check flake groups
* Run on pull_requests and filter ~files~ *paths*
* Use composite action to reuse setup steps
* Use common setuo for frontend action
* Fix path to action
* Remove checkout action from common setup
Checkout needed to fetch action
* Provide secrets to action

Co-authored-by: Rok Garbas <rok@garbas.si>
2022-02-28 00:10:09 +01:00
Yannik Sander 96eeff25d3
Add github action to check flake groups (#432)
* Add github action to check flake groups
* Run on pull_requests and filter ~files~ *paths*

Co-authored-by: Marek Fajkus <marek.faj@gmail.com>
Co-authored-by: Naïm Favier <n@monade.li>
2022-02-28 00:02:11 +01:00
lewo aebdd3da75
Add nixos-mailserver to the flakes index (#377) 2022-02-25 09:45:12 +01:00
Yusuf Bera Ertan 4795fe3a52
feat: add nix-cargo-integration and rust-nix-templater flakes (#359)
* feat: add nix-cargo-integration and rust-nix-templater flakes

* Add missing newline

Co-authored-by: Yannik Sander <me@ysndr.de>
2022-02-23 21:35:46 +01:00
Sridhar Ratnakumar e8753a385e
Add emanote (#408)
https://emanote.srid.ca

Co-authored-by: Yannik Sander <me@ysndr.de>
Co-authored-by: Rok Garbas <rok@garbas.si>
2022-02-23 21:26:34 +01:00
Finn Behrens c40f5a63a8
flakes: add PolyMC flake info (#428)
LINK: https://polymc.org
LINK: https://github.com/PolyMC/PolyMC
2022-02-23 21:24:57 +01:00
Renaud 38de95ce40
Improve short package details readability (#429)
* put licenses list on it own line and separate each license with a small black square
* display package name as a code block
* display version number in bold
* add a 'house with garden' emoji before "Homepage"
* add a 'package' emoji before "Source"
2022-02-23 21:22:18 +01:00
Naïm Favier b4163eb8b2
Authenticate to the GitHub API in workflows (#425) 2022-02-05 15:24:16 +01:00
Naïm Favier bb82e171f8
flake: add nixos-search.cachix.org to substituters (#422) 2022-01-25 17:30:21 +01:00
Naïm Favier ec4dbe03a4
Print underlying serialisation errors (#417) 2022-01-25 16:03:21 +01:00
Naïm Favier 7d80f60fd9
Pass --meta to nix-env (#421)
Since Nix 2.6 (https://github.com/NixOS/nix/pull/5883) nix-env doesn't
output the `meta` attribute unless this flag is passed.
2022-01-25 16:02:29 +01:00
Naïm Favier a8275b15a1
CI: don't fail-fast (#418) 2022-01-24 18:47:19 +01:00
Naïm Favier 5a40a2c43a
Drop 20.09 channel (#416) 2022-01-17 23:28:01 +01:00
Naïm Favier f31e580e52
Clean up workflows (#415)
* Clean up workflows

* Rename workflow files

* Temporarily enable workflows from PR

* Add nixpkgs channel to NIX_PATH

* Fix typo

* Fix index names for warmup

* Build verbosely

* Fix index names again

* Re-add jq

* Revert "Temporarily enable workflows from PR"

This reverts commit dd040e94645d9e61b80505471f57b1c0e35b1210.
2022-01-17 12:18:00 +01:00
Yannik Sander ce28a0e877
Also ignore installDetail state (#411) 2022-01-14 20:44:46 +01:00
Kerstin a4614dca0c
flakes: add sway-timetracker (#399) 2022-01-10 11:53:14 +01:00
erikarvstedt 096ea9e49c
Support flake attr nixosModule (#401)
* 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>
2022-01-06 15:42:31 +01:00
sterni 32700e3eee
Use upstream nixpkgs' packages-config.nix (#405)
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.
2022-01-03 13:45:05 +01:00
Yannik Sander 078c68764b
Ignore result data (#407) 2021-12-31 16:37:02 +01:00
Yannik Sander 5d965dd10c
Be more strict about model changes (#406) 2021-12-31 15:34:51 +01:00
Kerstin 477ef70b06
flakes: add weblate (#398) 2021-12-31 15:18:24 +01:00
Naïm Favier 194ba6d4e0
Fix xrefs (#402) 2021-12-31 00:29:13 +01:00
Naïm Favier b6f1dc9667
Render DocBook strings containing < but not </ (#400)
The current check is too restrictive and will not match strings containing only self-closing tags, for example the description of `time.timeZone`.
2021-12-28 23:21:23 +01:00
erikarvstedt 63846c3e82
Flakes index: Add nix-bitcoin (#394) 2021-12-26 16:21:04 +01:00
Yannik Sander 87851618b6
Display attributes of flakes in a more expected way (#397) 2021-12-26 16:19:15 +01:00
Yannik Sander 3dfcf4fd45
Fix/explicit printing (#395)
* 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
2021-12-26 16:03:09 +01:00
Yannik Sander a4d8421312
Allow plain strings for nixpkgs maintainer fields (#393)
* Allow plain strings for nixpkgs maintainer fields

* apply fmt to changed files
2021-12-18 14:45:08 +01:00
Yannik Sander 29651d086b
Fix/devshell (#390)
* Fix flake-info attribute name in devShell definition

* Export rust stdlib path though shell hook

* Format flake.nix
2021-12-15 02:38:06 +01:00
Yannik Sander fa5fe2a61c
Remove noisy prints to stderr (#386)
* Make stderr less noisy

* Set and refer to pandoc filter path in derivation
2021-12-06 23:50:15 +01:00
erikarvstedt 875eedde46
Readme: Fix flake-info command (#380)
The flake attribute must directly name the app.

Previously, the command failed with:
error: cannot find flake attribute 'github:nixos/nixos-search#apps.flake'
2021-12-06 18:48:18 +01:00
erikarvstedt bd59a80130
flake: Remove app (#385)
As pointed out by Yannik Sander, defining the app is redundant because
the package of the same name is used automatically.
2021-12-06 18:47:08 +01:00
Yannik Sander d0f0b84eea
Print pandoc error rather than panic-ing (#382)
* Print pandoc error rather than panic-ing

* Maintain current failing behaviour

* Update export.rs
2021-12-06 18:23:10 +01:00
erikarvstedt 46d00f3b43
flake, overlay: Rename package to flake-info (#383)
The package now has the same name as the `app` and the
command (`bin/flake-info`).
2021-12-06 15:01:26 +01:00
tomberek 70b72a343f
release: 21.05 -> 21.11 (#376)
* release: 21.05 -> 21.11

* adding back 20.09 (for now)

Co-authored-by: Rok Garbas <rok@garbas.si>
2021-12-01 00:26:34 +01:00
Yannik Sander dbf8c2d3a4
Convert import::Kind enum to a clap compatible arg_enum (#365) 2021-11-23 13:58:55 +01:00
Yannik Sander a28c473b57
Add flake app and Documentation (#364)
* Add flake app

* Document adding and testing own flakes
2021-11-23 13:58:38 +01:00