1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
{
buildPythonPackage,
fetchFromGitHub,
writeText,
lib,
attrs,
mock,
okonomiyaki,
pytestCheckHook,
pyyaml,
setuptools,
six,
}:
let
version = "0.9.0";
versionFile = writeText "simplesat_ver" ''
version = '${version}'
full_version = '${version}'
git_revision = '0000000000000000000000000000000000000000'
is_released = True
msi_version = '${version}.000'
version_info = (${lib.versions.major version}, ${lib.versions.minor version}, ${lib.versions.patch version}, 'final', 0)
'';
in
buildPythonPackage rec {
pname = "simplesat";
inherit version;
pyproject = true;
src = fetchFromGitHub {
owner = "enthought";
repo = "sat-solver";
rev = "refs/tags/v${version}";
hash = "sha256-8sUOV42MLM3otG3EKvVzKKGAUpSlaTj850QZxZa62bE=";
};
preConfigure = ''
cp ${versionFile} simplesat/_version.py
'';
build-system = [ setuptools ];
dependencies = [
attrs
okonomiyaki
six
];
pythonImportsCheck = [ "simplesat" ];
nativeCheckInputs = [
mock
pytestCheckHook
pyyaml
];
pytestFlagsArray = [ "simplesat/tests" ];
meta = with lib; {
homepage = "https://github.com/enthought/sat-solver";
description = "Prototype for SAT-based dependency handling";
maintainers = with maintainers; [ genericnerdyusername ];
license = licenses.bsd3;
};
}
|