Skip to content
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

got: 0.97 -> 0.98.2 #307538

Merged
merged 1 commit into from
Apr 30, 2024
Merged

got: 0.97 -> 0.98.2 #307538

merged 1 commit into from
Apr 30, 2024

Conversation

afh
Copy link
Member

@afh afh commented Apr 28, 2024

Description of changes

Upstream has switched to libressl (see ThomasAdam/got-portable@62e037f)

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.05 Release Notes (or backporting 23.05 and 23.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@JohnRTitor
Copy link
Contributor

Note: PR title should be updated to properly indicate this is a got update, not git.

@afh afh changed the title git: 0.97 -> 0.98.2 got: 0.97 -> 0.98.2 Apr 28, 2024
@afh
Copy link
Member Author

afh commented Apr 28, 2024

Great catch, @JohnRTitor! The muscle memory in my fingers got (pun intended) the better of me ;)

@JohnRTitor
Copy link
Contributor

Result of nixpkgs-review pr 307538 run on x86_64-linux 1

1 package built:
  • got

Copy link
Contributor

@JohnRTitor JohnRTitor left a comment

Choose a reason for hiding this comment

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

LGTM.

@JohnRTitor JohnRTitor added the 12.approvals: 1 This PR was reviewed and approved by one reputable person label Apr 28, 2024
@JohnRTitor JohnRTitor added 12.approvals: 2 This PR was reviewed and approved by two reputable people and removed 12.approvals: 1 This PR was reviewed and approved by one reputable person labels Apr 29, 2024
@JohnRTitor
Copy link
Contributor

@NixOS/nixpkgs-merge-bot merge

@nixpkgs-merge-bot
Copy link
Contributor

@JohnRTitor merge not permitted (#305350):
pkgs/applications/version-management/got/default.nix is not in pkgs/by-name/

@AndersonTorres
Copy link
Member

@afh can you migrate this to by-name?

@JohnRTitor
Copy link
Contributor

Is there a "general" guideline on which packages should be under a category or in by-name?

Comment on lines -48 to +51
doInstallCheck = true;

installCheckPhase = ''
runHook preInstallCheck
test "$($out/bin/got --version)" = "got ${finalAttrs.version}"
runHook postInstallCheck
'';
passthru.tests.version = testers.testVersion {
package = finalAttrs.finalPackage;
};
Copy link
Member Author

Choose a reason for hiding this comment

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

@AndersonTorres, is this change a proper and correct improvement? I have yet to fully understand passthru and testers.testVersion, but from my current understanding this should be good. I'd truly appreciate your feedback and expertise on this.

Copy link
Member

Choose a reason for hiding this comment

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

Yes, it is fine.

As I have explained before, installCheckPhase is meant to run checks provided by the upstream package developer. The difference between checkPhase and installCheckPhase is that installCheckPhase runs after installation while checkPhase runs after build.

Custom scripts are better suited to passthru.tests.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for the explanation, @AndersonTorres, that's helpful!

Yet for some odd reason my 🧠 refuses to understand passthru (might be something to do with the wording that seems odd to me—not that it is, just that it makes it harder for me to grok it). Seems I need to revisit and re-read the available documentation

Copy link
Member

Choose a reason for hiding this comment

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

passthru is similar to meta in the sense that a modification in passthru does not trigger a mass rebuild.

Usually we use passthru in order to collect some useful info from the derivation and expose it to the external world.

E.G. suppose you have a parameter, uiType, that enables a fancy UI in got, and the end user wants to know which GUI type was used (say, cli, curses, gtk3, qt10).

Then you can write

passthru = {
   uiType =
     if enableCurses then "curses"
     else if enableGtk3 then "gtk3"
     else "cli";
};

This way, the end user can evaluate got.uiType to know what UI was enabled.


Obviously the code above is a crude example. Usually we do cleaner and more useful stuff.

E.G. in live555 we put a test:

passthru.tests = {
   inherit vlc;
};

This way we can test this by calling live555.tests.vlc.

The idea is that vlc depends on live555, and sometimes the vlc team does not update its code when live555 introduces a breaking change. So we at Nixpkgs catch this by running this test.

@afh
Copy link
Member Author

afh commented Apr 29, 2024

Sure thing, @AndersonTorres 👍 Please see comment above for a question I have about an additional change I made regarding installCheck.

@wegank wegank removed the 12.approvals: 2 This PR was reviewed and approved by two reputable people label Apr 29, 2024
@AndersonTorres
Copy link
Member

Is there a "general" guideline on which packages should be under a category or in by-name?

A very rough guideline is: by-name for the win!

  • New packages should be on by-name except if they can't
    • Example: there are packages that use darwin.apple_sdk.VERSION.callPackage; they can't use by-name (yet), so use the old hierarchy for them
  • Old packages can, optionally, be migrated to by-name (except if they can't - see above) only as part of refactoring or version update
    • This is because a mass migration is being planned; so, do not migrate an old package except in the cases above

@Mic92 Mic92 merged commit 45429c2 into NixOS:master Apr 30, 2024
23 of 24 checks passed
@afh afh deleted the update-got branch April 30, 2024 14:09
@afh
Copy link
Member Author

afh commented Apr 30, 2024

Thanks for the review, @AndersonTorres, and thanks for merging, @Mic92, much appreciated 🙂👍

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

Successfully merging this pull request may close these issues.

5 participants