refactor: clean up builder interface

This commit is contained in:
DavHau 2022-05-19 16:54:32 +02:00
parent 1215fff66b
commit efe9698305
3 changed files with 3 additions and 38 deletions

View File

@ -18,7 +18,6 @@
getCyclicDependencies, # name: version: -> [ {name=; version=; } ]
getDependencies, # name: version: -> [ {name=; version=; } ]
getSource, # name: version: -> store-path
buildPackageWithOtherBuilder, # { builder, name, version }: -> drv
# Attributes
subsystemAttrs, # attrset
defaultPackageName, # string
@ -32,10 +31,6 @@
# Example:
# produceDerivation name (mkDerivation {...})
produceDerivation,
# Custom Options: (parametrize builder behavior)
# These can be passed by the user via `builderArgs`.
# All options must provide default
standalonePackageNames ? [],
nodejs ? null,
...
} @ args: let

View File

@ -258,37 +258,9 @@
conditionalOverrides = packageOverrides;
};
buildPackageWithOtherBuilder = {
builder,
name,
version,
inject ? {},
}: let
subDreamLockLoaded = utils.readDreamLock {
dreamLock =
utils.dreamLock.getSubDreamLock dreamLock name version;
};
in
callBuilder {
inherit
builder
builderArgs
fetchedSources
inject
sourceOverrides
packageOverrides
;
dreamLock =
subDreamLockLoaded.lock;
outputs = allOutputs;
};
outputs = builder (builderArgs
// {
inherit
buildPackageWithOtherBuilder
produceDerivation
dreamLock
;

View File

@ -13,11 +13,13 @@
getCyclicDependencies, # name: version: -> [ {name=; version=; } ]
getDependencies, # name: version: -> [ {name=; version=; } ]
getSource, # name: version: -> store-path
buildPackageWithOtherBuilder, # { builder, name, version }: -> drv
# to get information about the original source spec
getSourceSpec, # name: version: -> {type="git"; url=""; hash="";}
# Attributes
subsystemAttrs, # attrset
defaultPackageName, # string
defaultPackageVersion, # string
# all existing package names and versions
# attrset of pname -> versions,
# where versions is a list of version strings
packageVersions,
@ -26,10 +28,6 @@
# Example:
# produceDerivation name (mkDerivation {...})
produceDerivation,
# Custom Options: (parametrize builder behavior)
# These can be passed by the user via `builderArgs`.
# All options must provide default
standalonePackageNames ? [],
...
} @ args: let
b = builtins;