-
Notifications
You must be signed in to change notification settings - Fork 79
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
deprecate mkApp
in favor of direct definitions
#103
base: main
Are you sure you want to change the base?
Conversation
015166e
to
2a9b808
Compare
That became a few more force pushes than desired, but it should all be good now! 😅 |
Now that nixpkgs has its own idea of `passthru.exePath` under the name `meta.mainProgram`, deprecate our solution in favor of the new standard. This subsequently removes the value of which `mkApp` brings, and therefore a full deprecation for its removal has begun.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Left a few comments, the PR should be ready once these have been addressed.
@@ -12,7 +12,10 @@ | |||
default = hello; | |||
}; | |||
apps = rec { | |||
hello = flake-utils.lib.mkApp { drv = self.packages.${system}.hello; }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't you think it would be nicer to deprecate drv.passthru.exePath
and use nixpkgs.lib.getExe
in the helper instead?
This is still a bit simpler to use.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That being said, I don't see a lot of value in definining those apps.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah. There is a problem where all these apps can be rewritten as packages."<system>"."<name>"
since nix3-run runs against meta.mainProgram
as well.
Unsure how to show examples without removing apps
outright.
I forgot; the main use-case for apps is for packages that output multiple binaries. For example So I propose to just deprecate any uses of |
ok, that seems ready to me. have a look and tell me what you think. |
I am honestly still quite a bit for deprecating the entire As there is little gain having a {
outputs.apps.x86_64-linux = {
with-lib = flake-utils.lib.mkApp { drv = pkgs.coreutils; name = "ls"; };
no-lib = { type = "app"; program = "${pkgs.coreutils}/bin/ls"; };
};
} |
Now that nixpkgs has its own idea of
passthru.exePath
under the namemeta.mainProgram
, deprecate our solution in favor of the new standard.This subsequently removes the value of which
mkApp
brings, and therefore a full deprecation for its removal has begun.Closes: #65