8000 wrapper: propagate additional check hooks to mnw derivation by NotAShelf · Pull Request #10 · Gerg-L/mnw · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

wrapper: propagate additional check hooks to mnw derivation #10

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

NotAShelf
Copy link

Basic mechanism to propagate user scripts into mnw builder as setup hooks.

I would like to perform more checking on the user inputs, but couldn't think of an appropriate mechanism, and the nixfmt formatting is constantly tripping me up. You're bald.

@NotAShelf NotAShelf force-pushed the extra-check-hooks branch from 51cc164 to c485d8b Compare April 1, 2025 09:08
@NotAShelf NotAShelf force-pushed the extra-check-hooks branch from c485d8b to 8a89f2e Compare April 1, 2025 09:17
Copy link
Owner
@Gerg-L Gerg-L left a comment

Choose a reason for hiding this comment

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

Format with nixfmt

stdenvNoCC.mkDerivation {
pname = "mnw";
version = lib.getVersion neovim;

buildInputs =
let
mkExtraCheckHook =
Copy link
Owner

Choose a reason for hiding this comment

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

Why is this a separate function

Copy link
Author

Choose a reason for hiding this comment

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

I was planning to re-use it and get some more arguments from mnw wrapper. Don't think in-lining this is the way to go here.

} hook
) { };
in
map (x: mkExtraCheckHook (lib.getExe (writeShellScriptBin "mnw-check-hook" x))) extraCheckHooks;
Copy link
Owner

Choose a reason for hiding this comment

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

Use writeShellScript no getExe

let
mkExtraCheckHook =
hook:
callPackage (
Copy link
Owner

Choose a reason for hiding this comment

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

Probably don't need to callPackage this, especially because it's a list and not easy at all to override

@@ -420,5 +419,17 @@ in
};
};
};

extraCheckHooks = lib.mkOption {
type = with types; listOf lines;
Copy link
Owner

Choose a reason for hiding this comment

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

Remove the with heretic

This should also possibly be a attribute set for override purposes

Copy link
Author

Choose a reason for hiding this comment

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

You stink.

I was planning to convert this to an attribute set with dependencies (propagated to the setup hook builder), text and maybe an enable? Is that too much?

Copy link
Owner

Choose a reason for hiding this comment

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

That's probably fine, then you can mapAttrsToList it using the name for the writeShellScript's name

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
0