nixpkgs/pkgs/games/mnemosyne/default.nix

82 lines
2.3 KiB
Nix
Raw Normal View History

{ fetchurl
2017-12-18 11:07:46 +01:00
, python
, anki
}:
2017-12-18 11:07:46 +01:00
python.pkgs.buildPythonApplication rec {
pname = "mnemosyne";
2020-07-25 14:33:04 +02:00
version = "2.7.2";
2017-12-18 11:07:46 +01:00
src = fetchurl {
2017-12-18 11:07:46 +01:00
url = "mirror://sourceforge/project/mnemosyne-proj/mnemosyne/mnemosyne-${version}/Mnemosyne-${version}.tar.gz";
2020-07-25 14:33:04 +02:00
sha256 = "09yp9zc00xrc9dmjbsscnkb3hsv3yj46sxikc0r6s9cbghn3nypy";
};
2017-12-18 11:07:46 +01:00
nativeBuildInputs = with python.pkgs; [ pyqtwebengine.wrapQtAppsHook ];
buildInputs = [ anki ];
2017-12-18 11:07:46 +01:00
propagatedBuildInputs = with python.pkgs; [
cheroot
cherrypy
googletrans
gtts
matplotlib
pyopengl
pyqt5
pyqtwebengine
webob
];
2017-12-18 11:07:46 +01:00
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\",
'';
2017-12-18 11:07:46 +01:00
# No tests/ directrory in tarball
doCheck = false;
postInstall = ''
2020-04-11 02:16:16 +02:00
mkdir -p $out/share/applications
2017-12-18 11:07:46 +01:00
mv $out/${python.sitePackages}/$out/share/locale $out/share
2020-04-11 02:16:16 +02:00
mv mnemosyne.desktop $out/share/applications
2017-12-18 11:07:46 +01:00
rm -r $out/${python.sitePackages}/nix
'';
2017-12-18 11:07:46 +01:00
dontWrapQtApps = true;
makeWrapperArgs = [
"\${qtWrapperArgs[@]}"
];
meta = {
2020-02-24 01:43:25 +01:00
homepage = "https://mnemosyne-proj.org/";
2014-11-11 14:20:43 +01:00
description = "Spaced-repetition software";
longDescription = ''
The Mnemosyne Project has two aspects:
* It's a free flash-card tool which optimizes your learning process.
* It's a research project into the nature of long-term memory.
We strive to provide a clear, uncluttered piece of software, easy to use
and to understand for newbies, but still infinitely customisable through
plugins and scripts for power users.
## Efficient learning
Mnemosyne uses a sophisticated algorithm to schedule the best time for
a card to come up for review. Difficult cards that you tend to forget
quickly will be scheduled more often, while Mnemosyne won't waste your
time on things you remember well.
## Memory research
If you want, anonymous statistics on your learning process can be
uploaded to a central server for analysis. This data will be valuable to
study the behaviour of our memory over a very long time period. The
results will be used to improve the scheduling algorithms behind the
2015-03-10 15:38:59 +01:00
software even further.
'';
};
}