diff options
author | Nikolay Amiantov <ab@fmap.me> | 2018-02-18 12:27:15 +0300 |
---|---|---|
committer | Nikolay Amiantov <ab@fmap.me> | 2018-02-18 12:53:36 +0300 |
commit | 3957b6b37918cf06366ef7b0aeb810405eea6a34 (patch) | |
tree | 315510f8f68ed07a15fda234e03db08a2b8578d7 /pkgs/development/python-modules/moinmoin | |
parent | 96ac69288b07e1bfb58bd559c920eff86b8c6aab (diff) |
moinmoin: refactor and fix build
Diffstat (limited to 'pkgs/development/python-modules/moinmoin')
-rw-r--r-- | pkgs/development/python-modules/moinmoin/default.nix | 32 | ||||
-rw-r--r-- | pkgs/development/python-modules/moinmoin/fix_tests.patch | 16 |
2 files changed, 48 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/moinmoin/default.nix b/pkgs/development/python-modules/moinmoin/default.nix new file mode 100644 index 000000000000..cedd45f2f225 --- /dev/null +++ b/pkgs/development/python-modules/moinmoin/default.nix @@ -0,0 +1,32 @@ +{ lib, buildPythonPackage, fetchurl, fetchpatch +, pytest, werkzeug, pygments +}: + +buildPythonPackage rec { + name = "moinmoin-${ver}"; + ver = "1.9.9"; + + src = fetchurl { + url = "http://static.moinmo.in/files/moin-${ver}.tar.gz"; + sha256 = "197ga41qghykmir80ik17f9hjpmixslv3zjgj7bj9qvs1dvdg5s3"; + }; + + patches = [ + # Recommended to install on their download page. + (fetchpatch { + url = "https://bitbucket.org/thomaswaldmann/moin-1.9/commits/561b7a9c2bd91b61d26cd8a5f39aa36bf5c6159e/raw"; + sha256 = "1nscnl9nspnrwyf3n95ig0ihzndryinq9kkghliph6h55cncfc65"; + }) + ./fix_tests.patch + ]; + + checkInputs = [ pytest werkzeug pygments ]; + + meta = with lib; { + description = "Advanced, easy to use and extensible WikiEngine"; + + homepage = "http://moinmo.in/"; + + license = licenses.gpl2Plus; + }; +} diff --git a/pkgs/development/python-modules/moinmoin/fix_tests.patch b/pkgs/development/python-modules/moinmoin/fix_tests.patch new file mode 100644 index 000000000000..e9856eeffca6 --- /dev/null +++ b/pkgs/development/python-modules/moinmoin/fix_tests.patch @@ -0,0 +1,16 @@ +diff -ru3 moin-1.9.9-old/MoinMoin/conftest.py moin-1.9.9-new/MoinMoin/conftest.py +--- moin-1.9.9-old/MoinMoin/conftest.py 2016-10-31 23:44:02.000000000 +0300 ++++ moin-1.9.9-new/MoinMoin/conftest.py 2018-02-18 12:13:19.551929093 +0300 +@@ -22,10 +22,11 @@ + + import atexit + import sys ++import os + + import py + +-rootdir = py.magic.autopath().dirpath() ++rootdir = os.path.abspath(os.path.dirname(__file__)) + moindir = rootdir.join("..") + sys.path.insert(0, str(moindir)) + |