2025-08-15 05:53:53 +00:00

51 lines
907 B
Nix
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{
lib,
buildPythonPackage,
fetchPypi,
curl,
cython,
expat,
libpng,
setuptools,
stdenv,
fixDarwinDylibNames,
}:
buildPythonPackage rec {
pname = "klayout";
version = "0.30.3";
pyproject = true;
src = fetchPypi {
inherit pname version;
hash = "sha256-zyj5s2pHjgrk7/l2cqvcvqCvhdxh7dNG7tlLNGFlOX8=";
};
build-system = [
cython
setuptools
];
buildInputs = [
curl
expat
libpng
];
# libpng-config is needed for the build on Darwin
nativeBuildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
libpng.dev
fixDarwinDylibNames
];
pythonImportsCheck = [ "klayout" ];
meta = with lib; {
description = "KLayouts Python API";
homepage = "https://github.com/KLayout/klayout";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ fbeffa ];
platforms = platforms.linux ++ platforms.darwin;
};
}