-
Notifications
You must be signed in to change notification settings - Fork 16
om show
: display description for flake apps
#163
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
Comments
om show
om show
should display description for flake apps
om show
should display description for flake appsom show
should display description for flake apps
I was able to display description for a flake 🐚 nix --extra-experimental-features 'nix-command flakes' show-config --json
🐚 /nix/store/n02w2ybg9fc78grzz9i2aj49q3rysp7m-nix-2.24.0pre20240801_af10904/bin/nix flake show --legacy --allow-import-from-derivation --json --default-flake-schemas /nix/store/y8j5b7canf0la2dfnbd004m9n5zlm8l1-source .
🚀 Apps (nix run .#<name>)
╭───────┬──────────────╮
│ name │ description │
├───────┼──────────────┤
│ hello │ I say hello! │
╰───────┴──────────────╯ This involved a one-line addition to {
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!";
};
};
} In order to support this in |
Interesting.
You should open an issue on https://github.com/hercules-ci/flake-parts proposing to support app descriptions using any specific approach, then Robert can provide feedback. (Why a freeform type though? Isn't adding |
I didn’t see this message earlier. But I went ahead and created a PR: hercules-ci/flake-parts#240 Edit: You can find my reasoning for freeform type in the PR description |
Can you open PR on flake-schemas proposing this change? That discussion there might be relevant. I'm wondering why |
We could use |
See if |
{
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
inputs.flake-parts.url = "github:shivaraj-bh/flake-parts/freeform-app-type";
outputs = { flake-parts, ... }@inputs: flake-parts.lib.mkFlake { inherit inputs; } {
systems = [ "aarch64-darwin" ];
perSystem = { pkgs, ... }: {
apps.hello = {
program = pkgs.hello;
type = "app";
description = "I say hello!";
};
};
};
} Tried it with ^ ~/oss/tmp
❯ nix flake check
~/oss/tmp
❯ echo $?
0 |
|
DeterminateSystems/flake-schemas#31 is the only thing blocking this PR? I think it should be fine for us to maintain a temporary fork (of |
om show
should display description for flake appsom show
: display description for flake apps
Originally posted by @srid in #157 (comment)
Also see: #157 (comment)
The text was updated successfully, but these errors were encountered: