2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
flit-core,
|
|
|
|
inform,
|
|
|
|
pythonOlder,
|
|
|
|
sly,
|
2023-01-11 07:51:40 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "quantiphy-eval";
|
|
|
|
version = "0.5";
|
2023-10-09 19:29:22 +00:00
|
|
|
format = "pyproject";
|
2023-01-11 07:51:40 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.6";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "KenKundert";
|
|
|
|
repo = "quantiphy_eval";
|
|
|
|
rev = "v${version}";
|
|
|
|
hash = "sha256-7VHcuINhe17lRNkHUnZkVOEtD6mVWk5gu0NbrLZwprg=";
|
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ flit-core ];
|
2023-10-09 19:29:22 +00:00
|
|
|
|
2023-01-11 07:51:40 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
inform
|
|
|
|
sly
|
|
|
|
];
|
|
|
|
|
|
|
|
# this has a circular dependency on quantiphy
|
|
|
|
preBuild = ''
|
|
|
|
sed -i '/quantiphy>/d' ./pyproject.toml
|
|
|
|
'';
|
|
|
|
|
|
|
|
# tests require quantiphy import
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
# Also affected by the circular dependency on quantiphy
|
|
|
|
# pythonImportsCheck = [
|
|
|
|
# "quantiphy_eval"
|
|
|
|
# ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "QuantiPhy support for evals in-line";
|
|
|
|
homepage = "https://github.com/KenKundert/quantiphy_eval/";
|
|
|
|
changelog = "https://github.com/KenKundert/quantiphy_eval/releases/tag/v${version}";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ jpetrucciani ];
|
|
|
|
};
|
|
|
|
}
|