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

haylxon: init at 1.0.0 #328651

Merged
merged 2 commits into from
Jul 22, 2024
Merged

haylxon: init at 1.0.0 #328651

merged 2 commits into from
Jul 22, 2024

Conversation

scientiac
Copy link
Contributor

@scientiac scientiac commented Jul 20, 2024

haylxon: init at 1.0.0

Description of changes

Haylxon, A tool embodying the KISS philosophy that allows you to take screenshots of webpages/URLs at lightning-fast speeds using chrome's Headless feature, means, you'd be needing a chromium based browser for it to work.

https://github.com/pwnwriter/haylxon

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.

@NixOSInfra NixOSInfra added the 12. first-time contribution This PR is the author's first one; please be gentle! label Jul 20, 2024
@scientiac scientiac force-pushed the master branch 2 times, most recently from 59c8de5 to c1f22e6 Compare July 20, 2024 13:15
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, @scientiac.

Please create a single commit to add you to the maintainers list, for an example please see 59fdb6d.

Then change the order of the commits on this PR, so that the maintainers list commit comes before the init commit 🙂

Additionally please find below a few questions and suggestions for improvement.

description = "Blazingly fast tool to grab screenshots of url/webpages from terminal.";
homepage = "https://crates.io/crates/hxn";
license = licenses.mit;
maintainers = with maintainers; [ pwnwriter ];
Copy link
Member

@afh afh Jul 20, 2024

Choose a reason for hiding this comment

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

❓ Are you on-board with becoming the maintainer of this package, @pwnwriter ?

ℹ️ This was changed while writing this PR review.

buildInputs = lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Security ];

meta = with lib; {
description = "Blazingly fast tool to grab screenshots of url/webpages from terminal.";
Copy link
Member

Choose a reason for hiding this comment

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

meta.description should:

Suggested change
description = "Blazingly fast tool to grab screenshots of url/webpages from terminal.";
description = "Save screenshots of urls and webpages from terminal";


meta = with lib; {
description = "Blazingly fast tool to grab screenshots of url/webpages from terminal.";
homepage = "https://crates.io/crates/hxn";
Copy link
Member

Choose a reason for hiding this comment

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

This feels like a more appropriate homepage

Suggested change
homepage = "https://crates.io/crates/hxn";
homepage = "https://github.com/pwnwriter/haylxon";

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes

Copy link
Member

Choose a reason for hiding this comment

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

Should this package directory be named ha/haylxon?
It appears that while the program is named hxn the project is named haylxon.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, that is correct, changing the pname to haxylon would be correct. I misunderstood and named it hxn since the binary is called hxn.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changing pname to haxylon will result in failure because the package is called hxn on crate.io. So, hxn will be the pname not haxylon.

Copy link
Member

Choose a reason for hiding this comment

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

❓ Out of curiosity: Could pname in fetchCrate differ from pname buildRustPackage? Not sure if it makes sense…

}:

rustPlatform.buildRustPackage rec {
pname = "hxn";
Copy link
Member

Choose a reason for hiding this comment

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

If the package directory is changed I suggest changing the package name too:

Suggested change
pname = "hxn";
pname = "haylxon";

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for all the suggestions, all your suggestions makes sense. Yes, haxylon is the name, I thought nixpkgs required the bin name.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changing the name to haxylong breaks the build, hence the pname should be hxn and the by-name location must me hx/hxn.

@scientiac
Copy link
Contributor Author

Thanks for all the suggestions. I'll make all the changes you mentioned.

@github-actions github-actions bot added the 8.has: maintainer-list (update) This PR changes `maintainers/maintainer-list.nix` label Jul 20, 2024
@scientiac scientiac changed the title hxn: init at 1.0.0 haylxon: init at 1.0.0 Jul 20, 2024
@scientiac
Copy link
Contributor Author

I have made the suggested changes to the files.

@afh
Copy link
Member

afh commented Jul 20, 2024

Thanks for applying the changes, @scientiac, much appreciated.

Looking at the commits there are still 3 instead of the expected 2 commits. Please let me know if I haven't been able to explain well how it should look in the end 🙂

@afh
Copy link
Member

afh commented Jul 20, 2024

Result of nixpkgs-review pr 328651 run on aarch64-darwin 1

1 package built:
  • haylxon

@scientiac
Copy link
Contributor Author

Thanks for applying the changes, @scientiac, much appreciated.

Looking at the commits there are still 3 instead of the expected 2 commits. Please let me know if I haven't been able to explain well how it should look in the end 🙂

Sorry for that, I didn't quite get what you meant the first time. It's fixed now.

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.

Thank your for putting in all the extra effort, well done and much appreciated 🙂👍

Looking forward to seeing this get merged.

Congrats on your first nixpkgs contribution and welcome to Nix 👋 😃

@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-already-reviewed/2617/1843

@afh afh added the 12.approvals: 1 This PR was reviewed and approved by one reputable person label Jul 20, 2024
pkgs/by-name/ha/haylxon/package.nix Outdated Show resolved Hide resolved
haylxon: remove overuse of `with lib;`
@gador
Copy link
Member

gador commented Jul 22, 2024

1 package built:
haylxon

Result of nixpkgs-review pr 328651 run on aarch64-darwin 1

1 package built:
  • haylxon

1 package built:
haylxon

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

1 package built:
  • haylxon

@gador gador merged commit 1e05360 into NixOS:master Jul 22, 2024
25 of 27 checks passed
@afh
Copy link
Member

afh commented Jul 22, 2024

Thanks for merging this, @gador 🙂 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8.has: maintainer-list (update) This PR changes `maintainers/maintainer-list.nix` 8.has: package (new) This PR adds a new package 10.rebuild-darwin: 1-10 10.rebuild-darwin: 1 10.rebuild-linux: 1-10 10.rebuild-linux: 1 11.by: package-maintainer This PR was created by the maintainer of the package it changes 12.approvals: 1 This PR was reviewed and approved by one reputable person 12. first-time contribution This PR is the author's first one; please be gentle!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants