-
-
Notifications
You must be signed in to change notification settings - Fork 16.6k
ankiAddons.puppy-reinforcement: init at 1.1.1 #429180
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
base: master
Are you sure you want to change the base?
Conversation
@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? |
You can add the sand one I used |
meta = { | ||
description = "Anki add-on that encourages learners with pictures of cute puppies"; | ||
homepage = "https://ankiweb.net/shared/info/1722658993"; | ||
license = lib.licenses.agpl3Only; |
There was a problem hiding this comment.
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.
This comment was marked as outdated.
Sorry, something went wrong.
There was a problem hiding this 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
''
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
There was a problem hiding this 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.
|
Things done
puppy-reinforcement is an addon that shows images of puppies while reviewing in a changable interval
Repo
passthru.tests
.nixpkgs-review
on this PR. See nixpkgs-review usage../result/bin/
.Add a 👍 reaction to pull requests you find important.