{libgdstk,python3Packages.gdstk}: init at 0.9.61

This commit is contained in:
eljamm
2025-12-05 21:35:47 +01:00
parent 01136a4ba3
commit bd3500c822
3 changed files with 146 additions and 0 deletions
+51
View File
@@ -0,0 +1,51 @@
{
lib,
stdenv,
fetchFromGitHub,
nix-update-script,
# build-time deps
cmake,
ninja,
# run-time deps
zlib,
qhull,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "libgdstk";
version = "0.9.61";
pyproject = true;
src = fetchFromGitHub {
owner = "heitzmann";
repo = "gdstk";
tag = "v${finalAttrs.version}";
hash = "sha256-soU+6EbyOkHGvVq230twiRzywOskhkkXFr5akBpvgBw=";
};
nativeBuildInputs = [
cmake
ninja
];
buildInputs = [
zlib
qhull
];
passthru.updateScript = nix-update-script { };
meta = {
description = "C++/Python library for creation and manipulation of GDSII and OASIS files";
homepage = "https://github.com/heitzmann/gdstk";
changelog = "https://github.com/heitzmann/gdstk/blob/${finalAttrs.src.rev}/CHANGELOG.md";
license = lib.licenses.boost;
maintainers = with lib.maintainers; [
eljamm
gonsolo
];
teams = with lib.teams; [ ngi ];
};
})
@@ -0,0 +1,93 @@
{
lib,
buildPythonPackage,
libgdstk,
# build-system
build,
scikit-build-core,
# deps
numpy,
typing-extensions,
# deps (optional)
matplotlib,
sphinx,
sphinx-inline-tabs,
sphinx-rtd-theme,
# build-time
cmake,
ninja,
# run-time
zlib,
qhull,
# tests
pytestCheckHook,
}:
buildPythonPackage {
pname = "gdstk";
inherit (libgdstk) src version;
pyproject = true;
strictDeps = true;
# scikit is supposed to handle the module build
dontUseCmakeConfigure = true;
build-system = [
build
cmake
ninja
numpy
scikit-build-core
];
dependencies = [
numpy
typing-extensions
];
optional-dependencies = {
docs = [
matplotlib
sphinx
sphinx-inline-tabs
sphinx-rtd-theme
];
};
buildInputs = [
zlib
qhull
];
nativeCheckInputs = [
pytestCheckHook
];
# remove the `gdstk` source directory, else pytest will attempt to import it
# instead of the actual module
preCheck = ''
rm -rf gdstk
'';
pythonImportsCheck = [
"gdstk"
];
meta = {
inherit (libgdstk.meta)
description
homepage
changelog
license
maintainers
teams
;
};
}
+2
View File
@@ -5881,6 +5881,8 @@ self: super: with self; {
gdsfactory = callPackage ../development/python-modules/gdsfactory { };
gdstk = callPackage ../development/python-modules/gdstk { };
ge25519 = callPackage ../development/python-modules/ge25519 { };
geant4 = toPythonModule (