From 882f53eebb767095a18f8770f190f80087545c78 Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Wed, 29 Jan 2025 12:35:44 +0100 Subject: fix(by-name-overlay)!: Remove the `coImportFunction` feature This enforces an unreasonable file system relationship between two directories. For example, if `dir/a` exists `dir2/a` must also exist. Using this is rather difficult and cumbersome. --- by-name-overlay.nix | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'by-name-overlay.nix') diff --git a/by-name-overlay.nix b/by-name-overlay.nix index 84393b0..3e52e64 100644 --- a/by-name-overlay.nix +++ b/by-name-overlay.nix @@ -14,8 +14,6 @@ baseDirectory, fileName, finalizeFunction ? name: value: value, - coImportsNameFunction ? null, - coImportsWarnMessageObject ? null, useShards ? true, }: let # Takes a list of attrs as input and returns one merged attr set. @@ -60,12 +58,6 @@ namesForElement = shard: _type: let mkPath = name: type: let path = baseDirectory + "/${shard}/${name}" + "/${fileName}"; - coImportPath = - if coImportsNameFunction != null - then - coImportsNameFunction - {inherit shard name;} - else path; in if builtins.pathExists path then @@ -73,9 +65,7 @@ then # The `namesForShard` function should have already printed a warning. null - else if builtins.pathExists coImportPath - then path - else warn "'${builtins.toString coImportPath}' does not exist. Should include ${coImportsWarnMessageObject} for '${shard}/${name}'" path + else path else warn "'${builtins.toString path}' does not exist. Skipped" null; in filterAttrs (name: value: value != null) -- cgit 1.4.1