1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 setuptools, 6 pytest, 7 click, 8 numpy, 9 scipy, 10 rtree, 11}: 12 13buildPythonPackage rec { 14 pname = "gerbonara"; 15 version = "1.2.0"; 16 src = fetchFromGitHub { 17 owner = "jaseg"; 18 repo = "gerbonara"; 19 rev = "v${version}"; 20 hash = "sha256-VU4Of90YUPoLuiUpIDwSUfxQOoKChNbZE0klHkHEmaY="; 21 }; 22 23 format = "setuptools"; 24 25 nativeBuildInputs = [ setuptools ]; 26 27 propagatedBuildInputs = [ 28 click 29 numpy 30 scipy 31 rtree 32 ]; 33 34 preConfigure = '' 35 # setup.py tries to execute a call to git in a subprocess, this avoids it. 36 substituteInPlace setup.py \ 37 --replace "version=version()," \ 38 "version='${version}'," 39 ''; 40 41 pythonImportsCheck = [ "gerbonara" ]; 42 43 # Test environment is exceptionally tricky to get set up, so skip for now. 44 doCheck = false; 45 46 meta = with lib; { 47 description = "Pythonic library for reading/modifying/writing Gerber/Excellon/IPC-356 files"; 48 mainProgram = "gerbonara"; 49 homepage = "https://github.com/jaseg/gerbonara"; 50 license = with licenses; [ asl20 ]; 51 maintainers = with maintainers; [ wulfsta ]; 52 }; 53}