nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pytestCheckHook,
6}:
7
8buildPythonPackage rec {
9 pname = "ofxtools";
10 version = "0.9.5";
11 format = "setuptools";
12
13 # PyPI distribution does not include tests
14 src = fetchFromGitHub {
15 owner = "csingley";
16 repo = "ofxtools";
17 rev = version;
18 hash = "sha256-NsImnD+erhpakQnl1neuHfSKiV6ipNBMPGKMDM0gwWc=";
19 };
20
21 nativeCheckInputs = [ pytestCheckHook ];
22 # override $HOME directory:
23 # error: [Errno 13] Permission denied: '/homeless-shelter'
24 preCheck = ''
25 export HOME=$(mktemp -d)
26 '';
27
28 meta = {
29 homepage = "https://github.com/csingley/ofxtools";
30 description = "Library for working with Open Financial Exchange (OFX) formatted data used by financial institutions";
31 mainProgram = "ofxget";
32 license = lib.licenses.mit;
33 };
34}