mirror of
https://github.com/nix-community/dream2nix.git
synced 2024-09-11 14:35:30 +03:00
fix: specify subsystems in discoverers
This commit is contained in:
parent
13fd0fa908
commit
73e575078e
@ -42,12 +42,7 @@ modules:
|
||||
import_ = collectedModules:
|
||||
lib.mapAttrs
|
||||
(name: description:
|
||||
(
|
||||
import description.path {
|
||||
inherit dlib lib;
|
||||
inherit (description) name subsystem;
|
||||
}
|
||||
)
|
||||
(import description.path {inherit dlib lib;})
|
||||
// {inherit (description) name subsystem;})
|
||||
(
|
||||
lib.foldl'
|
||||
|
@ -1,7 +1,6 @@
|
||||
{
|
||||
dlib,
|
||||
lib,
|
||||
subsystem,
|
||||
...
|
||||
}: let
|
||||
l = lib // builtins;
|
||||
@ -119,10 +118,10 @@
|
||||
|
||||
makeWorkspaceProjectInfo = tree: wsRelPath: parentInfo:
|
||||
dlib.construct.discoveredProject {
|
||||
inherit subsystem;
|
||||
name =
|
||||
(getPackageJson "${tree.fullPath}/${wsRelPath}").name
|
||||
or "${parentInfo.name}/${wsRelPath}";
|
||||
subsystem = "nodejs";
|
||||
relPath = dlib.sanitizeRelativePath "${tree.relPath}/${wsRelPath}";
|
||||
translators =
|
||||
l.unique
|
||||
@ -162,9 +161,9 @@
|
||||
else let
|
||||
# project info of current directory
|
||||
currentProjectInfo = dlib.construct.discoveredProject {
|
||||
inherit subsystem;
|
||||
inherit (tree) relPath;
|
||||
name = tree.files."package.json".jsonContent.name or tree.relPath;
|
||||
subsystem = "nodejs";
|
||||
translators = getTranslatorNames tree;
|
||||
subsystemInfo = l.optionalAttrs (workspaces != []) {
|
||||
workspaces =
|
||||
|
@ -1,7 +1,6 @@
|
||||
{
|
||||
dlib,
|
||||
lib,
|
||||
subsystem,
|
||||
...
|
||||
}: let
|
||||
l = lib // builtins;
|
||||
@ -14,7 +13,6 @@
|
||||
# discover php projects
|
||||
discover = {tree}: let
|
||||
currentProjectInfo = dlib.construct.discoveredProject {
|
||||
inherit subsystem;
|
||||
inherit (tree) relPath;
|
||||
name =
|
||||
tree.files."composer.json".jsonContent.name
|
||||
@ -23,6 +21,7 @@
|
||||
then tree.relPath
|
||||
else "unknown"
|
||||
);
|
||||
subsystem = "php";
|
||||
translators = getTranslators tree;
|
||||
subsystemInfo = {};
|
||||
};
|
||||
|
@ -1,7 +1,6 @@
|
||||
{
|
||||
dlib,
|
||||
lib,
|
||||
subsystem,
|
||||
...
|
||||
}: let
|
||||
l = lib // builtins;
|
||||
@ -24,7 +23,6 @@
|
||||
then
|
||||
[
|
||||
(dlib.construct.discoveredProject {
|
||||
inherit subsystem;
|
||||
relPath = tree.relPath;
|
||||
name =
|
||||
if topLevel
|
||||
@ -33,6 +31,7 @@
|
||||
l.unsafeDiscardStringContext
|
||||
(l.last
|
||||
(l.splitString "/" (l.removeSuffix "/" "${tree.fullPath}")));
|
||||
subsystem = "python";
|
||||
translators = ["pip"];
|
||||
subsystemInfo.pythonAttr = "python3";
|
||||
})
|
||||
|
@ -1,7 +1,6 @@
|
||||
{
|
||||
dlib,
|
||||
lib,
|
||||
subsystem,
|
||||
...
|
||||
}: let
|
||||
l = lib // builtins;
|
||||
@ -95,7 +94,8 @@
|
||||
then
|
||||
[
|
||||
(dlib.construct.discoveredProject {
|
||||
inherit subsystem translators;
|
||||
inherit translators;
|
||||
subsystem = "rust";
|
||||
relPath = tree.relPath;
|
||||
name = cargoToml.package.name or tree.relPath;
|
||||
subsystemInfo = {inherit crates workspaceMembers;};
|
||||
|
Loading…
Reference in New Issue
Block a user