summary refs log tree commit diff
path: root/pkgs/games/mnemosyne/default.nix
diff options
context:
space:
mode:
authorDima <dgoldin+github@protonmail.ch>2019-11-27 21:05:34 +0100
committerLassulus <github@lassul.us>2019-12-07 22:26:54 +0100
commitfdefc23f7d8b2660483ad0be132a10c6d4a92df2 (patch)
treee6a94f6f5e57be4a7a54462f12540765495c7060 /pkgs/games/mnemosyne/default.nix
parent1850d616acbf019f7c5786c4d99cd68b1f760258 (diff)
downloadnixpkgs-fdefc23f7d8b2660483ad0be132a10c6d4a92df2.tar
nixpkgs-fdefc23f7d8b2660483ad0be132a10c6d4a92df2.tar.gz
nixpkgs-fdefc23f7d8b2660483ad0be132a10c6d4a92df2.tar.bz2
nixpkgs-fdefc23f7d8b2660483ad0be132a10c6d4a92df2.tar.lz
nixpkgs-fdefc23f7d8b2660483ad0be132a10c6d4a92df2.tar.xz
nixpkgs-fdefc23f7d8b2660483ad0be132a10c6d4a92df2.tar.zst
nixpkgs-fdefc23f7d8b2660483ad0be132a10c6d4a92df2.zip
mnemosyne: fix application
This application has been missing some dependencies and the
correct environment for Qt. Additionally I added a depdency
on anki to support the import feature.

The project has also moved development to Github, as very briefly
mentioned on https://mnemosyne-proj.org/contributing.php but the
2.6.1 version released there seems to differ and causes a bunch
of new problems, so leaving it for now.
Diffstat (limited to 'pkgs/games/mnemosyne/default.nix')
-rw-r--r--pkgs/games/mnemosyne/default.nix18
1 files changed, 14 insertions, 4 deletions
diff --git a/pkgs/games/mnemosyne/default.nix b/pkgs/games/mnemosyne/default.nix
index 99c369fdce8..675ce1a402f 100644
--- a/pkgs/games/mnemosyne/default.nix
+++ b/pkgs/games/mnemosyne/default.nix
@@ -1,5 +1,6 @@
 { fetchurl
 , python
+, anki
 }:
 
 python.pkgs.buildPythonApplication rec {
@@ -11,23 +12,32 @@ python.pkgs.buildPythonApplication rec {
     sha256 = "0xcwikq51abrlqfn5bv7kcw1ccd3ip0w6cjd5vnnzwnaqwdj8cb3";
   };
 
+  nativeBuildInputs = with python.pkgs; [ wrapPython pyqtwebengine.wrapQtAppsHook ];
+
+  buildInputs = [ anki ];
+
   propagatedBuildInputs = with python.pkgs; [
+    pyqtwebengine
     pyqt5
     matplotlib
     cherrypy
     cheroot
     webob
-    pillow
   ];
 
-  # No tests/ directrory in tarball
-  doCheck = false;
-
   prePatch = ''
     substituteInPlace setup.py --replace /usr $out
     find . -type f -exec grep -H sys.exec_prefix {} ';' | cut -d: -f1 | xargs sed -i s,sys.exec_prefix,\"$out\",
   '';
 
+  # No tests/ directrory in tarball
+  doCheck = false;
+
+  dontWrapQtApps = true;
+  makeWrapperArgs = [
+    "\${qtWrapperArgs[@]}"
+  ];
+
   postInstall = ''
     mkdir -p $out/share
     mv $out/${python.sitePackages}/$out/share/locale $out/share