nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 attrs,
4 buildPythonPackage,
5 fetchFromGitHub,
6 mock,
7 okonomiyaki,
8 pytestCheckHook,
9 pyyaml,
10 setuptools,
11 six,
12}:
13
14buildPythonPackage rec {
15 pname = "simplesat";
16 version = "0.9.2";
17 pyproject = true;
18
19 src = fetchFromGitHub {
20 owner = "enthought";
21 repo = "sat-solver";
22 tag = "v${version}";
23 hash = "sha256-C3AQN999iuckaY9I0RTI8Uj6hrV4UB1XYvua5VG8hHw=";
24 };
25
26 postPatch = ''
27 substituteInPlace setup.cfg \
28 --replace-fail "version = file: VERSION" "version = ${version}"
29 '';
30
31 build-system = [ setuptools ];
32
33 dependencies = [
34 attrs
35 okonomiyaki
36 six
37 ];
38
39 nativeCheckInputs = [
40 mock
41 pytestCheckHook
42 pyyaml
43 ];
44
45 pythonImportsCheck = [ "simplesat" ];
46
47 enabledTestPaths = [ "simplesat/tests" ];
48
49 meta = {
50 description = "Prototype for SAT-based dependency handling";
51 homepage = "https://github.com/enthought/sat-solver";
52 changelog = "https://github.com/enthought/sat-solver/blob/${src.tag}/CHANGES.rst";
53 license = lib.licenses.bsd3;
54 maintainers = [ ];
55 };
56}