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

obb: switch to fetchFromGitHub and passthru.tests #153601

Merged
merged 2 commits into from
Jan 5, 2022

Conversation

willcohen
Copy link
Contributor

@willcohen willcohen commented Jan 5, 2022

Motivation for this change

Followup to #153496 discussion.

Now uses fetchFromGitHub instead of fetchurl.

Also, per package docs, the reason to prefer package tests over the install check, in this case, is because the test is being introduced in nixpkgs itself and this encourages speedier builds (acknowledging in this case that the speed difference is trivial, but I don't mind trying to use current best practices on a new package).

@thiagokokada @legendofmiracles

Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • 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/)
  • 22.05 Release Notes (or backporting 21.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
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

Copy link
Contributor

@thiagokokada thiagokokada left a comment

Choose a reason for hiding this comment

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

I am still not convinced that using a clear hack just to make tests pass is better than using installCheckPhase in this case, however since it is in docs I think it is fair.

@willcohen
Copy link
Contributor Author

Also @legendofmiracles the reason for removing the version check is just that it's literally not implemented yet in v0.0.1 -- I lifted it from the babashka derivation originally, where it does work.

@willcohen
Copy link
Contributor Author

Result of nixpkgs-review pr 153601 run on x86_64-darwin 1

1 package built:
  • obb

@legendofmiracles
Copy link
Contributor

Also @legendofmiracles the reason for removing the version check is just that it's literally not implemented yet in v0.0.1 -- I lifted it from the babashka derivation originally, where it does work.

Oh, thanks for clarifying. That was indeed a misunderstanding 😅

@thiagokokada I agree, it's a clear design flaw. Maybe one that can somehow be fixed...
But current best practices want otherwise, and many other packages also do the same hack.

@legendofmiracles legendofmiracles merged commit 190f464 into NixOS:master Jan 5, 2022
@willcohen willcohen deleted the obb branch January 5, 2022 16:05
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.

3 participants