From 27e4b1ed847763753c9d3a49fdaea00cbe6b7d19 Mon Sep 17 00:00:00 2001 From: dusk Date: Sat, 21 Dec 2024 05:18:09 +0900 Subject: [PATCH] fix(rust-cargo-lock): remove leading period prefix from any workspace member relative paths --- modules/dream2nix/rust-cargo-lock/translate.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/dream2nix/rust-cargo-lock/translate.nix b/modules/dream2nix/rust-cargo-lock/translate.nix index e06dc58d08..6424451a82 100644 --- a/modules/dream2nix/rust-cargo-lock/translate.nix +++ b/modules/dream2nix/rust-cargo-lock/translate.nix @@ -49,7 +49,9 @@ l.map ( memberName: let - components = l.splitString "/" memberName; + _components = l.splitString "/" memberName; + # remove leading period, its not necessary (it also causes issues with getNodeFromPath for some reason) + components = l.filter (c: c != ".") _components; in # Resolve globs if there are any if l.last components == "*" @@ -60,7 +62,7 @@ l.mapAttrsToList (name: _: "${parentDirRel}/${name}") dirs - else memberName + else l.concatStringsSep "/" components ) (rootToml.value.workspace.members or []) );