nixpkgs/pkgs/development/python-modules/gerbonara/default.nix
stuebinm ff1a94e523 treewide: add meta.mainProgram to packages with a single binary
The nixpkgs-unstable channel's programs.sqlite was used to identify
packages producing exactly one binary, and these automatically added
to their package definitions wherever possible.
2024-03-19 03:14:51 +01:00

54 lines
1.1 KiB
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, setuptools
, pytest
, click
, numpy
, scipy
, rtree
}:
buildPythonPackage rec {
pname = "gerbonara";
version = "1.2.0";
src = fetchFromGitHub {
owner = "jaseg";
repo = "gerbonara";
rev = "v${version}";
hash = "sha256-VU4Of90YUPoLuiUpIDwSUfxQOoKChNbZE0klHkHEmaY=";
};
format = "setuptools";
nativeBuildInputs = [
setuptools
];
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;
meta = with lib; {
description = "Pythonic library for reading/modifying/writing Gerber/Excellon/IPC-356 files";
mainProgram = "gerbonara";
homepage = "https://github.com/jaseg/gerbonara";
license = with licenses; [ asl20 ];
maintainers = with maintainers; [ wulfsta ];
};
}