nixpkgs/pkgs/applications/misc/meerk40t/default.nix
Jan Tojnar eb04659fc2 treewide: wrapGAppsHook → wrapGAppsHook3
This was achieved using the following command:

    sd 'wrapGAppsHook\b' wrapGAppsHook3 (rg -l 'wrapGAppsHook\b')

And then manually reverted the following changes:

- alias in top-level.nix
- function name in wrap-gapps-hook.sh
- comment in postFixup of at-spi2-core
- comment in gtk4
- comment in preFixup of 1password-gui/linux.nix
- comment in postFixup of qgis/unwrapped-ltr.nix and qgis/unwrapped.nix
- comment in postFixup of telegram-desktop
- comment in postFixup of fwupd
- buildCommand of mongodb-compass
- postFixup of xflux-gui
- comment in a patch in kdePackages.kde-gtk-config and plasma5Packages.kde-gtk-config
- description of programs.sway.wrapperFeatures.gtk NixOS option (manual rebuild)
2024-04-27 02:23:22 +02:00

83 lines
1.6 KiB
Nix

{ lib
, fetchFromGitHub
, meerk40t-camera
, python3Packages
, gtk3
, wrapGAppsHook3
}:
python3Packages.buildPythonApplication rec {
pname = "MeerK40t";
version = "0.9.4000";
pyproject = true;
src = fetchFromGitHub {
owner = "meerk40t";
repo = pname;
rev = "refs/tags/${version}";
hash = "sha256-ceDnnHdmJ6VOrM9pSxjeKQ748E8fsIqSQ36qFpXc9Ac=";
};
nativeBuildInputs = [
wrapGAppsHook3
] ++ (with python3Packages; [
setuptools
]);
# prevent double wrapping
dontWrapGApps = true;
# https://github.com/meerk40t/meerk40t/blob/main/setup.py
propagatedBuildInputs = with python3Packages; [
meerk40t-camera
numpy
pyserial
pyusb
setuptools
wxpython
]
++ lib.flatten (lib.attrValues passthru.optional-dependencies);
passthru.optional-dependencies = with python3Packages; {
cam = [
opencv4
];
camhead = [
opencv4
];
dxf = [
ezdxf
];
gui = [
wxpython
pillow
opencv4
ezdxf
];
};
preFixup = ''
gappsWrapperArgs+=(
--prefix XDG_DATA_DIRS : "${gtk3}/share/gsettings-schemas/${gtk3.name}"
)
makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
'';
nativeCheckInputs = with python3Packages; [
unittestCheckHook
];
preCheck = ''
export HOME=$TMPDIR
'';
meta = with lib; {
changelog = "https://github.com/meerk40t/meerk40t/releases/tag/${version}";
description = "MeerK40t LaserCutter Software";
mainProgram = "meerk40t";
homepage = "https://github.com/meerk40t/meerk40t";
license = licenses.mit;
maintainers = with maintainers; [ hexa ];
};
}