-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathshell.nix
More file actions
177 lines (163 loc) · 4.41 KB
/
shell.nix
File metadata and controls
177 lines (163 loc) · 4.41 KB
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
/*
* This file is a nix expression which can be used to get an isolated
* development environemt.
*
* When the nix package manager is installed run
* > nix-shell
* to get a shell with the dependenies of schedgen present. This was only tested
* on NixOS, but should work on other platforms which are supported by the Nix
* packagemanger (such as MacOS X) too.
*/
{ pkgs ? import <nixpkgs> {} }:
with import <nixpkgs> {};
let
matplot2tikz = python312.pkgs.buildPythonPackage {
pname = "matplot2tikz";
version = "0.4.1";
doCheck = false;
format = "pyproject";
nativeBuildInputs = with pkgs.python312Packages; [ setuptools setuptools-scm wheel matplotlib numpy pillow webcolors ];
propagatedBuildInputs = with pkgs.python312Packages; [ setuptools setuptools-scm ];
preBuild = ''
cat > pyproject.toml << EOF
[build-system]
requires = ["setuptools>=68", "setuptools_scm[toml]>=8"]
build-backend = "setuptools.build_meta"
[project]
name = "matplot2tikz"
description = "Convert matplotlib figures into TikZ/PGFPlots"
readme = "README.md"
keywords = ["latex", "tikz", "matplotlib", "graphics"]
dynamic = ["version"]
requires-python = ">=3.9"
dependencies = [
"matplotlib >= 1.4.0",
"numpy",
"Pillow",
"webcolors",
"typing_extensions >= 4.5",
]
authors = [
{name="Erwin de Gelder", email="erwindegelder@gmail.com"},
{name="Nico Schlömer", email="nico.schloemer@gmail.com"},
]
classifiers=[
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
]
# Enables the usage of setuptools_scm
[tool.setuptools_scm]
[project.optional-dependencies]
lint = [
"mypy",
"ruff",
]
test = [
"pytest>=7.4.1",
"pytest-cov>=6.0.0",
"coverage[toml]>=7.0.0",
"typeguard>=4.4.0",
]
dev = [
"tox",
"tox-pyenv-redux",
"mypy",
"ruff",
"pytest>=7.4.1",
"pytest-cov>=6.0.0",
"coverage[toml]>=7.0.0",
"typeguard>=4.4.0",
]
[tool.ruff]
line-length = 100
src = ["src"]
extend-exclude = [
"conf.py",
]
target-version = "py39"
lint.select = ["ALL"]
lint.ignore = [
"COM812", # Conflicts with the formatter
"ISC001", # Conflicts with the formatter
"PT001", # https://github.com/astral-sh/ruff/issues/8796#issuecomment-1825907715
"PT023", # https://github.com/astral-sh/ruff/issues/8796#issuecomment-1825907715
]
[tool.ruff.lint.per-file-ignores]
"tests/**" = [
"S101", # Use of `assert` detected
"D103", # Missing docstring in public function
]
"**/__init__.py" = [
"F401", # Imported but unused
]
"docs/**" = [
"INP001", # Requires __init__.py but docs folder is not a package.
]
[tool.ruff.lint.pyupgrade]
# Preserve types, even if a file imports `from __future__ import annotations`(https://github.com/astral-sh/ruff/issues/5434)
keep-runtime-typing = true
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.mypy]
disallow_untyped_defs = true # Functions need to be annotated
warn_unused_ignores = true
exclude = [
"matplot2tikz-\\\\d+", # Ignore temporary folder created by setuptools when building an sdist
"venv.*/",
"build/",
"dist/",
]
ignore_missing_imports = true
[tool.pytest.ini_options]
addopts = """
--import-mode=append
--cov=matplot2tikz
--cov-config=pyproject.toml
--cov-report=
"""
[tool.coverage.paths]
# Maps coverage measured in site-packages to source files in src
source = ["src/", ".tox/*/lib/python*/site-packages/"]
[tool.coverage.html]
directory = "reports/coverage_html"
'';
src = fetchPypi {
pname = "matplot2tikz";
version = "0.4.1";
hash = "sha256-FZ41809D9QOKYBKBlgZWfGWsOxitHoXFryIxp2r7YBQ=";
};
};
in
pkgs.stdenv.mkDerivation {
name = "SMT-LIB-db";
hardeningDisable = [ "all" ];
buildInputs = with pkgs; [
python3
sqlitebrowser
sqlite
# zig_0_13
zstd
black
parallel
csvkit
gmp
python312Packages.beautifulsoup4
python312Packages.flask
python312Packages.gunicorn
python312Packages.polars
python312Packages.altair
python312Packages.pip
python312Packages.vega
python312Packages.rich
python312Packages.matplotlib
python312Packages.numpy
python312Packages.scikit-learn
python312Packages.typer
uv
matplot2tikz
];
}