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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

twm: 0.9.0 -> 0.9.1, add updateScript #312304

Merged
merged 1 commit into from
May 21, 2024

Conversation

vinnymeller
Copy link
Contributor

@vinnymeller vinnymeller commented May 16, 2024

Description of changes

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.

@vinnymeller
Copy link
Contributor Author

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

1 package built:
  • twm

Copy link
Contributor

@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 you for your contribution, @vinnymeller, please find below a few suggestions for improvement.

}:

rustPlatform.buildRustPackage rec {
pname = "twm";
version = "0.9.0";
version = "0.9.1";

src = fetchFromGitHub {
owner = "vinnymeller";
repo = pname;
Copy link
Contributor

Choose a reason for hiding this comment

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

There is a preference to avoid such use of pname (see #277994)

Suggested change
repo = pname;
repo = "twm";


src = fetchFromGitHub {
owner = "vinnymeller";
repo = pname;
rev = "v${version}";
sha256 = "sha256-gvo5+lZNe5QOHNI4nrPbCR65D+VFf/anmLVdu5RXJiY=";
sha256 = "sha256-1hRGcvUGHO5ENgI3tdT46736ODN8QZ6vg+Y1y2XeuAA=";
Copy link
Contributor

Choose a reason for hiding this comment

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

Using hash is preferred over sha256:

Suggested change
sha256 = "sha256-1hRGcvUGHO5ENgI3tdT46736ODN8QZ6vg+Y1y2XeuAA=";
hash = "sha256-1hRGcvUGHO5ENgI3tdT46736ODN8QZ6vg+Y1y2XeuAA=";


nativeBuildInputs = [ pkg-config ];
buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ Security ];

passthru.updateScript = nix-update-script { };

meta = with lib; {
description = "A customizable workspace manager for tmux";
Copy link
Contributor

Choose a reason for hiding this comment

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

Indefinite articles at the beginning of the package description provide no value.

Suggested change
description = "A customizable workspace manager for tmux";
description = "Customizable workspace manager for tmux";


nativeBuildInputs = [ pkg-config ];
buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ Security ];

passthru.updateScript = nix-update-script { };

meta = with lib; {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
meta = with lib; {
meta = {

#208242

Copy link
Contributor

@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 you for considering and accepting the review suggestions.

LGTM 馃檪馃憤

passthru.updateScript = nix-update-script { };

meta = {
description = "Customizable workspace manager for tmux";
homepage = "https://github.com/vinnymeller/twm";
changelog = "https://github.com/vinnymeller/twm/releases/tag/v${version}";
Copy link
Member

Choose a reason for hiding this comment

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

Hint:

Suggested change
changelog = "https://github.com/vinnymeller/twm/releases/tag/v${version}";
changelog = "https://github.com/vinnymeller/twm/releases/tag/${src.rev}";

Because sometimes the upstream changes versioning scheme.
Also it works when we use a release without its git tag.

Copy link
Contributor

Choose a reason for hiding this comment

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

I've seen this pattern before and always wondered what the benefits might be. Thanks for adding context on this, @AndersonTorres 馃憤

Copy link
Member

@AndersonTorres AndersonTorres left a comment

Choose a reason for hiding this comment

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

Besides, LGTM.

@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/1657

@pbsds pbsds merged commit a33aa5d into NixOS:master May 21, 2024
24 checks passed
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