summary refs log tree commit diff
path: root/pkgs/development/python-modules/pylti/default.nix
blob: 8d61c2bf9e9896613e23898707f43169a7509e1a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
{ lib
, buildPythonPackage
, fetchPypi
, httplib2
, oauth
, oauth2
, semantic-version
, flask
, httpretty
, oauthlib
, pyflakes
, pytest
, pytestcache
, pytestcov
, covCore
, pytestflakes
, pytestpep8
, sphinx
, mock
, isPy27
}:

buildPythonPackage rec {
  pname = "PyLTI";
  version = "0.5.1";

  disabled = !isPy27;

  # There is no need to fix mock. https://github.com/mitodl/pylti/pull/48
  postPatch = ''
    substituteInPlace setup.py --replace "mock==1.0.1" "mock"
  '';

  propagatedBuildInputs = [ httplib2 oauth oauth2 semantic-version ];
  checkInputs = [
    flask httpretty oauthlib pyflakes pytest pytestcache pytestcov covCore
    pytestflakes pytestpep8 sphinx mock
  ];

  src = fetchPypi {
    inherit pname version;
    sha256 = "32093d961bf95e508bf27667289155da1e082ed9989bb84a76c54c6974c941e1";
  };

  meta = {
    description = "Implementation of IMS LTI interface that works with edX";
    homepage = "https://github.com/mitodl/pylti";
    license = lib.licenses.bsdOriginal;
    maintainers = with lib.maintainers; [ layus ];
  };
}