Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / applications / misc / meerk40t / default.nix
blobbb426beb0ca9c515704cddb8ec3553cd90759b92
1 { lib
2 , fetchFromGitHub
3 , meerk40t-camera
4 , python3
5 , gtk3
6 , wrapGAppsHook
7 }:
9 python3.pkgs.buildPythonApplication rec {
10   pname = "MeerK40t";
11   version = "0.8.1000";
12   format = "setuptools";
14   src = fetchFromGitHub {
15     owner = "meerk40t";
16     repo = pname;
17     rev = "refs/tags/${version}";
18     hash = "sha256-YCcnqaH4Npmct5IBHsnufswRz8bS7mUb1YFwTta/Dxc=";
19   };
21   nativeBuildInputs = [
22     wrapGAppsHook
23   ];
25   # prevent double wrapping
26   dontWrapGApps = true;
28   propagatedBuildInputs = with python3.pkgs; [
29     ezdxf
30     meerk40t-camera
31     opencv4
32     pillow
33     pyserial
34     pyusb
35     setuptools
36     wxPython_4_2
37   ];
39   preFixup = ''
40     gappsWrapperArgs+=(
41       --prefix XDG_DATA_DIRS : "${gtk3}/share/gsettings-schemas/${gtk3.name}"
42     )
43     makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
44   '';
46   nativeCheckInputs = with python3.pkgs; [
47     unittestCheckHook
48   ];
50   preCheck = ''
51     export HOME=$TMPDIR
52   '';
54   meta = with lib; {
55     changelog = "https://github.com/meerk40t/meerk40t/releases/tag/${version}";
56     description = "MeerK40t LaserCutter Software";
57     homepage = "https://github.com/meerk40t/meerk40t";
58     license = licenses.mit;
59     maintainers = with maintainers; [ hexa ];
60   };