mirror of
https://github.com/nix-community/dream2nix.git
synced 2024-09-11 14:35:30 +03:00
php: use project.name from discoverer
This commit is contained in:
parent
969cba514c
commit
39c5375a94
@ -7,10 +7,8 @@
|
||||
l = lib // builtins;
|
||||
|
||||
# get translators for the project
|
||||
getTranslators = path: let
|
||||
nodes = l.readDir path;
|
||||
in
|
||||
l.optional (nodes ? "composer.lock") "composer-lock"
|
||||
getTranslators = tree:
|
||||
l.optional (tree.files ? "composer.lock") "composer-lock"
|
||||
++ ["composer-json"];
|
||||
|
||||
# discover php projects
|
||||
@ -18,8 +16,14 @@
|
||||
currentProjectInfo = dlib.construct.discoveredProject {
|
||||
inherit subsystem;
|
||||
inherit (tree) relPath;
|
||||
name = tree.files."composer.json".jsonContent.name or tree.relPath;
|
||||
translators = getTranslators tree.fullPath;
|
||||
name =
|
||||
tree.files."composer.json".jsonContent.name
|
||||
or (
|
||||
if tree.relPath != ""
|
||||
then tree.relPath
|
||||
else "unknown"
|
||||
);
|
||||
translators = getTranslators tree;
|
||||
subsystemInfo = {};
|
||||
};
|
||||
in
|
||||
|
@ -245,7 +245,7 @@ in {
|
||||
};
|
||||
|
||||
# name of the default package
|
||||
defaultPackage = composerJson.name or "unknown";
|
||||
defaultPackage = project.name;
|
||||
|
||||
/*
|
||||
List the package candidates which should be exposed to the user.
|
||||
|
Loading…
Reference in New Issue
Block a user