about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/gerbonara/default.nix
blob: 15ec60ccc3856730289f4e1d6d39f82b7d0ef8ff (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
{ 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 ];
  };
}