mirror of
https://github.com/nix-community/dream2nix.git
synced 2024-12-18 20:11:33 +03:00
fix: php: composer-lock use dist path sources
This commit is contained in:
parent
7738907d7b
commit
12791f09ef
@ -278,16 +278,29 @@ in {
|
||||
(getRequire rawObj);
|
||||
|
||||
sourceSpec = rawObj: finalObj:
|
||||
if rawObj.source.type == "path"
|
||||
if rawObj ? "source" && rawObj.source.type == "path"
|
||||
then {
|
||||
inherit (rawObj.source) type path;
|
||||
rootName = null;
|
||||
rootVersion = null;
|
||||
}
|
||||
else {
|
||||
else if rawObj ? "source" && rawObj.source.type == "git"
|
||||
then {
|
||||
inherit (rawObj.source) type url;
|
||||
rev = rawObj.source.reference;
|
||||
};
|
||||
}
|
||||
else if rawObj ? "dist" && rawObj.dist.type == "path"
|
||||
then {
|
||||
inherit (rawObj.dist) type;
|
||||
path = rawObj.dist.url;
|
||||
rootName = null;
|
||||
rootVersion = null;
|
||||
}
|
||||
else
|
||||
l.abort ''
|
||||
Cannot find source for ${finalObj.name}@${finalObj.version},
|
||||
rawObj: ${l.toJSON rawObj}
|
||||
'';
|
||||
};
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user