Skip to content

Conversation

lomenzel
Copy link
Contributor

@lomenzel lomenzel commented Jul 28, 2025

Things done

  • added the Anki add-on puppy-reinforcement
  • changes buildAnkiAddon to allways create user_files if not existent
  • added myself to the maintainers list

puppy-reinforcement is an addon that shows images of puppies while reviewing in a changable interval

Repo

  • Built on platform:
    • x86_64-linux
    • aarch64-linux (with the terminal app on android)
    • x86_64-darwin
    • aarch64-darwin
  • Tested, as applicable:
  • Ran nixpkgs-review on this PR. See nixpkgs-review usage.
  • Tested basic functionality of all binary files, usually in ./result/bin/.
  • Nixpkgs Release Notes
    • Package update: when the change is major or breaking.
  • NixOS Release Notes
    • Module addition: when adding a new NixOS module.
    • Module update: when the change is significant.
  • Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other READMEs.

Add a 👍 reaction to pull requests you find important.

@nixpkgs-ci nixpkgs-ci bot added 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. 6.topic: games Gaming on NixOS 8.has: maintainer-list (update) This PR changes `maintainers/maintainer-list.nix` 9.needs: reviewer This PR currently has no reviewers requested and needs attention. labels Jul 28, 2025
@nixpkgs-ci nixpkgs-ci bot removed the 9.needs: reviewer This PR currently has no reviewers requested and needs attention. label Jul 29, 2025
@lomenzel
Copy link
Contributor Author

@ethancedwards8 you did the updatescript in the quizzlet importer addon, can i do the same here and is there any guideline or documentation how to use it?

@lomenzel lomenzel changed the title puppy-reinforcement: init at 1.1.1 ankiAddons.puppy-reinforcement: init at 1.1.1 Jul 29, 2025
@ethancedwards8
Copy link
Member

You can add the sand one I used

@lomenzel lomenzel requested a review from ethancedwards8 July 29, 2025 12:33
@nixpkgs-ci nixpkgs-ci bot added the 12.approvals: 1 This PR was reviewed and approved by one person. label Jul 29, 2025
meta = {
description = "Anki add-on that encourages learners with pictures of cute puppies";
homepage = "https://ankiweb.net/shared/info/1722658993";
license = lib.licenses.agpl3Only;
Copy link
Member

Choose a reason for hiding this comment

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

sourceRoot = "${finalAttrs.src.name}/src/puppy_reinforcement";
passthru.updateScript = nix-update-script { };
meta = {
description = "Anki add-on that encourages learners with pictures of cute puppies";

This comment was marked as outdated.

@lomenzel lomenzel requested a review from JuneStepp August 9, 2025 08:54
Copy link
Member

@JuneStepp JuneStepp left a comment

Choose a reason for hiding this comment

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

Right now, this only works when withConfig is used, because the add-on expects user_files to exist. I think it would be reasonable to ensure user_files always exists instead of just when withConfig is used. I've included a diff for that change below:

diff --git a/pkgs/games/anki/addons/anki-utils.nix b/pkgs/games/anki/addons/anki-utils.nix
index 56096cf0f4c0..f27d4f511c57 100644
--- a/pkgs/games/anki/addons/anki-utils.nix
+++ b/pkgs/games/anki/addons/anki-utils.nix
@@ -54,7 +54,7 @@
         installPhase = ''
           runHook preInstall
 
-          mkdir -p "$out/$installPrefix"
+          mkdir -p "$out/$installPrefix/user_files"
           find . -mindepth 1 -maxdepth 1 | xargs -d'\n' mv -t "$out/$installPrefix/"
 
           runHook postInstall
@@ -89,7 +89,6 @@
                 rm -f meta.json
                 ln -s ${addonMetaConfig} meta.json
 
-                mkdir -p user_files
                 ${
                   if (userFiles != null) then
                     ''

@nixpkgs-ci nixpkgs-ci bot added 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in any of the changed packages. and removed 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. labels Aug 15, 2025
@JuneStepp
Copy link
Member

Can you sqash your commits down to just the first two that follow the commit conventions?

apply suggested change: rev → tag

Co-authored-by: Ethan Carter Edwards <ethan@ethancedwards.com>

apply suggestion: shorten description to one line

add updatescript

puppy-reinforcement: change license and add longDescription

apply review suggestion

Co-authored-by: June Stepp <git@junestepp.me>

apply review suggestion simplify description

Co-authored-by: June Stepp <git@junestepp.me>

allways create user_files

apply formatter corrections
Copy link
Member

@JuneStepp JuneStepp left a comment

Choose a reason for hiding this comment

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

The user_files change should probably actually be in a separate commit (ex: "ankiAddons: always create user_files), but besides that it looks good to me.

@nixpkgs-ci nixpkgs-ci bot added 12.approvals: 2 This PR was reviewed and approved by two persons. and removed 12.approvals: 1 This PR was reviewed and approved by one person. labels Aug 19, 2025
@JuneStepp
Copy link
Member

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 429180
Commit: 1c7ee3ea1ed9a1389d0319726ac5f9dc5d6a5783


x86_64-linux

✅ 9 packages built:
  • ankiAddons.adjust-sound-volume
  • ankiAddons.anki-connect
  • ankiAddons.anki-quizlet-importer-extended
  • ankiAddons.local-audio-yomichan
  • ankiAddons.passfail2
  • ankiAddons.puppy-reinforcement
  • ankiAddons.recolor
  • ankiAddons.reviewer-refocus-card
  • ankiAddons.yomichan-forvo-server

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: games Gaming on NixOS 8.has: maintainer-list (update) This PR changes `maintainers/maintainer-list.nix` 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 12.approvals: 2 This PR was reviewed and approved by two persons. 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in any of the changed packages.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants