Skip to content

feat: added a wrapper for neovide#570

Open
Nuclear-Squid wants to merge 1 commit into
BirdeeHub:mainfrom
Nuclear-Squid:main
Open

feat: added a wrapper for neovide#570
Nuclear-Squid wants to merge 1 commit into
BirdeeHub:mainfrom
Nuclear-Squid:main

Conversation

@Nuclear-Squid

Copy link
Copy Markdown

As the title says, this PR adds a wrapper module for neovide, a fancy GUI for Neovim. It can be configured in two places (for two different usages) :

This PR only handles the first one (the config file) as I go over the assumption that you’ll have your lua config with the rest of your neovim config. (I’m also not really sure if that would be possible to implement, since wrapped packages seem to be independent)

First time opening a PR, hopefully I didn’t mess it up too much 😅

@MacaylaMarvelous81 MacaylaMarvelous81 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This wrapper module fails to build a wrapper.

[jomarm@dell-inspiron7773:~/nix-wrapper-modules]$ nix-build --expr '(import ./. {}).wrappers.neovide.wrap { pkgs = import <nixpkgs> {}; }'
error:
       … while calling a functor (an attribute set with a '__functor' attribute)
         at «string»:1:1:
            1| (import ./. {}).wrappers.neovide.wrap { pkgs = import <nixpkgs> {}; }
             | ^

       … while evaluating the attribute 'mergedValue'
         at /nix/store/kz804kyjidvk0bqkpax50n3gl0d42gkd-z40ippcpb9xbmjyads2br13snirhdm0i-nixpkgs-src/lib/modules.nix:1244:5:
         1243|     # Type-check the remaining definitions, and merge them. Or throw if no definitions.
         1244|     mergedValue =
             |     ^
         1245|       if isDefined thenwhile evaluating definitions from `/nix/store/y41wzpvpvinf4gi81ksmp484sm08p67z-nix-wrapper-modules/lib/core.nix':

       … while evaluating the option `wrapper':

while evaluating definitions from `/nix/store/y41wzpvpvinf4gi81ksmp484sm08p67z-nix-wrapper-modules/lib/core.nix':

       … while evaluating the option `buildCommand.makeWrapper.data':

while evaluating definitions from `/nix/store/y41wzpvpvinf4gi81ksmp484sm08p67z-nix-wrapper-modules/modules/makeWrapper/module.nix':

       … while evaluating the option `outputName':

while evaluating the option `package':

       (stack trace truncated; use '--show-trace' to show the full, detailed trace)

       error: The option `package' was accessed but has no value defined. Try setting the option.

Comment on lines +22 to +32
config = {
package = pkgs.neovide;
env.NEOVIDE_CONFIG = "${config.binDir}/config.toml";
constructFiles.generatedConfig = {
content = builtins.toJSON config.settings;
relPath = "${config.binDir}/config.toml";
builder = ''${pkgs.remarshal}/bin/json2toml "$1" "$2"'';
};
meta.maintainers = [ wlib.maintainers.nuclear-squid ];
};
};

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like you've mistakenly placed the module's config inside of its options, so your wrapper module isn't actually setting any options or configuring anything. Therefore, this wrapper module will not function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants