2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
buildPythonPackage,
|
|
|
|
cffi,
|
|
|
|
fetchPypi,
|
|
|
|
lib,
|
|
|
|
pytestCheckHook,
|
2021-01-05 17:05:55 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "reflink";
|
2023-10-09 19:29:22 +00:00
|
|
|
version = "0.2.2";
|
2024-01-02 11:29:13 +00:00
|
|
|
format = "setuptools";
|
2021-01-05 17:05:55 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-10-09 19:29:22 +00:00
|
|
|
hash = "sha256-iCN17nMZJ1rl9qahKHQGNl2sHpZDuRrRDlGH0/hCU70=";
|
2021-01-05 17:05:55 +00:00
|
|
|
};
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
propagatedBuildInputs = [ cffi ];
|
|
|
|
|
|
|
|
propagatedNativeBuildInputs = [ cffi ];
|
2021-01-05 17:05:55 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2021-01-05 17:05:55 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "pytest-runner" ""
|
|
|
|
'';
|
|
|
|
|
2021-01-05 17:05:55 +00:00
|
|
|
# FIXME: These do not work, and I have been unable to figure out why.
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "reflink" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python reflink wraps around platform specific reflink implementations";
|
|
|
|
homepage = "https://gitlab.com/rubdos/pyreflink";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ lovesegfault ];
|
|
|
|
};
|
|
|
|
}
|