mirror of
https://github.com/nix-community/dream2nix.git
synced 2024-12-13 19:32:34 +03:00
refactor: clean up builder interface
This commit is contained in:
parent
1215fff66b
commit
efe9698305
@ -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
|
||||
|
@ -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
|
||||
;
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user