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

anki: 2.0.52 -> 2.1.4 #46599

Closed
wants to merge 1 commit into from
Closed

anki: 2.0.52 -> 2.1.4 #46599

wants to merge 1 commit into from

Conversation

NickHu
Copy link
Contributor

@NickHu NickHu commented Sep 13, 2018

New version of Anki. The jump from 2.0 -> 2.1 is somewhat major, especially
considering it moved from python 2 to python 3.

Note that this will not work with versions of qt that aren't 5.9, which
currently does not build on NixOS. I got it to build by applying this patch

diff --git a/pkgs/development/libraries/qt-5/modules/qtwebkit.nix b/pkgs/development/libraries/qt-5/modules/qtwebkit.nix
index 833433fabec..1970111fc09 100644
--- a/pkgs/development/libraries/qt-5/modules/qtwebkit.nix
+++ b/pkgs/development/libraries/qt-5/modules/qtwebkit.nix
@@ -35,7 +35,6 @@ qtModule {
 
   cmakeFlags = optionals (lib.versionAtLeast qtbase.version "5.11.0") [ "-DPORT=Qt" ];
 
-  inherit src;
   inherit version;
 
   __impureHostDeps = optionals (stdenv.isDarwin) [

I don't really know what's going on there, but once that builds, Anki seems to
build fine and work well.

  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Fits CONTRIBUTING.md.

@worldofpeace
Copy link
Contributor

Note that this will not work with versions of qt that aren't 5.9, which
currently does not build on NixOS.

qtwebkit now builds successfully due to this cb38098 commit.

@jtojnar
Copy link
Contributor

jtojnar commented Sep 15, 2018

cc #33248

- # running from source?
- srcFolder = os.path.join(os.path.dirname(__file__), "..")
- webInSrcFolder = os.path.abspath(os.path.join(srcFolder, "web"))
- if os.path.exists(webInSrcFolder):
Copy link
Member

Choose a reason for hiding this comment

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

This path was not found?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think not... I can't really remember because I did this at least a couple of weeks ago

Copy link
Member

Choose a reason for hiding this comment

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

Could be web copied next to the aqt directory

- ["lame", "rec.wav", processingDst, "--noreplaygain", "--quiet"],
+ [lameCmd, "rec.wav", processingDst, "--noreplaygain", "--quiet"],
- ["lame", processingSrc, processingDst, "--noreplaygain", "--quiet"],
+ [lameCmd, processingSrc, processingDst, "--noreplaygain", "--quiet"],
Copy link
Member

@Mic92 Mic92 Sep 18, 2018

Choose a reason for hiding this comment

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

Because we have to wrap python applications anyway, you can also add lame to PATH by setting makeWrapperArgs: https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/backup/borg/default.nix#L31

Same for mplayer. This way we reduce the number of patches.

def langDir():
- dir = os.path.join(os.path.dirname(
- os.path.abspath(__file__)), "locale")
Copy link
Member

Choose a reason for hiding this comment

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

What happens if locale would be in the anki directory?

- # running from source?
- srcFolder = os.path.join(os.path.dirname(__file__), "..")
- webInSrcFolder = os.path.abspath(os.path.join(srcFolder, "web"))
- if os.path.exists(webInSrcFolder):
Copy link
Member

Choose a reason for hiding this comment

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

Could be web copied next to the aqt directory

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