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

otree: init at 0.2.0 #316252

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

Conversation

0x61nas
Copy link
Member

@0x61nas 0x61nas commented May 31, 2024

Description of changes

addition otree package, which is a command line tool to view objects (json/yaml/toml) in TUI tree widget

try the package

nix run github:anas-contribs/nixpkgs/by-name/otree#otree

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.11 Release Notes (or backporting 23.11 and 24.05 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.

@0x61nas 0x61nas force-pushed the by-name/otree branch 2 times, most recently from bff636b to ad6dd98 Compare June 1, 2024 18:07
Copy link
Member

@afh afh left a comment

Choose a reason for hiding this comment

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

Thanks for this, @0x61nas! 😃 👍

Please find below a few comments and suggestions, mainly to add support for building on darwin.

Is there any way we could remove the dependency on git for building? Upstream seems to offer BUILD_OTREE_WITH_GIT_INFO and CARGO_PKG_VERSION could those be helpful here?

pkgs/by-name/ot/otree/package.nix Outdated Show resolved Hide resolved
repo = "otree";
rev = "v${version}";
hash = "sha256-ukKlypGY0+xsci/loAnf0Sz5K+82gVzkb+KnZ139cIA=";
leaveDotGit = true; # needed by build.rs
Copy link
Member

Choose a reason for hiding this comment

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

ℹ️ I was able to successfully build on aarch64-darwin without this.

pkgs/by-name/ot/otree/package.nix Outdated Show resolved Hide resolved
pkgs/by-name/ot/otree/package.nix Outdated Show resolved Hide resolved
pkgs/by-name/ot/otree/package.nix Outdated Show resolved Hide resolved
@0x61nas
Copy link
Member Author

0x61nas commented Jun 3, 2024

Is there any way we could remove the dependency on git for building?

in v0.1.0 i dont think so

Upstream seems to offer BUILD_OTREE_WITH_GIT_INFO and CARGO_PKG_VERSION could those be helpful here?

oh, that's would help ofc, i think with this we can remove git from our native build deps. but we have to wait until they release these modifications

@afh
Copy link
Member

afh commented Jun 3, 2024

Maybe a TODO comment in the package regarding removal of the git dependency via use of BUILD_OTREE_WITH_GIT_INFO and CARGO_PKG_VERSION for the next release might helpful. What do you think, @0x61nas?

@0x61nas
Copy link
Member Author

0x61nas commented Jun 3, 2024

good idea

Copy link
Member

@afh afh left a comment

Choose a reason for hiding this comment

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

Great work on this, @0x61nas, and thank you for the contribution. I look forward to using otree in the future!

If you wanted to go above and beyond with this package run it file through nixmft

Copy link
Member

@afh afh left a comment

Choose a reason for hiding this comment

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

See comment below…

pkgs/by-name/ot/otree/package.nix Outdated Show resolved Hide resolved
Copy link
Member

@afh afh left a comment

Choose a reason for hiding this comment

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

Thanks for addressing this so quickly, @0x61nas, much appreciated!

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-ready-for-review/3032/4071

Co-authored-by: Alexis Hildebrandt <[email protected]>
@0x61nas 0x61nas changed the title otree: init at 0.1.0 otree: init at 0.2.0 Jun 29, 2024
@0x61nas 0x61nas requested a review from afh June 29, 2024 07:59
Copy link
Member

@afh afh left a comment

Choose a reason for hiding this comment

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

How fortunate, that version 0.2.0 was released while this PR is still under review and leaveDotGit and git in nativeBuildInputs are no longer necessary 🥳

If you wanted to go above and beyond with this PR, please consider formatting it using:
nix run github:NixOS/nixfmt -- pkgs/by-name/ot/otree/package.nix

@afh
Copy link
Member

afh commented Jul 1, 2024

@0x61nas any idea what could cause the ofborg-eval check failure?

@0x61nas
Copy link
Member Author

0x61nas commented Jul 1, 2024

@0x61nas any idea what could cause the ofborg-eval check failure?

at the first, i thought that it was because of our (hacky) featching, but now i am not sure why

@IldenH
Copy link

IldenH commented Jul 14, 2024

Format using nixfmt-rfc-style
nix run nixpkgs#nixfmt-rfc-style -- pkgs/by-name/ot/otree/package.nix

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.

None yet

5 participants