mirror of
https://codeberg.org/icewind/mill-scale.git
synced 2026-06-03 09:54:19 +02:00
allow overwriting cargo toml/lock location
This commit is contained in:
parent
a50219c7ee
commit
8a5baa8225
2 changed files with 30 additions and 9 deletions
|
|
@ -2,16 +2,17 @@
|
|||
lib,
|
||||
src,
|
||||
config,
|
||||
cargoLock,
|
||||
}: let
|
||||
inherit (builtins) readFile pathExists attrNames hasAttr;
|
||||
inherit (lib) map intersectLists foldl splitString getAttrFromPath;
|
||||
|
||||
cargoLockDeps =
|
||||
if pathExists (src + /Cargo.lock)
|
||||
if pathExists cargoLock
|
||||
then let
|
||||
cargoLock = fromTOML (readFile (src + /Cargo.lock));
|
||||
cargoLockToml = fromTOML (readFile cargoLock);
|
||||
in
|
||||
map (package: package.name) cargoLock.package
|
||||
map (package: package.name) cargoLockToml.package
|
||||
else [];
|
||||
availableAutoDeps = import ./deps.nix;
|
||||
detectedDeps = intersectLists cargoLockDeps (attrNames availableAutoDeps);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue