Git Product home page Git Product logo

flakestry.dev's Introduction

A public registry of Nix flakes aiming to supersede search.nixos.org.

Built using elm.land and FastAPI.

Maintainers: @domenkozar.

Development

  1. Install direnv

  2. Install devenv

    nix profile install --accept-flake-config tarball+https://install.devenv.sh/latest
  3. Load the development environment:

    direnv allow
  4. Generate the Elm API:

    devenv shell generate-elm-api
  5. Start the development server:

    devenv up

Roadmap

flakestry.dev's People

Contributors

domenkozar avatar infinisil avatar kip93 avatar mightyiam avatar minibill avatar roberth avatar sandydoo avatar sestrella avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

flakestry.dev's Issues

Show the actual flake-URL to an output

Maybe I'm missing something, but it seems like there is no obvious place for me to just copy a flake-url from. I have to piece the output together myself based on my knowledge of flake-URLs, but especially beginners won't have that knowledge yet.

It would be nice if there was a button next to the outputs, or maybe a list of URLs in the details page of every output, that I could quickly copy into inputs.$whatever.url, nix shell, nix run etc.

Add noscript

For privacy/security I allowlist sites to enable JavaScript. When I visited the site, I got a blank white page with no information.

SemVer major range query

I would really appreciate being able to specify <flakestry-url>/1.2.* as an input, so that an update fetches the latest tag for that range.
I assume this would eventually be possible with general flake versioning mechanisms, but it would be great if flakestry could provide this ad-hoc in the meantime!

Publish Action fails validation.

2024-02-18T14:39:03.7743240Z Download action repository 'flakestry/flakestry-publish@main' (SHA:fd80e4c1432592211aa496126a14d8dbfdd5b373)
2024-02-18T14:39:04.3685558Z ##[error]flakestry/flakestry-publish/main/action.yaml (Line: 29, Col: 12): Unexpected symbol: '"false"'. Located at position 27 within expression: inputs.ignoreConflicts || "false"
2024-02-18T14:39:04.3708041Z ##[error]GitHub.DistributedTask.ObjectTemplating.TemplateValidationException: The template is not valid. flakestry/flakestry-publish/main/action.yaml (Line: 29, Col: 12): Unexpected symbol: '"false"'. Located at position 27 within expression: inputs.ignoreConflicts || "false"
   at GitHub.DistributedTask.ObjectTemplating.TemplateValidationErrors.Check()
   at GitHub.Runner.Worker.ActionManifestManager.ConvertRuns(IExecutionContext executionContext, TemplateContext templateContext, TemplateToken inputsToken, String fileRelativePath, MappingToken outputs)
   at GitHub.Runner.Worker.ActionManifestManager.Load(IExecutionContext executionContext, String manifestFile)
2024-02-18T14:39:04.3735643Z ##[error]Failed to load flakestry/flakestry-publish/main/action.yaml

ResponseValidationError

ResponseValidationError: 1 validation errors:
{'loc': ('response',), 'msg': 'none is not an allowed value', 'type': 'type_error.none.not_allowed'}

Upload non-github flakes

Requires a few things to happen:

  • auth
  • /publish endpoint needs to accept tarball as POST body
  • async job to process tarball (evaluate flake, render readme, etc)

Rewrite the backend in Rust?

First and foremost, I'd like to thank everyone who contributed to this project, which has been an excellent contribution to the Nix ecosystem. Inspired by @domenkozar work on devenv, I want to propose rewriting the backend in Rust. While some of the primary contributors may already be familiar with this language, I would want to summarize and highlight some of the features that this project would benefit the most from:

  • Fearless concurrency - Rust maintains memory safety, which is particularly beneficial in the context of concurrent programming because it prevents the majority of typical issues such as data races. More specifically, the publish endpoint may benefit from these because tasks like inserting a new record and indexing could be done concurrently.
  • Error handling - Rust distinguishes between recoverable and unrecoverable errors, making it easier to reason about all the possible edge cases of functions, as errors are part of the type signature Result<T, E> and need to be handled explicitly.

After some little research, I found that there are Rust clients for all of the services the application relies on:

  • Open Search - There is an official client.
  • GitHub - While there are a few alternatives here, it is also possible to call the GitHub API directly using a simple HTTP client like hyper or reqwest, which is quite similar to what current Python code does.
  • PostgreSQL - While there are a few native libraries to communicate directly with PostgreSQL, there are also database-agnostic options like SQLx that check queries at compile time.

Regarding web frameworks, axum appears to be one of the most popular based on overall performance. Before getting into more technical details, I wanted to get some feedback about this proposal, as I understand that rewriting a piece of software in a new language always involves some risk and has an impact on maintainers. Nonetheless, I'd like to put this on the table in order to start a conversation and, hopefully, answer all of the questions that arise.

Note: If this proposal gets approved, I would be pleased to submit a PR.

Rolling release support

Hello! Nice to see another attempt for a flake registry :)

From what I read in on the publish page, flakestry.dev currently only supports flakes working with tags, is that correct? We would like to publish Nyx here, but we don't make use of tags and mostly have daily commits.

Decoder error when showing nixus package

This package gives a decoder error: https://flakestry.dev/flake/github/infinisil/nixus/0.1.3

The Json.Decode.oneOf at json.packages failed in the following 2 ways:



(1) Problem with the value at json['aarch64-linux'].example:
    
        {}
    
    Expecting an OBJECT with a field named `type`



(2) Problem with the given value:
    
    {
            "x86_64-linux": {
                "example": {
                    "name": "deploy",
                    "type": "derivation"
                }
            },
            "aarch64-linux": {
                "example": {}
            },
            "x86_64-darwin": {
                "example": {}
            },
            "aarch64-darwin": {
                "example": {}
            }
        }
    
    Expecting null

Reverse semver order packages and checks?

First off, this is cool, thanks for building it!

I have a quick UX suggestion. Because some packages have extensive semver histories, it would be helpful if the versions were reverse-sorted, with the latest at the top. This small change could make finding the newest versions much quicker and more intuitive.

Render flake outputs and metadata

Do nix flake metadata --json and nix flake show --json representations.

These are already stored in db, we need to write an Elm parser for it and display the outputs.

Broken status badge

Despite the fact that the status badge renders fine on flakestry.dev, it appears that the badge from the clipboard is broken. Here is an example copied directly from the clipboard:

flakestry.dev

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.