Skip to content

Add shortDescription to appsSchema#31

Open
shivaraj-bh wants to merge 1 commit intoDeterminateSystems:mainfrom
shivaraj-bh:apps
Open

Add shortDescription to appsSchema#31
shivaraj-bh wants to merge 1 commit intoDeterminateSystems:mainfrom
shivaraj-bh:apps

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

&& 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