From d4bc4e3a849c569ff0bfef9a8ddf8eac476a0927 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Na=C3=AFm=20Favier?= Date: Thu, 26 Aug 2021 09:43:23 +0200 Subject: [PATCH] Strip leading slash from option sources (#348) --- flake-info/src/commands/flake_info.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake-info/src/commands/flake_info.nix b/flake-info/src/commands/flake_info.nix index 6c67aa7..520553b 100644 --- a/flake-info/src/commands/flake_info.nix +++ b/flake-info/src/commands/flake_info.nix @@ -75,7 +75,7 @@ let applyOnAttr = n: f: lib.optionalAttrs (lib.hasAttr n opt) { ${n} = f opt.${n}; }; mkDeclaration = decl: let - discard = lib.concatStringsSep "/" (lib.take 4 (lib.splitString "/" decl)); + discard = lib.concatStringsSep "/" (lib.take 4 (lib.splitString "/" decl)) + "/"; path = if lib.hasPrefix builtins.storeDir decl then lib.removePrefix discard decl else decl; in path;