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/mt-940/default.nix

38 lines
970 B
Nix
Raw Normal View History

2018-12-19 09:23:40 +00:00
{ buildPythonPackage, stdenv, pyyaml, pytest, enum34
, pytestpep8, pytestflakes, fetchFromGitHub, isPy3k, lib, glibcLocales
}:
buildPythonPackage rec {
2018-12-19 09:23:40 +00:00
version = "4.12.2";
pname = "mt-940";
src = fetchFromGitHub {
owner = "WoLpH";
2018-12-19 09:23:40 +00:00
repo = "mt940";
2018-05-28 13:59:57 +01:00
rev = "v${version}";
2018-12-19 09:23:40 +00:00
sha256 = "0l7q8v00dhpbc9mh6baaaqc55kf44rszygx28dq3pwp5b5x33nir";
};
2018-12-19 09:23:40 +00:00
postPatch = ''
# No coverage report
sed -i "/--\(no-\)\?cov/d" pytest.ini
'';
2018-12-19 09:23:40 +00:00
propagatedBuildInputs = lib.optional (!isPy3k) enum34;
LC_ALL="en_US.UTF-8";
2018-12-19 09:23:40 +00:00
checkInputs = [ pyyaml pytestpep8 pytestflakes pytest glibcLocales ];
# See https://github.com/WoLpH/mt940/issues/64 for the disabled test
checkPhase = ''
2018-12-19 09:23:40 +00:00
py.test -k "not mt940.models.FixedOffset"
'';
meta = with stdenv.lib; {
description = "A library to parse MT940 files and returns smart Python collections for statistics and manipulation";
2018-12-19 09:23:40 +00:00
inherit (src.meta) homepage;
license = licenses.bsd3;
};
}