-
Notifications
You must be signed in to change notification settings - Fork 0
/
default.nix
70 lines (59 loc) · 1.49 KB
/
default.nix
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
let
bootstrap = import <nixpkgs> { };
nixpkgs = builtins.fromJSON (builtins.readFile ./nixpkgs.json);
src = bootstrap.fetchFromGitHub {
owner = "NixOS";
repo = "nixpkgs-channels";
inherit (nixpkgs) rev sha256;
};
pkgs = import src { };
pythonPkgs = pkgs.python27Packages;
jira-python = pythonPkgs.buildPythonPackage rec {
pname = "jira";
version = "2.0.0";
doCheck = false;
src = pythonPkgs.fetchPypi {
inherit pname version;
sha256 = "14qfpbnjnmqz44zk0msdgpx39ary21vdq2h3xnfv4icfz7glmag2";
};
buildInputs = [
pythonPkgs.sphinx
pythonPkgs.pytestrunner
pythonPkgs.pbr
pythonPkgs.ordereddict
pythonPkgs.argparse
pythonPkgs.requests_oauthlib
pythonPkgs.requests_toolbelt
pythonPkgs.defusedxml
];
propagatedBuildInputs = [
pythonPkgs.ordereddict
pythonPkgs.requests_oauthlib
pythonPkgs.requests_toolbelt
pythonPkgs.ipython
pythonPkgs.defusedxml
pythonPkgs.pbr
];
};
in
pythonPkgs.buildPythonApplication rec {
name = "ledger-jira-sync";
version = "1.0";
src = ./.;
# So nix-shell contains the Python path
shellHook = "export PYTHONPATH=$(pwd):$PYTHONPATH";
propagatedBuildInputs = [
jira-python
pkgs.ledger
];
checkPhase = ''
PYLINTHOME="/tmp" pylint ledger_jira_sync
'';
checkInputs = [ pythonPkgs.pylint ];
buildInputs = [
pkgs.python2
pythonPkgs.ipdb
# only for IDE features
pythonPkgs.autopep8
];
}