2022-09-09 23:58:49 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
2022-11-13 12:59:00 +00:00
|
|
|
, meerk40t-camera
|
2024-01-05 14:34:36 +00:00
|
|
|
, python3Packages
|
2022-09-09 23:58:49 +00:00
|
|
|
, gtk3
|
2024-04-26 20:24:03 +00:00
|
|
|
, wrapGAppsHook3
|
2022-09-09 23:58:49 +00:00
|
|
|
}:
|
|
|
|
|
2024-01-05 14:34:36 +00:00
|
|
|
python3Packages.buildPythonApplication rec {
|
2022-09-09 23:58:49 +00:00
|
|
|
pname = "MeerK40t";
|
2024-02-21 08:54:26 +00:00
|
|
|
version = "0.9.4000";
|
2024-01-05 14:34:36 +00:00
|
|
|
pyproject = true;
|
2022-09-09 23:58:49 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "meerk40t";
|
|
|
|
repo = pname;
|
|
|
|
rev = "refs/tags/${version}";
|
2024-02-21 08:54:26 +00:00
|
|
|
hash = "sha256-ceDnnHdmJ6VOrM9pSxjeKQ748E8fsIqSQ36qFpXc9Ac=";
|
2022-09-09 23:58:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
2024-04-26 20:24:03 +00:00
|
|
|
wrapGAppsHook3
|
2024-01-05 14:34:36 +00:00
|
|
|
] ++ (with python3Packages; [
|
|
|
|
setuptools
|
|
|
|
]);
|
2022-09-09 23:58:49 +00:00
|
|
|
|
|
|
|
# prevent double wrapping
|
|
|
|
dontWrapGApps = true;
|
|
|
|
|
2024-01-05 14:34:36 +00:00
|
|
|
# https://github.com/meerk40t/meerk40t/blob/main/setup.py
|
|
|
|
propagatedBuildInputs = with python3Packages; [
|
2022-09-09 23:58:49 +00:00
|
|
|
meerk40t-camera
|
2024-01-05 14:34:36 +00:00
|
|
|
numpy
|
2022-09-09 23:58:49 +00:00
|
|
|
pyserial
|
|
|
|
pyusb
|
|
|
|
setuptools
|
2024-01-07 12:35:51 +00:00
|
|
|
wxpython
|
2024-01-05 14:34:36 +00:00
|
|
|
]
|
|
|
|
++ lib.flatten (lib.attrValues passthru.optional-dependencies);
|
|
|
|
|
|
|
|
passthru.optional-dependencies = with python3Packages; {
|
|
|
|
cam = [
|
|
|
|
opencv4
|
|
|
|
];
|
|
|
|
camhead = [
|
|
|
|
opencv4
|
|
|
|
];
|
|
|
|
dxf = [
|
|
|
|
ezdxf
|
|
|
|
];
|
|
|
|
gui = [
|
|
|
|
wxpython
|
|
|
|
pillow
|
|
|
|
opencv4
|
|
|
|
ezdxf
|
|
|
|
];
|
|
|
|
};
|
2022-09-09 23:58:49 +00:00
|
|
|
|
|
|
|
preFixup = ''
|
|
|
|
gappsWrapperArgs+=(
|
|
|
|
--prefix XDG_DATA_DIRS : "${gtk3}/share/gsettings-schemas/${gtk3.name}"
|
|
|
|
)
|
|
|
|
makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
|
|
|
|
'';
|
|
|
|
|
2024-01-05 14:34:36 +00:00
|
|
|
nativeCheckInputs = with python3Packages; [
|
2022-09-09 23:58:49 +00:00
|
|
|
unittestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
export HOME=$TMPDIR
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
changelog = "https://github.com/meerk40t/meerk40t/releases/tag/${version}";
|
|
|
|
description = "MeerK40t LaserCutter Software";
|
2024-03-19 02:14:51 +00:00
|
|
|
mainProgram = "meerk40t";
|
2022-09-09 23:58:49 +00:00
|
|
|
homepage = "https://github.com/meerk40t/meerk40t";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ hexa ];
|
|
|
|
};
|
|
|
|
}
|