lctime: init at 0.0.26 (#437210)

This commit is contained in:
Ivan Mincik
2025-10-15 06:28:13 +00:00
committed by GitHub
3 changed files with 167 additions and 0 deletions

View File

@@ -0,0 +1,100 @@
{
lib,
stdenv,
python3Packages,
fetchFromGitea,
runCommand,
lctime,
ngspice,
writableTmpDirAsHomeHook,
}:
python3Packages.buildPythonApplication rec {
pname = "lctime";
version = "0.0.26";
pyproject = true;
src = fetchFromGitea {
domain = "codeberg.org";
owner = "librecell";
repo = "lctime";
tag = version;
hash = "sha256-oNmeV8r1dtO2y27jAJnlx4mKGjhzL07ad2yBdOLwgF0=";
};
build-system = with python3Packages; [
setuptools
];
dependencies = with python3Packages; [
joblib
klayout
liberty-parser
matplotlib
networkx
numpy
pyspice
scipy
sympy
];
nativeCheckInputs = with python3Packages; [
pytestCheckHook
ngspice
];
enabledTestPaths = [
"src/lctime/*/*.py"
];
disabledTestPaths = [
# hangs indefinitely
"src/lctime/characterization/test_ngspice_subprocess.py::test_ngspice_interactive_simple"
"src/lctime/characterization/test_ngspice_subprocess.py::test_ngspice_subprocess_class"
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
# causes python to abort
"src/lctime/characterization/test_ngspice_subprocess.py::test_simple_simulation"
# broken pipe
"src/lctime/characterization/test_ngspice_subprocess.py::test_interactive_subprocess"
];
pythonImportsCheck = [
"lctime"
];
passthru = {
tests =
runCommand "lctime-tests"
{
nativeBuildInputs = [
lctime
ngspice
writableTmpDirAsHomeHook
];
}
''
cd "$HOME"
cp -R "${src}/tests/"* .
patchShebangs *.sh
mkdir -p $out
./run_tests.sh &> $out/result.log
'';
};
meta = {
description = "Characterization tool for CMOS digital standard-cells";
homepage = "https://codeberg.org/librecell/lctime";
license = with lib.licenses; [
agpl3Plus
asl20
cc-by-sa-40
cc0
];
maintainers = with lib.maintainers; [ eljamm ];
teams = with lib.teams; [ ngi ];
mainProgram = "lctime";
};
}

View File

@@ -0,0 +1,65 @@
{
lib,
buildPythonPackage,
fetchFromGitea,
setuptools,
lark,
numpy,
sympy,
pytestCheckHook,
}:
buildPythonPackage rec {
pname = "liberty-parser";
version = "0.0.25";
pyproject = true;
src = fetchFromGitea {
domain = "codeberg.org";
owner = "tok";
repo = "liberty-parser";
tag = version;
hash = "sha256-Nl+FRG93DeP1ctDphaTKZqkukEywmGprj6JORJQTunw=";
};
# Tests try to write to /tmp directly. use $TMPDIR instead.
postPatch = ''
substituteInPlace src/liberty/parser.py \
--replace-fail "/tmp" "$TMPDIR"
'';
build-system = [
setuptools
];
dependencies = [
lark
numpy
sympy
];
nativeCheckInputs = [
pytestCheckHook
];
enabledTestPaths = [
"src/liberty/*.py"
];
pythonImportsCheck = [
"liberty.parser"
];
meta = {
description = "Liberty parser for Python";
homepage = "https://codeberg.org/tok/liberty-parser";
license = with lib.licenses; [
asl20
cc-by-sa-40
cc0
gpl3Plus
];
maintainers = with lib.maintainers; [ eljamm ];
teams = with lib.teams; [ ngi ];
};
}

View File

@@ -8241,6 +8241,8 @@ self: super: with self; {
libear = callPackage ../development/python-modules/libear { };
liberty-parser = callPackage ../development/python-modules/liberty-parser { };
libevdev = callPackage ../development/python-modules/libevdev { };
libfdt = toPythonModule (