at master 1.3 kB view raw
1{ 2 buildPythonPackage, 3 fetchFromGitHub, 4 lib, 5 six, 6 pypblib, 7 pytestCheckHook, 8}: 9buildPythonPackage rec { 10 pname = "python-sat"; 11 version = "0.1.8.dev20"; 12 format = "setuptools"; 13 14 src = fetchFromGitHub { 15 owner = "pysathq"; 16 repo = "pysat"; 17 rev = "d94f51e5eff2feef35abbc25480659eafa615cc0"; # upstream does not tag releases 18 hash = "sha256-fKZcdEVuqpv8jWnK8Cr1UJ7szJqXivK6x3YPYHH5ccI="; 19 }; 20 21 # Build SAT solver backends in parallel and fix hard-coded g++ reference for 22 # darwin, where stdenv uses clang 23 postPatch = '' 24 substituteInPlace solvers/prepare.py \ 25 --replace-fail "&& make &&" "&& make -j$NIX_BUILD_CORES &&" 26 substituteInPlace solvers/patches/glucose421.patch \ 27 --replace-fail "+CXX := g++" "+CXX := c++" 28 ''; 29 30 propagatedBuildInputs = [ 31 six 32 pypblib 33 ]; 34 35 nativeCheckInputs = [ pytestCheckHook ]; 36 37 disabledTestPaths = [ "tests/test_unique_mus.py" ]; 38 39 meta = with lib; { 40 description = "Toolkit to provide interface for various SAT (without optional dependancy py-aiger-cnf)"; 41 homepage = "https://github.com/pysathq/pysat"; 42 changelog = "https://pysathq.github.io/updates/"; 43 license = licenses.mit; 44 maintainers = [ 45 maintainers.marius851000 46 maintainers.chrjabs 47 ]; 48 platforms = lib.platforms.all; 49 }; 50}