Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add shortDescription to appsSchema #31

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

shivaraj-bh
Copy link

Flake apps could benefit from a description. As an example, here’s a simple flake:

{
  inputs.nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
  outputs = { self, nixpkgs, ... }:{
    apps.aarch64-darwin.hello = {
      program = "${nixpkgs.lib.getExe nixpkgs.legacyPackages.aarch64-darwin.hello}";
      type = "app";
      description = "I say hello!";
    };
  };
}

and the corresponding nix flake show --default-flake-schemas github:shivaraj-bh/flake-schemas/apps --json output, where nix is compiled from https://github.com/DeterminateSystems/nix-src/tree/flake-schemas:

{
  "apps": {
    "doc": "The `apps` output provides commands available via `nix run`.\n",
    "output": {
      "children": {
        "aarch64-darwin": {
          "children": {
            "hello": {
              "leaf": true,
              "shortDescription": "I say hello!",
              "what": "app"
            }
          }
        }
      }
    }
  },
  ...
}

Question

Should we stick to the meta attribute of derivations for apps as well?

@shivaraj-bh
Copy link
Author

description for flake apps should be standardised after NixOS/nix#11297

@@ -58,6 +58,7 @@
&& app ? program
&& builtins.isString app.program;
what = "app";
shortDescription = app.description or "";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Per NixOS/nix#11297, this should be app.meta.description, right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants