567e8dfd8e
This commit was created by a combination of scripts and tools: - an ast-grep script to prefix things in meta with `lib.`, - a modified nixf-diagnose / nixf combination to remove unused `with lib;`, and - regular nixfmt. Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
51 lines
919 B
Nix
51 lines
919 B
Nix
{
|
||
lib,
|
||
buildPythonPackage,
|
||
fetchPypi,
|
||
curl,
|
||
cython,
|
||
expat,
|
||
libpng,
|
||
setuptools,
|
||
stdenv,
|
||
fixDarwinDylibNames,
|
||
}:
|
||
|
||
buildPythonPackage rec {
|
||
pname = "klayout";
|
||
version = "0.30.4.post1";
|
||
pyproject = true;
|
||
|
||
src = fetchPypi {
|
||
inherit pname version;
|
||
hash = "sha256-jQLVD3IsekQfO0P80miKOtyTyGldc2Vn/mJFfvvgMFo=";
|
||
};
|
||
|
||
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 = {
|
||
description = "KLayout’s Python API";
|
||
homepage = "https://github.com/KLayout/klayout";
|
||
license = lib.licenses.gpl3Plus;
|
||
maintainers = with lib.maintainers; [ fbeffa ];
|
||
platforms = lib.platforms.linux ++ lib.platforms.darwin;
|
||
};
|
||
}
|