python3Packages.orjson: Disable failing tests on 32 bit
[NixPkgs.git] / pkgs / applications / misc / meerk40t / default.nix
blob28a136c9a257cde55bcfbdb206b41a56488d3c67
1 { lib
2 , fetchFromGitHub
3 , python3
4 , gtk3
5 , wrapGAppsHook
6 }:
8 let
9   inherit (python3.pkgs) buildPythonApplication buildPythonPackage fetchPypi;
11   meerk40t-camera = buildPythonPackage rec {
12     pname = "meerk40t-camera";
13     version = "0.1.9";
14     format = "setuptools";
16     src = fetchPypi {
17       inherit pname version;
18       hash = "sha256-uGCBHdgWoorVX2XqMCg0YBweb00sQ9ZSbJe8rlGeovs=";
19     };
21     postPatch = ''
22       sed -i '/meerk40t/d' setup.py
23     '';
25     propagatedBuildInputs = with python3.pkgs; [
26       opencv4
27     ];
29     pythonImportsCheck = [
30       "camera"
31     ];
33     doCheck = false;
35     meta = with lib; {
36       description = "MeerK40t camera plugin";
37       license = licenses.mit;
38       homepage = "https://github.com/meerk40t/meerk40t-camera";
39       maintainers = with maintainers; [ hexa ];
40     };
41   };
43 buildPythonApplication rec {
44   pname = "MeerK40t";
45   version = "0.8.0031";
46   format = "setuptools";
48   src = fetchFromGitHub {
49     owner = "meerk40t";
50     repo = pname;
51     rev = "refs/tags/${version}";
52     hash = "sha256-7Vc7Z+mxy+xRbUBeivkqVwO86ovZDo42M4G0ZD23vMk=";
53   };
55   nativeBuildInputs = [
56     wrapGAppsHook
57   ];
59   # prevent double wrapping
60   dontWrapGApps = true;
62   propagatedBuildInputs = with python3.pkgs; [
63     ezdxf
64     meerk40t-camera
65     opencv4
66     pillow
67     pyserial
68     pyusb
69     setuptools
70     wxPython_4_2
71   ];
73   preFixup = ''
74     gappsWrapperArgs+=(
75       --prefix XDG_DATA_DIRS : "${gtk3}/share/gsettings-schemas/${gtk3.name}"
76     )
77     makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
78   '';
80   checkInputs = with python3.pkgs; [
81     unittestCheckHook
82   ];
84   preCheck = ''
85     export HOME=$TMPDIR
86   '';
88   meta = with lib; {
89     changelog = "https://github.com/meerk40t/meerk40t/releases/tag/${version}";
90     description = "MeerK40t LaserCutter Software";
91     homepage = "https://github.com/meerk40t/meerk40t";
92     license = licenses.mit;
93     maintainers = with maintainers; [ hexa ];
94   };