mirror of
https://github.com/nix-community/dream2nix.git
synced 2024-12-12 14:14:36 +03:00
fix: php: require-dev only for top-level packages
This commit is contained in:
parent
885061ca60
commit
dfc15e9183
@ -203,14 +203,8 @@ in {
|
||||
in
|
||||
map (l.strings.removePrefix "ext-") (l.lists.unique extensions);
|
||||
|
||||
# get require (and require-dev)
|
||||
getDependencies = pkg:
|
||||
(
|
||||
if noDev
|
||||
then []
|
||||
else (pkg.require-dev or {})
|
||||
)
|
||||
// (pkg.require or {});
|
||||
# get dependencies
|
||||
getDependencies = pkg: (pkg.require or {});
|
||||
|
||||
# resolve semvers into exact versions
|
||||
pinPackages = pkgs: let
|
||||
@ -230,7 +224,6 @@ in {
|
||||
pkg
|
||||
// {
|
||||
require = l.mapAttrs doPin (clean pkg.require);
|
||||
require-dev = l.mapAttrs doPin (clean pkg.require-dev);
|
||||
};
|
||||
in
|
||||
map doPins pkgs;
|
||||
@ -279,7 +272,13 @@ in {
|
||||
type = "path";
|
||||
path = projectSource;
|
||||
};
|
||||
inherit (composerJson) require require-dev;
|
||||
require =
|
||||
(
|
||||
if noDev
|
||||
then {}
|
||||
else composerJson.require-dev
|
||||
)
|
||||
// composerJson.require;
|
||||
}
|
||||
]
|
||||
++ resolvedPackages
|
||||
|
Loading…
Reference in New Issue
Block a user