diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 4615ba14..df7a28c2 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -143,59 +143,114 @@ or `nix run ./ci#docs` -# Writing tests +# Writing Tests You may also include a `check.nix` file in your module's directory. -It will be called via `pkgs.callPackage`, provided with the flake `self` value. -(i.e. `pkgs.callPackage your_check.nix { inherit self; }`) +It will be called via `pkgs.callPackage`, provided with the flake `self` value, as well as a test-library `tlib` value. +(i.e. `pkgs.callPackage your_check.nix { inherit self tlib; }`) -It should build a derivation which tests the wrapper derivation as best you can. +## Using the testing Library `tlib` -If a command fails, it fails the test. If it builds the derivation successfully, it passes the test. +We provide a testing library `tlib` that provides an easy to use interface to write tests specifically for wrapper modules. -If the program gives options for running the program to check the generated configuration is correct, you should do that. - -Sometimes it is not easily possible to run the program within a derivation, in those cases, searching the wrapper derivation and other generated files and their contents is also acceptable. - -Example: +The general structure is as follows: ```nix { - pkgs, - runCommand, self, + tlib, + ... }: + let - gitWrapped = self.wrappers.git.wrap { - inherit pkgs; - settings = { - user = { - name = "Test User"; - email = "test@example.com"; - }; - }; - }; + inherit (tlib) + runTest + runTests + ; in -runCommand "git-test" { } '' - "${gitWrapped}/bin/git" config user.name | grep -q "Test User" - "${gitWrapped}/bin/git" config user.email | grep -q "test@example.com" - touch $out -'' +runTests { wrapperModule = self.wrappers.; } [ + (runTest "description of test1" [ assertion1, ..., assertionN]) + (runTest "description of test2" [ assertion1, ..., assertionN]) + ... + (runTest "description of testN" [ assertion1, ..., assertionN]) +] + +``` + +Tests will only be run on the systems defined in `wrapperModule.meta.platforms`. + +Individual tests are then specified using `runTest`. +Each test accepts a name as the first argument and a list of assertions +(if a single assertion is provided directly, it will be converted to a list). + +An assertion is a bash command in the form of a string. +If the command is run successfully (exit code 0), the assertion passes. +Use `stderr` to log descriptive messages about the failed assertion. + +We provide a helper method `lib.createAssertion` for this: + +```nix +isDirectory = + path: + createAssertion { + cond = ''[ -d "${path}" ]''; # <-- the condition to be asserted + message = "No such directory ${path}"; # <-- the message to print to stderr if + }; # the assertion is violated + +``` + +Pre-defined assertions like `isDirectory` or `isFile` are already available in tlib. +Feel free to contribute more if you find new ones that other maintainers might benefit from. + +Instead of providing a list of assertions directly, you can also provide a function providing a wrapper: + +```nix +runTest "my test description" (wrapper: [ + (isDirectory wrapper.passthru.configuration.) +]) ``` -If your module declares a list of valid platforms via its `meta.platforms` option, you should disable your test on the relevant platforms like so: +The provided wrapper is instantiated from the `wrapperModule` that was passed to `runTests`. + +This wrapper instance does not set any options apart from `pkgs`. +In most cases, you want to test the wrapper by providing a specific configuration. + +You can do this by providing an `attrs` instead of a string to `runTest` and provide a config there: + +```nix +(runTest + { + name = "if nix-direnv is enabled then lib/nix-direnv.sh should exists"; # <-- name of the test + config.nix-direnv.enable = true; # <-- provide test-specific config + } + (wrapper: [ # <-- this wrapper has the above config applied + # ({ wrapper, config }: [ # <-- or like this, if you also want to access the wrapper config + (isDirectory (getDotdir wrapper)) + (isFile "${getDotdir wrapper}/lib/nix-direnv.sh") + ]) +) +``` + +Of course, nothing keeps you from instantiating your wrappers from scratch. The above direnv example could +equivalently be written as: ```nix -if builtins.elem pkgs.stdenv.hostPlatform.system self.wrappers.waybar.meta.platforms then - pkgs.runCommand "waybar-test" { } '' - "${waybarWrapped}/bin/waybar" --version | grep -q "${waybarWrapped.version}" - touch $out - '' -else - null +(runTest "if nix-direnv is enabled then lib/nix-direnv.sh should exists" ( + let + wrapper = self.wrappers.direnv.wrap { + inherit pkgs; + nix-direnv.enable = true; + }; + in + [ + (isDirectory (getDotdir wrapper)) + (isFile "${getDotdir wrapper}/lib/nix-direnv.sh") + ] +)) ``` + If you are writing a helper module, or something very complex, you may wish to have multiple derivations. Simply return a set of them instead. # Commit Messages diff --git a/ci/checks/all-modules-have-maintainers.nix b/ci/checks/all-modules-have-maintainers.nix index 8331fa51..cb952874 100644 --- a/ci/checks/all-modules-have-maintainers.nix +++ b/ci/checks/all-modules-have-maintainers.nix @@ -1,6 +1,7 @@ { pkgs, self, + ... }: let diff --git a/ci/checks/apply.nix b/ci/checks/apply.nix index 63320c2e..093b1d2a 100644 --- a/ci/checks/apply.nix +++ b/ci/checks/apply.nix @@ -1,6 +1,7 @@ { pkgs, self, + ... }: # TODO: make sure theres no other stuff passing on accident in here let diff --git a/ci/checks/formatting.nix b/ci/checks/formatting.nix index 9b2c161b..3a7d0e50 100644 --- a/ci/checks/formatting.nix +++ b/ci/checks/formatting.nix @@ -1,6 +1,7 @@ { pkgs, self, + ... }: pkgs.runCommand "formatting-check" { } '' diff --git a/ci/checks/makeCustomizable.nix b/ci/checks/makeCustomizable.nix index 02d61343..d89f284a 100644 --- a/ci/checks/makeCustomizable.nix +++ b/ci/checks/makeCustomizable.nix @@ -1,6 +1,7 @@ { pkgs, self, + ... }: let luaEnv = self.lib.makeCustomizable "withPackages" { diff --git a/ci/checks/meta-maintainers.nix b/ci/checks/meta-maintainers.nix index f06d7017..3e5504bb 100644 --- a/ci/checks/meta-maintainers.nix +++ b/ci/checks/meta-maintainers.nix @@ -1,6 +1,7 @@ { pkgs, self, + ... }: let diff --git a/ci/checks/meta-platforms.nix b/ci/checks/meta-platforms.nix index acb18953..fdf9af38 100644 --- a/ci/checks/meta-platforms.nix +++ b/ci/checks/meta-platforms.nix @@ -1,6 +1,7 @@ { pkgs, self, + ... }: let diff --git a/ci/checks/outputName-tests.nix b/ci/checks/outputName-tests.nix index 22915fb2..ba3feadc 100644 --- a/ci/checks/outputName-tests.nix +++ b/ci/checks/outputName-tests.nix @@ -1,6 +1,7 @@ { pkgs, self, + ... }: let diff --git a/ci/checks/subwrappermodule.nix b/ci/checks/subwrappermodule.nix index 58aca0e8..613be394 100644 --- a/ci/checks/subwrappermodule.nix +++ b/ci/checks/subwrappermodule.nix @@ -1,6 +1,7 @@ { pkgs, self, + ... }: let evaled = self.lib.evalModule [ diff --git a/ci/checks/toKdl.nix b/ci/checks/toKdl.nix index 3e58b83a..66f29b6f 100644 --- a/ci/checks/toKdl.nix +++ b/ci/checks/toKdl.nix @@ -1,6 +1,7 @@ { pkgs, self, + ... }: let lib = pkgs.lib; diff --git a/ci/checks/types-file.nix b/ci/checks/types-file.nix index 1340b9ae..fb684d60 100644 --- a/ci/checks/types-file.nix +++ b/ci/checks/types-file.nix @@ -1,6 +1,7 @@ { pkgs, self, + ... }: let lib = pkgs.lib; diff --git a/ci/flake.nix b/ci/flake.nix index e0d45780..5d6e3965 100644 --- a/ci/flake.nix +++ b/ci/flake.nix @@ -20,6 +20,7 @@ inherit system; config.allowUnfree = true; }; + tlib = pkgs.callPackage ./test-lib.nix { inherit self; }; # Load checks from ci/checks/ directory coreAndCiChecks = lib.pipe ./checks [ @@ -43,9 +44,9 @@ name = "${prefix}-${name}"; inherit value; }; - result = pkgs.callPackage value { inherit self; }; + result = pkgs.callPackage value { inherit self tlib; }; in - if isNull result then + if result == null then [ ] else if result ? outPath then [ (helper prefix name result) ] diff --git a/ci/test-lib.nix b/ci/test-lib.nix new file mode 100644 index 00000000..463342a2 --- /dev/null +++ b/ci/test-lib.nix @@ -0,0 +1,115 @@ +{ + self, + lib, + runCommand, + stdenv, + pkgs, + ... +}: +let + createAssertion = + { cond, message }: + '' + (${cond}) || (echo "${message}" >&2; return 1) + ''; + runTests = + settings: tests: + let + wrapper = settings.wrapperModule.apply { inherit pkgs; }; + name = settings.name or "${wrapper.binName}-test"; + testsWithWrapper = lib.map (test: test wrapper) tests; + in + if builtins.elem stdenv.hostPlatform.system wrapper.meta.platforms then + lib.trace "Running test!" runCommand name { } '' + ${lib.concatStringsSep "\n\n" testsWithWrapper} + touch $out + '' + else + lib.trace "Skipping test..." null; + + runTest = + nameOrSettings: assertions: wrapper: + let + settings = + if (lib.isAttrs nameOrSettings) && (nameOrSettings ? name) then + nameOrSettings + else if lib.isString nameOrSettings then + { + name = nameOrSettings; + } + else + throw '' + Invalid argument for `runTest`. + The first argument must be either a string (the test name) or an attrs + matching { name, config ? { } }, but got: + + ${lib.toJSON nameOrSettings} + ''; + in + runTestWithConfig settings assertions wrapper; + + runTestWithConfig = + { + name, + config ? { }, + }: + assertions: wrapper: + let + wrapperWithConfig = wrapper.wrap config; + assertions' = + if lib.isFunction assertions then + # Shorthand notation (wrapper: assertions) + if lib.functionArgs assertions == { } then + assertions wrapperWithConfig + else + assertions { + wrapper = wrapperWithConfig; + config = wrapperWithConfig.passthru.configuration; + } + else + assertions; + in + '' + run() { + ${lib.concatMapStringsSep " && " (a: "(${a})") (lib.toList assertions')} + } + + run || (echo 'test "${name}" failed' >&2 && exit 1) + ''; +in +{ + inherit + createAssertion + runTests + runTest + runTestWithConfig + ; + isDirectory = + path: + createAssertion { + cond = ''[ -d "${path}" ]''; + message = "No such directory ${path}"; + }; + + isFile = + path: + createAssertion { + cond = ''[ -f "${path}" ]''; + message = "No such file ${path}"; + }; + + notIsFile = + path: + createAssertion { + cond = ''[ ! -f "${path}" ]''; + message = "File ${path} should not exist"; + }; + + fileContains = + file: pattern: + createAssertion { + cond = ''grep -q '${pattern}' "${file}"''; + message = "Pattern '${pattern}' not found in ${file}"; + }; + +} diff --git a/maintainers/default.nix b/maintainers/default.nix index 71c8b112..8a14413f 100644 --- a/maintainers/default.nix +++ b/maintainers/default.nix @@ -61,6 +61,11 @@ githubId = 8916363; name = "Nikita Wootten"; }; + zenoli = { + name = "Zenoli"; + github = "zenoli"; + githubId = 8073528; + }; pengolord = { name = "pengo"; email = "pbalternates@gmail.com"; diff --git a/modules/makeWrapper/checks/args-direct.nix b/modules/makeWrapper/checks/args-direct.nix index 554ef1ee..b17bb174 100644 --- a/modules/makeWrapper/checks/args-direct.nix +++ b/modules/makeWrapper/checks/args-direct.nix @@ -1,6 +1,7 @@ { pkgs, self, + ... }: let diff --git a/modules/makeWrapper/checks/env-null.nix b/modules/makeWrapper/checks/env-null.nix index 1055d1e2..7c647238 100644 --- a/modules/makeWrapper/checks/env-null.nix +++ b/modules/makeWrapper/checks/env-null.nix @@ -1,6 +1,7 @@ { pkgs, self, + ... }: let diff --git a/modules/makeWrapper/checks/flags-equals-separator.nix b/modules/makeWrapper/checks/flags-equals-separator.nix index 2f1ba67f..30cc24a6 100644 --- a/modules/makeWrapper/checks/flags-equals-separator.nix +++ b/modules/makeWrapper/checks/flags-equals-separator.nix @@ -1,6 +1,7 @@ { pkgs, self, + ... }: let diff --git a/modules/makeWrapper/checks/flags-list.nix b/modules/makeWrapper/checks/flags-list.nix index c70e6b86..bc57773e 100644 --- a/modules/makeWrapper/checks/flags-list.nix +++ b/modules/makeWrapper/checks/flags-list.nix @@ -1,6 +1,7 @@ { pkgs, self, + ... }: let diff --git a/modules/makeWrapper/checks/flags-null-false.nix b/modules/makeWrapper/checks/flags-null-false.nix index 72cce64d..4f4c591d 100644 --- a/modules/makeWrapper/checks/flags-null-false.nix +++ b/modules/makeWrapper/checks/flags-null-false.nix @@ -1,6 +1,7 @@ { pkgs, self, + ... }: let diff --git a/modules/makeWrapper/checks/flags-space-separator.nix b/modules/makeWrapper/checks/flags-space-separator.nix index 68e0d929..fe396a63 100644 --- a/modules/makeWrapper/checks/flags-space-separator.nix +++ b/modules/makeWrapper/checks/flags-space-separator.nix @@ -1,6 +1,7 @@ { pkgs, self, + ... }: let diff --git a/modules/makeWrapper/checks/flags.nix b/modules/makeWrapper/checks/flags.nix index 2ebf1213..9e1080e8 100644 --- a/modules/makeWrapper/checks/flags.nix +++ b/modules/makeWrapper/checks/flags.nix @@ -1,6 +1,7 @@ { pkgs, self, + ... }: let diff --git a/modules/symlinkScript/checks/filesToExclude-glob.nix b/modules/symlinkScript/checks/filesToExclude-glob.nix index c630230a..b2606f0c 100644 --- a/modules/symlinkScript/checks/filesToExclude-glob.nix +++ b/modules/symlinkScript/checks/filesToExclude-glob.nix @@ -1,6 +1,7 @@ { pkgs, self, + ... }: let diff --git a/modules/symlinkScript/checks/filesToExclude-more.nix b/modules/symlinkScript/checks/filesToExclude-more.nix index e0309596..3aa00cc7 100644 --- a/modules/symlinkScript/checks/filesToExclude-more.nix +++ b/modules/symlinkScript/checks/filesToExclude-more.nix @@ -1,6 +1,7 @@ { pkgs, self, + ... }: let diff --git a/modules/symlinkScript/checks/filesToExclude.nix b/modules/symlinkScript/checks/filesToExclude.nix index ef6782fd..53e2b073 100644 --- a/modules/symlinkScript/checks/filesToExclude.nix +++ b/modules/symlinkScript/checks/filesToExclude.nix @@ -1,6 +1,7 @@ { pkgs, self, + ... }: let diff --git a/modules/symlinkScript/checks/filesToPatch.nix b/modules/symlinkScript/checks/filesToPatch.nix index 6010a2ff..af1fa392 100644 --- a/modules/symlinkScript/checks/filesToPatch.nix +++ b/modules/symlinkScript/checks/filesToPatch.nix @@ -1,6 +1,7 @@ { pkgs, self, + ... }: let diff --git a/wrapperModules/a/aria2/check.nix b/wrapperModules/a/aria2/check.nix index 03462222..657c3b09 100644 --- a/wrapperModules/a/aria2/check.nix +++ b/wrapperModules/a/aria2/check.nix @@ -1,6 +1,7 @@ { pkgs, self, + ... }: let aria2Wrapper = self.wrappers.aria2.wrap { diff --git a/wrapperModules/a/atool/check.nix b/wrapperModules/a/atool/check.nix index 8ddefd45..88255abb 100644 --- a/wrapperModules/a/atool/check.nix +++ b/wrapperModules/a/atool/check.nix @@ -1,4 +1,4 @@ -{ pkgs, self }: +{ pkgs, self, ... }: let atoolWrapped = self.wrappers.atool.wrap { inherit pkgs; diff --git a/wrapperModules/c/cava/check.nix b/wrapperModules/c/cava/check.nix index 92d36f78..66d4f57b 100644 --- a/wrapperModules/c/cava/check.nix +++ b/wrapperModules/c/cava/check.nix @@ -1,6 +1,7 @@ { pkgs, self, + ... }: let cavaWrapper = self.wrappers.cava.wrap { inherit pkgs; }; diff --git a/wrapperModules/c/claude-code/check.nix b/wrapperModules/c/claude-code/check.nix index fdf993de..7a27347b 100644 --- a/wrapperModules/c/claude-code/check.nix +++ b/wrapperModules/c/claude-code/check.nix @@ -1,6 +1,7 @@ { pkgs, self, + ... }: let claudeCodeWrapped = self.wrappers.claude-code.wrap { diff --git a/wrapperModules/d/direnv/check.nix b/wrapperModules/d/direnv/check.nix new file mode 100644 index 00000000..7327031f --- /dev/null +++ b/wrapperModules/d/direnv/check.nix @@ -0,0 +1,151 @@ +{ + self, + tlib, + ... +}: + +let + inherit (tlib) + fileContains + isDirectory + isFile + notIsFile + runTest + runTests + ; + getDotdir = + wrapper: + let + cfg = wrapper.passthru.configuration; + dotdir = "${wrapper}/${cfg.configDirname}"; + in + dotdir; +in +runTests { wrapperModule = self.wrappers.direnv; } [ + + (runTest "wrapper should output correct version" (wrapper: '' + "${wrapper}/bin/direnv" --version | grep -q "${wrapper.version}" + '')) + + (runTest + { + name = "if nix-direnv is enabled then lib/nix-direnv.sh should exists"; + config.nix-direnv.enable = true; + } + (wrapper: [ + (isDirectory (getDotdir wrapper)) + (isFile "${getDotdir wrapper}/lib/nix-direnv.sh") + ]) + ) + + (runTest + { + name = "if nix-direnv is disabled then lib/nix-direnv.sh should not exist"; + config.nix-direnv.enable = false; + } + (wrapper: [ + (isDirectory (getDotdir wrapper)) + (notIsFile "${getDotdir wrapper}/lib/nix-direnv.sh") + ]) + ) + + (runTest + { + name = "if mise is enabled then lib/mise.sh should exists"; + config.mise.enable = true; + } + (wrapper: [ + (isDirectory (getDotdir wrapper)) + (isFile "${getDotdir wrapper}/lib/mise.sh") + ]) + ) + + (runTest + { + name = "if mise is disabled then lib/mise.sh should not exist"; + config.mise.enable = false; + } + (wrapper: [ + (isDirectory (getDotdir wrapper)) + (notIsFile "${getDotdir wrapper}/lib/mise.sh") + ]) + ) + + (runTest + { + name = "if a lib-script is set then it should be generated"; + config.lib."foo.sh" = "echo foo"; + } + ( + { wrapper, config }: + let + dotdir = getDotdir wrapper; + libScriptFile = dotdir + "/lib/foo.sh"; + in + [ + (isDirectory dotdir) + (isFile libScriptFile) + (fileContains libScriptFile config.lib."foo.sh") + ] + ) + ) + + (runTest + { + name = "if silent mode is enabled then log settings should be set"; + config.silent = true; + } + ( + wrapper: + let + dotdir = getDotdir wrapper; + direnvTomlFile = dotdir + "/direnv.toml"; + in + [ + (isDirectory dotdir) + (isFile direnvTomlFile) + (fileContains direnvTomlFile "log_format") + (fileContains direnvTomlFile "log_filter") + ] + ) + ) + + (runTest + { + name = "if extraConfig is working"; + config.extraConfig.fooSection.fooKey = "fooValue;"; + } + ( + wrapper: + let + dotdir = getDotdir wrapper; + direnvTomlFile = dotdir + "/direnv.toml"; + in + [ + (isDirectory dotdir) + (isFile direnvTomlFile) + (fileContains direnvTomlFile "\\[fooSection\\]") + (fileContains direnvTomlFile "fooKey.*fooValue") + ] + ) + ) + + (runTest + { + name = "if direnvrc is working"; + config.direnvrc = "echo foo"; + } + ( + { wrapper, config }: + let + dotdir = getDotdir wrapper; + direnvrcFile = dotdir + "/direnvrc"; + in + [ + (isDirectory dotdir) + (isFile direnvrcFile) + (fileContains direnvrcFile config.direnvrc) + ] + ) + ) +] diff --git a/wrapperModules/d/direnv/module.nix b/wrapperModules/d/direnv/module.nix new file mode 100644 index 00000000..0bfebb59 --- /dev/null +++ b/wrapperModules/d/direnv/module.nix @@ -0,0 +1,119 @@ +{ + config, + lib, + wlib, + pkgs, + ... +}: +let + tomlFmt = pkgs.formats.toml { }; + direnvToml = tomlFmt.generate "direnv.toml" config.extraConfig; + direnvDotdir = "${config.wrapper.${config.outputName}}/${config.configDirname}"; +in +{ + imports = [ wlib.modules.default ]; + options = { + configDirname = lib.mkOption { + type = lib.types.str; + default = "${config.binName}-dot-dir"; + description = "Name of the directory which is created as the dotdir in the wrapper output"; + }; + silent = lib.mkEnableOption "silent mode, that is, disabling direnv logging"; + direnvrc = lib.mkOption { + type = lib.types.lines; + description = "Content of `$DIRENV_CONFIG/direnv`"; + default = ""; + }; + nix-direnv = { + enable = lib.mkEnableOption "nix-direnv integration"; + package = lib.mkPackageOption pkgs "nix-direnv" { }; + }; + mise = { + enable = lib.mkEnableOption "mise integration"; + package = lib.mkPackageOption pkgs "mise" { }; + }; + lib = lib.mkOption { + type = with lib.types; attrsOf lines; + description = '' + Configuration of [extension files](https://direnv.net/#the-stdlib) + that will be created at `$DIRENV_CONFIG/lib/*.sh` + ''; + example = { + "my-lib-script.sh" = "echo 'content of my-lib-script.sh'"; + }; + default = { }; + }; + extraConfig = lib.mkOption { + inherit (tomlFmt) type; + default = { }; + description = '' + Configuration of direnv.toml. + See + ''; + }; + }; + config = { + package = lib.mkDefault pkgs.direnv; + env = { + # We currently do not inject `DIRENV_CONFIG` for the reasons outlined in + # meta.description.pre. + + # **IMPORTANT** Using `placeholder "out"` here seems to cause issues if this wrapper is + # built inside a subWrapperModule (for example within the zshWrapper) as it refers + # to the build zsh output in that context. The passthru variants seems to solve this issue. + DIRENV_CONFIG = "${placeholder "out"}/${config.configDirname}"; + }; + passthru.DIRENV_CONFIG = direnvDotdir; + lib = { + "nix-direnv.sh" = lib.mkIf config.nix-direnv.enable '' + source ${config.nix-direnv.package}/share/nix-direnv/direnvrc + ''; + "mise.sh" = lib.mkIf config.mise.enable '' + eval "$(${lib.getExe config.mise.package} direnv activate)" + ''; + }; + extraConfig = { + global = lib.mkIf (config.silent) { + log_format = "-"; + log_filter = "^$"; + }; + }; + constructFiles = { + direnvToml = { + content = builtins.readFile direnvToml; + relPath = "${config.configDirname}/direnv.toml"; + }; + direnvRc = { + content = config.direnvrc; + relPath = "${config.configDirname}/direnvrc"; + }; + } + // lib.mapAttrs (name: value: { + content = value; + relPath = "${config.configDirname}/lib/${name}"; + }) config.lib; + meta.maintainers = [ wlib.maintainers.zenoli ]; + meta.description.pre = '' + **IMPORTANT** In order to use this wrapper, `DIRENV_CONFIG` needs to be explicitly + set in your shells environment: + + ```shell + DIRENV_CONFIG="''${direnvWrapper.passthru.DIRENV_CONFIG}" + ``` + + This is because right now, direnv will use the original `direnv` binary in its shell hook + and not the wrapper script. So injecting `DIRENV_CONFIG` currently has no effect. + + If the PR below will ever be merged, this issue can be fixed by setting: + + ```nix + env.DIRENV_EXE_PATH = "''${placeholder "out"}/bin/direnv"; + ``` + + This would make the direnv hook use the wrapper instead of the original binary and + injecting `DIRENV_CONFIG` into the wrapper would start to take effect. + + https://github.com/direnv/direnv/pull/1564 + ''; + }; +} diff --git a/wrapperModules/e/emacs/check.nix b/wrapperModules/e/emacs/check.nix index abeac665..d6e9d9b9 100644 --- a/wrapperModules/e/emacs/check.nix +++ b/wrapperModules/e/emacs/check.nix @@ -1,6 +1,7 @@ { pkgs, self, + ... }: let emacsWrapped = diff --git a/wrapperModules/g/git/check.nix b/wrapperModules/g/git/check.nix index be284e0d..06966848 100644 --- a/wrapperModules/g/git/check.nix +++ b/wrapperModules/g/git/check.nix @@ -1,6 +1,7 @@ { pkgs, self, + ... }: let diff --git a/wrapperModules/h/helix/check.nix b/wrapperModules/h/helix/check.nix index cadb67f1..6794e29c 100644 --- a/wrapperModules/h/helix/check.nix +++ b/wrapperModules/h/helix/check.nix @@ -1,6 +1,7 @@ { pkgs, self, + ... }: let diff --git a/wrapperModules/j/jujutsu/check.nix b/wrapperModules/j/jujutsu/check.nix index 25393569..abdcb388 100644 --- a/wrapperModules/j/jujutsu/check.nix +++ b/wrapperModules/j/jujutsu/check.nix @@ -1,6 +1,7 @@ { pkgs, self, + ... }: let diff --git a/wrapperModules/m/mako/check.nix b/wrapperModules/m/mako/check.nix index 875c4530..7313b067 100644 --- a/wrapperModules/m/mako/check.nix +++ b/wrapperModules/m/mako/check.nix @@ -1,6 +1,7 @@ { pkgs, self, + ... }: let diff --git a/wrapperModules/m/mangowc/check.nix b/wrapperModules/m/mangowc/check.nix index a981bf26..1fdffa9a 100644 --- a/wrapperModules/m/mangowc/check.nix +++ b/wrapperModules/m/mangowc/check.nix @@ -1,6 +1,7 @@ { pkgs, self, + ... }: let mangowcWrapped = self.wrappers.mangowc.wrap { diff --git a/wrapperModules/m/mpv/check.nix b/wrapperModules/m/mpv/check.nix index cd3b3872..4c54d9f6 100644 --- a/wrapperModules/m/mpv/check.nix +++ b/wrapperModules/m/mpv/check.nix @@ -1,6 +1,7 @@ { pkgs, self, + ... }: let diff --git a/wrapperModules/n/niri/check.nix b/wrapperModules/n/niri/check.nix index 39fe9e2c..4b509744 100644 --- a/wrapperModules/n/niri/check.nix +++ b/wrapperModules/n/niri/check.nix @@ -1,6 +1,7 @@ { pkgs, self, + ... }: let diff --git a/wrapperModules/n/notmuch/check.nix b/wrapperModules/n/notmuch/check.nix index 467fe962..5d53e138 100644 --- a/wrapperModules/n/notmuch/check.nix +++ b/wrapperModules/n/notmuch/check.nix @@ -1,6 +1,7 @@ { pkgs, self, + ... }: let diff --git a/wrapperModules/n/nushell/check.nix b/wrapperModules/n/nushell/check.nix index 70be36f9..fcea4536 100644 --- a/wrapperModules/n/nushell/check.nix +++ b/wrapperModules/n/nushell/check.nix @@ -1,6 +1,7 @@ { pkgs, self, + ... }: let diff --git a/wrapperModules/r/rofi/check.nix b/wrapperModules/r/rofi/check.nix index c67b9aab..6215e4b2 100644 --- a/wrapperModules/r/rofi/check.nix +++ b/wrapperModules/r/rofi/check.nix @@ -1,6 +1,7 @@ { pkgs, self, + ... }: let diff --git a/wrapperModules/v/vim/check.nix b/wrapperModules/v/vim/check.nix index d21c6ee1..fd0f3c40 100644 --- a/wrapperModules/v/vim/check.nix +++ b/wrapperModules/v/vim/check.nix @@ -1,6 +1,7 @@ { pkgs, self, + ... }: let diff --git a/wrapperModules/w/waybar/check.nix b/wrapperModules/w/waybar/check.nix index 313fc8d1..a264032c 100644 --- a/wrapperModules/w/waybar/check.nix +++ b/wrapperModules/w/waybar/check.nix @@ -1,6 +1,7 @@ { pkgs, self, + ... }: let waybarWrapped = self.wrappers.waybar.wrap { diff --git a/wrapperModules/w/wezterm/check.nix b/wrapperModules/w/wezterm/check.nix index 4cff4292..50d25d5c 100644 --- a/wrapperModules/w/wezterm/check.nix +++ b/wrapperModules/w/wezterm/check.nix @@ -1,6 +1,7 @@ { pkgs, self, + ... }: let weztermWrapped = self.wrappers.wezterm.wrap ( diff --git a/wrapperModules/x/xplr/check.nix b/wrapperModules/x/xplr/check.nix index 712f104e..847a5ba2 100644 --- a/wrapperModules/x/xplr/check.nix +++ b/wrapperModules/x/xplr/check.nix @@ -1,6 +1,7 @@ { pkgs, self, + ... }: let xplr = self.wrappers.xplr.wrap ( diff --git a/wrapperModules/y/yazi/check.nix b/wrapperModules/y/yazi/check.nix index 15b7aa73..0cb310cb 100644 --- a/wrapperModules/y/yazi/check.nix +++ b/wrapperModules/y/yazi/check.nix @@ -1,6 +1,7 @@ { pkgs, self, + ... }: let yaziWrapper = self.wrappers.yazi.wrap { inherit pkgs; }; diff --git a/wrapperModules/y/yt-dlp/check.nix b/wrapperModules/y/yt-dlp/check.nix index 769b7fc0..cac06e71 100644 --- a/wrapperModules/y/yt-dlp/check.nix +++ b/wrapperModules/y/yt-dlp/check.nix @@ -1,4 +1,4 @@ -{ pkgs, self }: +{ pkgs, self, ... }: let ytWrapped = self.wrappers.yt-dlp.wrap { inherit pkgs; diff --git a/wrapperModules/z/zsh/check.nix b/wrapperModules/z/zsh/check.nix index a2d2f8b4..80a44b4f 100644 --- a/wrapperModules/z/zsh/check.nix +++ b/wrapperModules/z/zsh/check.nix @@ -1,6 +1,7 @@ { pkgs, self, + ... }: let