2021-12-06 16:07:01 +00:00
|
|
|
{ buildPythonPackage
|
|
|
|
, isPy3k
|
|
|
|
, fetchFromGitHub
|
|
|
|
, lib
|
|
|
|
, z3
|
|
|
|
, ply
|
|
|
|
, igraph
|
|
|
|
, oset
|
|
|
|
, ordered-set
|
|
|
|
, dictionaries
|
|
|
|
, setuptools
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage {
|
|
|
|
pname = "cozy";
|
|
|
|
version = "2.0a1";
|
2020-09-25 04:45:31 +00:00
|
|
|
disabled = !isPy3k;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2021-12-06 16:07:01 +00:00
|
|
|
setuptools
|
|
|
|
z3
|
|
|
|
ply
|
|
|
|
igraph
|
|
|
|
oset
|
|
|
|
ordered-set
|
|
|
|
dictionaries
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "CozySynthesizer";
|
|
|
|
repo = "cozy";
|
|
|
|
rev = "f553e9b";
|
|
|
|
sha256 = "1jhr5gzihj8dkg0yc5dmi081v2isxharl0ph7v2grqj0bwqzl40j";
|
|
|
|
};
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
# - yoink the Z3 dependency name, because our Z3 package doesn't provide it.
|
|
|
|
# - remove "dictionaries" version bound
|
|
|
|
# - patch igraph package name
|
2020-04-24 23:36:52 +00:00
|
|
|
postPatch = ''
|
2021-12-06 16:07:01 +00:00
|
|
|
sed -i -e '/z3-solver/d' \
|
|
|
|
-e 's/^dictionaries.*$/dictionaries/' \
|
|
|
|
-e 's/python-igraph/igraph/' \
|
|
|
|
requirements.txt
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
# Tests are not correctly set up in the source tree.
|
|
|
|
doCheck = false;
|
2020-09-25 04:45:31 +00:00
|
|
|
pythonImportsCheck = [ "cozy" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
# There is some first-time-run codegen that we will force to happen.
|
|
|
|
postInstall = ''
|
|
|
|
$out/bin/cozy --help
|
|
|
|
'';
|
|
|
|
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "The collection synthesizer";
|
|
|
|
homepage = "https://cozy.uwplse.org/";
|
2021-12-06 16:07:01 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ MostAwesomeDude ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|