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=; } ]
|
getCyclicDependencies, # name: version: -> [ {name=; version=; } ]
|
||||||
getDependencies, # name: version: -> [ {name=; version=; } ]
|
getDependencies, # name: version: -> [ {name=; version=; } ]
|
||||||
getSource, # name: version: -> store-path
|
getSource, # name: version: -> store-path
|
||||||
buildPackageWithOtherBuilder, # { builder, name, version }: -> drv
|
|
||||||
# Attributes
|
# Attributes
|
||||||
subsystemAttrs, # attrset
|
subsystemAttrs, # attrset
|
||||||
defaultPackageName, # string
|
defaultPackageName, # string
|
||||||
@ -32,10 +31,6 @@
|
|||||||
# Example:
|
# Example:
|
||||||
# produceDerivation name (mkDerivation {...})
|
# produceDerivation name (mkDerivation {...})
|
||||||
produceDerivation,
|
produceDerivation,
|
||||||
# Custom Options: (parametrize builder behavior)
|
|
||||||
# These can be passed by the user via `builderArgs`.
|
|
||||||
# All options must provide default
|
|
||||||
standalonePackageNames ? [],
|
|
||||||
nodejs ? null,
|
nodejs ? null,
|
||||||
...
|
...
|
||||||
} @ args: let
|
} @ args: let
|
||||||
|
@ -258,37 +258,9 @@
|
|||||||
conditionalOverrides = packageOverrides;
|
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
|
outputs = builder (builderArgs
|
||||||
// {
|
// {
|
||||||
inherit
|
inherit
|
||||||
buildPackageWithOtherBuilder
|
|
||||||
produceDerivation
|
produceDerivation
|
||||||
dreamLock
|
dreamLock
|
||||||
;
|
;
|
||||||
|
@ -13,11 +13,13 @@
|
|||||||
getCyclicDependencies, # name: version: -> [ {name=; version=; } ]
|
getCyclicDependencies, # name: version: -> [ {name=; version=; } ]
|
||||||
getDependencies, # name: version: -> [ {name=; version=; } ]
|
getDependencies, # name: version: -> [ {name=; version=; } ]
|
||||||
getSource, # name: version: -> store-path
|
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
|
# Attributes
|
||||||
subsystemAttrs, # attrset
|
subsystemAttrs, # attrset
|
||||||
defaultPackageName, # string
|
defaultPackageName, # string
|
||||||
defaultPackageVersion, # string
|
defaultPackageVersion, # string
|
||||||
|
# all existing package names and versions
|
||||||
# attrset of pname -> versions,
|
# attrset of pname -> versions,
|
||||||
# where versions is a list of version strings
|
# where versions is a list of version strings
|
||||||
packageVersions,
|
packageVersions,
|
||||||
@ -26,10 +28,6 @@
|
|||||||
# Example:
|
# Example:
|
||||||
# produceDerivation name (mkDerivation {...})
|
# produceDerivation name (mkDerivation {...})
|
||||||
produceDerivation,
|
produceDerivation,
|
||||||
# Custom Options: (parametrize builder behavior)
|
|
||||||
# These can be passed by the user via `builderArgs`.
|
|
||||||
# All options must provide default
|
|
||||||
standalonePackageNames ? [],
|
|
||||||
...
|
...
|
||||||
} @ args: let
|
} @ args: let
|
||||||
b = builtins;
|
b = builtins;
|
||||||
|
Loading…
Reference in New Issue
Block a user