2022-02-10 20:34:41 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2022-02-20 05:27:41 +00:00
|
|
|
, fetchpatch
|
2022-02-10 20:34:41 +00:00
|
|
|
, poetry-core
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pyhumps";
|
2022-06-16 17:23:12 +00:00
|
|
|
version = "3.7.1";
|
2022-02-10 20:34:41 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "nficano";
|
|
|
|
repo = "humps";
|
|
|
|
rev = "v${version}";
|
2022-06-16 17:23:12 +00:00
|
|
|
hash = "sha256-MxynGgl0bgRUNPdyGqtEpIo1OFEKsSfXFiG4lAL0aPQ=";
|
2022-02-10 20:34:41 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2022-02-20 05:27:41 +00:00
|
|
|
patches = [
|
|
|
|
# Fix naming, https://github.com/nficano/humps/pull/246
|
|
|
|
(fetchpatch {
|
|
|
|
name = "fix-naming.patch";
|
2022-06-16 17:23:12 +00:00
|
|
|
url = "https://github.com/nficano/humps/commit/04739529247ec6c6715a0242a209863d8c66a24d.patch";
|
|
|
|
sha256 = "sha256-6nCKO8BHSPXuT5pE/T/6Dsb6qKVdtRV22Ijbbgtm6ao=";
|
2022-02-20 05:27:41 +00:00
|
|
|
})
|
|
|
|
];
|
2022-02-10 20:34:41 +00:00
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"humps"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Module to convert strings (and dictionary keys) between snake case, camel case and pascal case";
|
|
|
|
homepage = "https://github.com/nficano/humps";
|
|
|
|
license = with licenses; [ unlicense ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|