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

nodePackages.vsc-leetcode-cli: use buildNpmPackage #252441

Merged
merged 1 commit into from
Sep 13, 2023

Conversation

Lord-Valen
Copy link
Contributor

Description of changes

See #229475.

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/)
  • 23.11 Release Notes (or backporting 23.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.

@@ -0,0 +1,25 @@
{ buildNpmPackage, fetchFromGitHub, 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
{ buildNpmPackage, fetchFromGitHub, lib, ... }:
{ lib
, buildNpmPackage
, fetchFromGitHub
}:


buildNpmPackage rec {
pname = "vsc-leetcode-cli";
version = "2021-04-11-unstable";
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
version = "2021-04-11-unstable";
version = "unstable-2021-04-11";

@@ -36397,6 +36397,8 @@ with pkgs;

vpcs = callPackage ../applications/virtualization/vpcs { };

vsc-leetcode-cli = callPackage ../applications/misc/vsc-leetcode-cli { };
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
vsc-leetcode-cli = callPackage ../applications/misc/vsc-leetcode-cli { };
vsc-leetcode-cli = callPackage ../tools/misc/vsc-leetcode-cli { };

because it's a CLI tool


buildNpmPackage {
pname = "vsc-leetcode-cli";
version = "unstable-2021-04-11";
Copy link
Member

Choose a reason for hiding this comment

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

Why don't we use the most recent commit and call it 2.8.1. Pretty sure that corresponds to what's on NPM.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because it isn't 2.8.1? Seems like 2.8.1 was published to NPM but not pushed to GitHub. The package.json on GitHub still has version 2.8.0 whereas NPM has ... 2.8.1. There may be no other differences and I don't care to diff it but even that one change is enough of a distinguishing characteristic for me.

Copy link
Member

Choose a reason for hiding this comment

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

Oh you're right.


meta = with lib; {
description = "A CLI tool for leetcode.com";
homepage = "https://github.com/leetcode-tools/leetcode-cli#readme";
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
homepage = "https://github.com/leetcode-tools/leetcode-cli#readme";
homepage = "https://github.com/leetcode-tools/leetcode-cli";

description = "A CLI tool for leetcode.com";
homepage = "https://github.com/leetcode-tools/leetcode-cli#readme";
license = licenses.mit;
maintainers = with maintainers; [ cpcloud ];
Copy link
Member

Choose a reason for hiding this comment

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

Reference?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@@ -0,0 +1,25 @@
{ buildNpmPackage, fetchFromGitHub, lib }:
Copy link
Member

Choose a reason for hiding this comment

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

Single lines are nicer.

@Lord-Valen Lord-Valen force-pushed the npm-leetcode-cli branch 2 times, most recently from d921997 to 5528b08 Compare September 8, 2023 18:22
Copy link
Member

@dotlambda dotlambda left a comment

Choose a reason for hiding this comment

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

Looks like something went wrong during a rebase.

@dotlambda dotlambda merged commit fe59ea1 into NixOS:master Sep 13, 2023
5 checks passed
@Lord-Valen Lord-Valen deleted the npm-leetcode-cli branch February 5, 2024 20:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Re-packaged
Development

Successfully merging this pull request may close these issues.

2 participants