about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/misc/meerk40t/default.nix
blob: bb426beb0ca9c515704cddb8ec3553cd90759b92 (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
55
56
57
58
59
60
61
{ lib
, fetchFromGitHub
, meerk40t-camera
, python3
, gtk3
, wrapGAppsHook
}:

python3.pkgs.buildPythonApplication rec {
  pname = "MeerK40t";
  version = "0.8.1000";
  format = "setuptools";

  src = fetchFromGitHub {
    owner = "meerk40t";
    repo = pname;
    rev = "refs/tags/${version}";
    hash = "sha256-YCcnqaH4Npmct5IBHsnufswRz8bS7mUb1YFwTta/Dxc=";
  };

  nativeBuildInputs = [
    wrapGAppsHook
  ];

  # prevent double wrapping
  dontWrapGApps = true;

  propagatedBuildInputs = with python3.pkgs; [
    ezdxf
    meerk40t-camera
    opencv4
    pillow
    pyserial
    pyusb
    setuptools
    wxPython_4_2
  ];

  preFixup = ''
    gappsWrapperArgs+=(
      --prefix XDG_DATA_DIRS : "${gtk3}/share/gsettings-schemas/${gtk3.name}"
    )
    makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
  '';

  nativeCheckInputs = with python3.pkgs; [
    unittestCheckHook
  ];

  preCheck = ''
    export HOME=$TMPDIR
  '';

  meta = with lib; {
    changelog = "https://github.com/meerk40t/meerk40t/releases/tag/${version}";
    description = "MeerK40t LaserCutter Software";
    homepage = "https://github.com/meerk40t/meerk40t";
    license = licenses.mit;
    maintainers = with maintainers; [ hexa ];
  };
}