feat(mach-nix): allow module for pythonSources

This commit is contained in:
DavHau 2023-03-23 14:30:22 +08:00
parent d0bf948eb5
commit 877c290f1e

View File

@ -7,12 +7,22 @@
}: let
l = lib // builtins;
t = l.types;
drvPartsTypes = import (drv-parts + /types) {
inherit lib;
specialArgs = {
inherit dependencySets drv-parts;
inherit (config) name version;
};
};
in {
options.mach-nix = {
pythonSources = l.mkOption {
type = t.package;
type = drvPartsTypes.drvPartOrPackage;
# if module given, convert to derivation
apply = val: val.public or val;
description = ''
A package that contains fetched python sources.
A derivation or drv-part that outputs fetched python sources.
Each single python source must be located in a subdirectory named after the package name.
'';
};