37 lines
850 B
Nix
37 lines
850 B
Nix
{ buildPythonPackage
|
|
, lib
|
|
, fetchPypi
|
|
, isPy27
|
|
, ruamel-yaml
|
|
, python-dateutil
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
version = "1.5.0";
|
|
pname = "strictyaml";
|
|
disabled = isPy27;
|
|
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
sha256 = "273a6382cc98a404d20779351cd5bb12e746397fbe18a8e9ccec4ae3c0ffa0e2";
|
|
};
|
|
|
|
postPatch = ''
|
|
substituteInPlace setup.py \
|
|
--replace "ruamel.yaml==0.17.4" "ruamel.yaml"
|
|
'';
|
|
|
|
propagatedBuildInputs = [ ruamel-yaml python-dateutil ];
|
|
|
|
# Library tested with external tool
|
|
# https://hitchdev.com/approach/contributing-to-hitch-libraries/
|
|
doCheck = false;
|
|
pythonImportsCheck = [ "strictyaml" ];
|
|
|
|
meta = with lib; {
|
|
description = "Strict, typed YAML parser";
|
|
homepage = "https://hitchdev.com/strictyaml/";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ jonringer ];
|
|
};
|
|
}
|