1{ 2 lib, 3 attrs, 4 buildPythonPackage, 5 fetchFromGitHub, 6 mock, 7 okonomiyaki, 8 pytestCheckHook, 9 pythonOlder, 10 pyyaml, 11 setuptools, 12 six, 13}: 14 15buildPythonPackage rec { 16 pname = "simplesat"; 17 version = "0.9.1"; 18 pyproject = true; 19 20 disabled = pythonOlder "3.9"; 21 22 src = fetchFromGitHub { 23 owner = "enthought"; 24 repo = "sat-solver"; 25 tag = "v${version}"; 26 hash = "sha256-/fBnpf1DtaF+wQYZztcB8Y20/ZMYxrF3fH5qRsMucL0="; 27 }; 28 29 postPatch = '' 30 substituteInPlace setup.cfg \ 31 --replace-fail "version = file: VERSION" "version = ${version}" 32 ''; 33 34 build-system = [ setuptools ]; 35 36 dependencies = [ 37 attrs 38 okonomiyaki 39 six 40 ]; 41 42 nativeCheckInputs = [ 43 mock 44 pytestCheckHook 45 pyyaml 46 ]; 47 48 pythonImportsCheck = [ "simplesat" ]; 49 50 preCheck = '' 51 substituteInPlace simplesat/tests/test_pool.py \ 52 --replace-fail "assertRaisesRegexp" "assertRaisesRegex" 53 ''; 54 55 pytestFlagsArray = [ "simplesat/tests" ]; 56 57 meta = with lib; { 58 description = "Prototype for SAT-based dependency handling"; 59 homepage = "https://github.com/enthought/sat-solver"; 60 changelog = "https://github.com/enthought/sat-solver/blob/v${version}/CHANGES.rst"; 61 license = licenses.bsd3; 62 maintainers = with maintainers; [ genericnerdyusername ]; 63 }; 64}