2021-01-25 08:26:54 +00:00
|
|
|
{ lib
|
2017-12-31 09:52:37 +00:00
|
|
|
, buildPythonPackage
|
2019-04-04 10:03:15 +01:00
|
|
|
, fetchFromGitHub
|
2017-12-31 09:52:37 +00:00
|
|
|
, python
|
2019-04-04 10:03:15 +01:00
|
|
|
, pytest
|
2017-12-31 09:52:37 +00:00
|
|
|
}:
|
2017-07-15 09:19:17 +01:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pytoml";
|
2019-04-04 10:03:15 +01:00
|
|
|
version = "0.1.20";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "avakar";
|
|
|
|
repo = "pytoml";
|
|
|
|
rev = "v${version}";
|
|
|
|
fetchSubmodules = true; # ensure test submodule is available
|
|
|
|
sha256 = "02hjq44zhh6z0fsbm3hvz34sav6fic90sjrw8g1pkdvskzzl46mz";
|
|
|
|
};
|
|
|
|
|
|
|
|
checkInputs = [ pytest ];
|
2017-07-15 09:19:17 +01:00
|
|
|
|
2017-12-31 09:52:37 +00:00
|
|
|
checkPhase = ''
|
|
|
|
${python.interpreter} test/test.py
|
2019-04-04 10:03:15 +01:00
|
|
|
pytest test
|
2017-12-31 09:52:37 +00:00
|
|
|
'';
|
2017-07-15 09:19:17 +01:00
|
|
|
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2017-07-15 09:19:17 +01:00
|
|
|
description = "A TOML parser/writer for Python";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/avakar/pytoml";
|
2017-07-15 09:19:17 +01:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ peterhoeg ];
|
|
|
|
};
|
|
|
|
}
|