forked from extern/flakelight
Use flake description as default description value
This commit is contained in:
parent
8bfdd263ed
commit
03ee8b84b9
@ -6,12 +6,16 @@
|
|||||||
let
|
let
|
||||||
inherit (lib) isList mkOption mkOrder mapAttrs optionalAttrs;
|
inherit (lib) isList mkOption mkOrder mapAttrs optionalAttrs;
|
||||||
inherit (lib.types) listOf nullOr oneOf str;
|
inherit (lib.types) listOf nullOr oneOf str;
|
||||||
|
inherit (builtins) pathExists;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options = {
|
options = {
|
||||||
description = mkOption {
|
description = mkOption {
|
||||||
type = nullOr str;
|
type = nullOr str;
|
||||||
default = null;
|
default =
|
||||||
|
if pathExists (src + /flake.nix)
|
||||||
|
then (import (src + /flake.nix)).description or null
|
||||||
|
else null;
|
||||||
};
|
};
|
||||||
|
|
||||||
license = mkOption {
|
license = mkOption {
|
||||||
|
Loading…
Reference in New Issue
Block a user