1
1
forked from extern/flakelight

Use flake description as default description value

This commit is contained in:
Archit Gupta 2023-12-05 00:02:39 -08:00
parent 8bfdd263ed
commit 03ee8b84b9

View File

@ -6,12 +6,16 @@
let
inherit (lib) isList mkOption mkOrder mapAttrs optionalAttrs;
inherit (lib.types) listOf nullOr oneOf str;
inherit (builtins) pathExists;
in
{
options = {
description = mkOption {
type = nullOr str;
default = null;
default =
if pathExists (src + /flake.nix)
then (import (src + /flake.nix)).description or null
else null;
};
license = mkOption {