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

kotatsu-dl: init at v 0.5 #375562

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

kotatsu-dl: init at v 0.5 #375562

wants to merge 2 commits into from

Conversation

a3ru
Copy link

@a3ru a3ru commented Jan 21, 2025

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/)
  • 25.05 Release Notes (or backporting 24.11 and 25.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.

Changes the hash to the right one
Comment on lines +7 to +10
src = pkgs.fetchurl {
url = "https://github.com/KotatsuApp/kotatsu-dl/releases/download/v${version}/kotatsu-dl.jar";
sha256 = "sha256-GI/PLt8wbVs2R78PbQg/9/Rea33j6CFQjuqhYIQGimM=";
};
Copy link
Contributor

Choose a reason for hiding this comment

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

It would be better to build from source and use fetchFromGithub as the fetcher.

See general guidelines for Java packages.

Comment on lines +12 to +13
# Skip the unpackPhase since it's just a JAR file, not an archive
phases = [ "installPhase" ];
Copy link
Contributor

Choose a reason for hiding this comment

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

When building from source with the correct fetcher, this will not be needed.

buildInputs = [ pkgs.openjdk ];
propagatedBuildInputs = [ pkgs.openjdk ];

installPhase = ''
Copy link
Contributor

Choose a reason for hiding this comment

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

Start and end every manually-defined main phase with runHook pre<phaseName> and runHook post<phaseName>.
So here it would be

installPhase = ''
  runHook preInstall
  # Installing...
  runHook postInstall
''

Comment on lines +37 to +40
meta = with pkgs.lib; {
description = "Easy-to-use cli manga downloader with a 1k+ sources supported";
license = licenses.gpl3;
};
Copy link
Contributor

Choose a reason for hiding this comment

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

Expand the meta attrset with additional information. We also need a maintainer. Would you be willing to maintain the package yourself?

For the additional meta attributes, see the manual for meta attributes such as homepage, maintainers, platforms, longdescription, etc.

For meta.changelog, use

      changelog = "https://github.com/KotatsuApp/kotatsu-dl/releases/tag/v${version}";


meta = with pkgs.lib; {
description = "Easy-to-use cli manga downloader with a 1k+ sources supported";
license = licenses.gpl3;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
license = licenses.gpl3;
license = licenses.gpl3Only;

Since the licence does not allow using higher versions of GPLv3.

@@ -0,0 +1,41 @@
{ pkgs }:
Copy link
Contributor

Choose a reason for hiding this comment

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

Never use pkgs in the top-level package inputs. Always directly import all that you need. So stdenv, fetchFromGithub, ... It allows for easier overrides of
the package.

@Adda0 Adda0 added 8.has: package (new) This PR adds a new package 9.needs: maintainer Package or module needs active maintainers 2.status: needs-changes This PR needs changes by the author labels Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.status: needs-changes This PR needs changes by the author 8.has: package (new) This PR adds a new package 9.needs: maintainer Package or module needs active maintainers 10.rebuild-darwin: 1-10 10.rebuild-darwin: 1 10.rebuild-linux: 1-10 10.rebuild-linux: 1 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.

3 participants