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
starship: init at 0.10.1 #66730
starship: init at 0.10.1 #66730
Conversation
@GrahamcOfBorg build starship |
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.
since the package is being called from all-packages, just pass the package names in question. Also makes overriding a lot easier.
Thanks @risicle and @jonringer for the suggestions. |
if you could squash all the commits, then the diff LGTM
|
@jonringer I think they have a button in github for that. I squashed them in one of my last PRs and I was told not too. If I remember correctly. I heard it was better this way so the review don't get obsoleted or something like that. Not sure. EDIT 2: Yeah I was told "Next time, could you avoid force-pushing please? We've got a button that lets us squash all the commits at merge time :-)" in one of my last PR.. but on another project. haha. If you still prefer that I squash it, I'll do it. |
Hmm fails to build on macos 10.13
Looking closer... |
@bbigras depends on the communit/repo. for nixpkgs, you want to make it so that the maintainers just need to click a button. nixpkgs cares a lot about the cleanliness of their commit history, and generally don't care much about you force pushing. |
For example at work, we just squash everything, and you get these `MERGE PR#XXXXXX: Some message" commits, which are hard to quickly read. But no one really cares about commit history at my work either. |
Another reason to keep your commits to a minimum is for reverting possible regressions, if you have 4 commits, then they would need to revert the 4, which may not be obvious depending on how you're viewing the history. However, if all of your changes are done in an atomic commit, then it's easy to revert or cherry-pick it. |
I totally agree that squashing commits is worth it and I prefer it that way too. Especially in this case where there's one useless commit for every single review suggestions. I just misremembered which project asked me to let them do it with github. |
Fix for macos is simple enough, just needs a couple of extra
|
@bbigras nixpkgs prefers rebasing your commits to keep them as tidy as possible, usually 1 commit = changes to 1 package. https://nixos.org/nixpkgs/manual/#submitting-changes-hotfixing-pull-requests |
Thanks @jonringer, it's clear then.
@risicle I made the change, thanks! |
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 for choosing to contribute this package to nixpkgs! Looks pretty neat, I think I'll give it a try.
I've left some suggestions I hope you will find useful.
@@ -0,0 +1,24 @@ | |||
{ stdenv, fetchFromGitHub, rustPlatform, openssl, pkgconfig, libiconv, darwin }: |
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.
Does anyone know if it is preferred to pass Security
here instead of darwin
?
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.
Every time you pass one of the inner frameworks as an argument it has to be assigned specifically in all-packages.nix
, which is why I tend to pass the full darwin
, which is taken care of by callPackage
.
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.
So I can resolve this suggestion and leave it like it is?
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.
@risicle yes, this is why you often see declarations like this inside all-packages.nix
:
sit = callPackage ../applications/version-management/sit {
inherit (darwin.apple_sdk.frameworks) CoreFoundation Security;
};
I'm not a darwin
person, and I haven't ever really looked at the documentation about working with darwin
in nix, so I'm genuinely asking which is preferred in nixpkgs 🤷♂️
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.
Right now, in majority cases we import the entire darwin, but maybe @aanderse has a valid point and we should inherit the frameworks instead.
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.
Well I think I've adequately derailed this PR just about enough. Sorry @bbigras I didn't mean to use your PR to try and set new darwin
policy... especially since I've never used the platform!
For future reference it would be nice to know if there is a preferred style. That should probably be a decision left up to people like @matthewbauer and @LnL7, with input from people like @lilyball.
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.
I've seen both, but I personally just take darwin
, I don't see any benefit to requiring all-packages.nix
to do the inherit. I suppose it makes it a little easier to override the frameworks, but I can't think of any reason to override them.
@aanderse thanks for the review. |
Anyone can help with that? |
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 @bbigras! This package looks awesome!
@GrahamcOfBorg build starship |
Thanks everyone for the help. |
I just tried to build this on darwin and got a test failure:
|
I think this is an upstream package issue caused by running tests in parallel, based on the test behavior and implementation. I'll file it upstream. Edit: Filed as starship/starship#188 |
Motivation for this change
Add the starship package. Which is a promising simple prompt.
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nix-review --run "nix-review wip"
./result/bin/
)nix path-info -S
before and after)