1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-25 03:17:13 +00:00
nixpkgs/pkgs/development/python-modules/ofxtools/default.nix
Jon Banafato 2da6401bc2 pythonPackages.ofxtools: unbreak
- Remove `sqlalchemy` from `buildInputs`. This dependency was removed in
  [0.7.0]. Per the project's readme, `ofxtools` only depends on the
  standard library.

- Disable for Python versions older than 3.7, the minimum Python version
  supported by `ofxtools` starting with the [0.8.17] release.

- Fix the `checkPhase` by fetching from GitHub instead of PyPI to get a
  distribution that includes tests, overriding the home directory to
  allow tests that depend on it being writeable, and switching to
  `nosetests` to match the upstream project's test setup.

[0.7.0]: 8a795787d9
[0.8.17]: ddeda980ed
2020-04-13 00:26:35 -07:00

36 lines
814 B
Nix

{ stdenv
, buildPythonPackage
, fetchFromGitHub
, nose
, python
, pythonOlder
}:
buildPythonPackage rec {
pname = "ofxtools";
version = "0.8.20";
disabled = pythonOlder "3.7";
# PyPI distribution does not include tests
src = fetchFromGitHub {
owner = "csingley";
repo = pname;
rev = version;
sha256 = "1s3fhhmj1acnmqglh39003db0bi451m4hcrkcpyrkqf5m32lslz8";
};
checkInputs = [ nose ];
# override $HOME directory:
# error: [Errno 13] Permission denied: '/homeless-shelter'
checkPhase = ''
HOME=$TMPDIR nosetests tests/*.py
'';
meta = with stdenv.lib; {
homepage = "https://github.com/csingley/ofxtools";
description = "Library for working with Open Financial Exchange (OFX) formatted data used by financial institutions";
license = licenses.mit;
};
}