2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
2024-07-27 06:49:29 +00:00
|
|
|
gitUpdater,
|
2024-06-05 15:53:02 +00:00
|
|
|
setuptools,
|
|
|
|
click,
|
|
|
|
numpy,
|
|
|
|
scipy,
|
|
|
|
rtree,
|
2024-02-29 20:09:43 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "gerbonara";
|
2024-07-27 06:49:29 +00:00
|
|
|
version = "1.4.0";
|
2024-02-29 20:09:43 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jaseg";
|
|
|
|
repo = "gerbonara";
|
|
|
|
rev = "v${version}";
|
2024-07-27 06:49:29 +00:00
|
|
|
hash = "sha256-SwXoCA9ru5VgH4geKUDgdcPrgEYgNoVwNb5YUBAcXlo=";
|
2024-02-29 20:09:43 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
format = "setuptools";
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ setuptools ];
|
2024-02-29 20:09:43 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
click
|
|
|
|
numpy
|
|
|
|
scipy
|
|
|
|
rtree
|
|
|
|
];
|
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
# setup.py tries to execute a call to git in a subprocess, this avoids it.
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "version=version()," \
|
|
|
|
"version='${version}',"
|
|
|
|
'';
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "gerbonara" ];
|
|
|
|
|
|
|
|
# Test environment is exceptionally tricky to get set up, so skip for now.
|
|
|
|
doCheck = false;
|
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
passthru.updateScript = gitUpdater { rev-prefix = "v"; };
|
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Pythonic library for reading/modifying/writing Gerber/Excellon/IPC-356 files";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "gerbonara";
|
2024-02-29 20:09:43 +00:00
|
|
|
homepage = "https://github.com/jaseg/gerbonara";
|
|
|
|
license = with licenses; [ asl20 ];
|
|
|
|
maintainers = with maintainers; [ wulfsta ];
|
|
|
|
};
|
|
|
|
}
|