From 4a41226e755f18ff9cd0d3914698c680ee0b804c Mon Sep 17 00:00:00 2001 From: shivaraj-bh Date: Thu, 8 Aug 2024 01:15:58 +0530 Subject: [PATCH 1/4] apps: Add `meta` option This allows specifying metadata info about the flake app. This has been standardized in Nix at https://github.com/NixOS/nix/pull/11297 --- modules/apps.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/modules/apps.nix b/modules/apps.nix index 1171dcf..057ad05 100644 --- a/modules/apps.nix +++ b/modules/apps.nix @@ -34,6 +34,16 @@ let A path to an executable or a derivation with `meta.mainProgram`. ''; }; + meta = mkOption { + type = types.lazyAttrsOf lib.types.raw; + default = { }; + description = '' + Metadata information about the app. + Standardaized in Nix at . + + Note: `nix flake check` is only aware of the `description` attribute in `meta`. + ''; + }; }; }; in From 309636f1b058eb305c974882967577225a3ee29a Mon Sep 17 00:00:00 2001 From: Shivaraj B H Date: Sat, 17 Aug 2024 17:48:00 +0530 Subject: [PATCH 2/4] correct typo Co-authored-by: Robert Hensing --- modules/apps.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/apps.nix b/modules/apps.nix index 057ad05..397f32c 100644 --- a/modules/apps.nix +++ b/modules/apps.nix @@ -39,7 +39,7 @@ let default = { }; description = '' Metadata information about the app. - Standardaized in Nix at . + Standardized in Nix at . Note: `nix flake check` is only aware of the `description` attribute in `meta`. ''; From 358ab8370e9726e60c16cb299c8138228fb0301e Mon Sep 17 00:00:00 2001 From: Shivaraj B H Date: Sat, 17 Aug 2024 17:48:49 +0530 Subject: [PATCH 3/4] reference to Nix manual Co-authored-by: Robert Hensing --- modules/apps.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/apps.nix b/modules/apps.nix index 397f32c..2f30a77 100644 --- a/modules/apps.nix +++ b/modules/apps.nix @@ -37,6 +37,7 @@ let meta = mkOption { type = types.lazyAttrsOf lib.types.raw; default = { }; + # TODO refer to Nix manual 2.25 description = '' Metadata information about the app. Standardized in Nix at . From f112e301b33a8c0fbe7f65eac7a793e2dd8d3bf6 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Fri, 30 Aug 2024 15:31:45 +0200 Subject: [PATCH 4/4] Fix test --- dev/tests/eval-tests.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dev/tests/eval-tests.nix b/dev/tests/eval-tests.nix index cd57fba..35226ce 100644 --- a/dev/tests/eval-tests.nix +++ b/dev/tests/eval-tests.nix @@ -165,12 +165,14 @@ rec { hello = { program = "${pkg "a" "hello"}/bin/hello"; type = "app"; + meta = { }; }; }; b = { hello = { program = "${pkg "b" "hello"}/bin/hello"; type = "app"; + meta = { }; }; }; };