2021-01-25 09:26:54 +01:00
|
|
|
{ lib
|
2017-12-31 10:52:37 +01:00
|
|
|
, buildPythonPackage
|
2019-04-04 11:03:15 +02:00
|
|
|
, fetchFromGitHub
|
2017-12-31 10:52:37 +01:00
|
|
|
, python
|
2019-04-04 11:03:15 +02:00
|
|
|
, pytest
|
2017-12-31 10:52:37 +01:00
|
|
|
}:
|
2017-07-15 10:19:17 +02:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pytoml";
|
2019-04-04 11:03:15 +02: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 10:19:17 +02:00
|
|
|
|
2017-12-31 10:52:37 +01:00
|
|
|
checkPhase = ''
|
|
|
|
${python.interpreter} test/test.py
|
2019-04-04 11:03:15 +02:00
|
|
|
pytest test
|
2017-12-31 10:52:37 +01:00
|
|
|
'';
|
2017-07-15 10:19:17 +02:00
|
|
|
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2017-07-15 10:19:17 +02:00
|
|
|
description = "A TOML parser/writer for Python";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://github.com/avakar/pytoml";
|
2017-07-15 10:19:17 +02:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ peterhoeg ];
|
|
|
|
};
|
|
|
|
}
|