Merge pull request #190587 from mweinelt/meerk40t
This commit is contained in:
commit
256462226f
95
pkgs/applications/misc/meerk40t/default.nix
Normal file
95
pkgs/applications/misc/meerk40t/default.nix
Normal file
|
@ -0,0 +1,95 @@
|
|||
{ lib
|
||||
, fetchFromGitHub
|
||||
, python3
|
||||
, gtk3
|
||||
, wrapGAppsHook
|
||||
}:
|
||||
|
||||
let
|
||||
inherit (python3.pkgs) buildPythonApplication buildPythonPackage fetchPypi;
|
||||
|
||||
meerk40t-camera = buildPythonPackage rec {
|
||||
pname = "meerk40t-camera";
|
||||
version = "0.1.9";
|
||||
format = "setuptools";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
hash = "sha256-uGCBHdgWoorVX2XqMCg0YBweb00sQ9ZSbJe8rlGeovs=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
sed -i '/meerk40t/d' setup.py
|
||||
'';
|
||||
|
||||
propagatedBuildInputs = with python3.pkgs; [
|
||||
opencv4
|
||||
];
|
||||
|
||||
pythonImportsCheck = [
|
||||
"camera"
|
||||
];
|
||||
|
||||
doCheck = false;
|
||||
|
||||
meta = with lib; {
|
||||
description = "MeerK40t camera plugin";
|
||||
license = licenses.mit;
|
||||
homepage = "https://github.com/meerk40t/meerk40t-camera";
|
||||
maintainers = with maintainers; [ hexa ];
|
||||
};
|
||||
};
|
||||
in
|
||||
buildPythonApplication rec {
|
||||
pname = "MeerK40t";
|
||||
version = "0.8.0031";
|
||||
format = "setuptools";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "meerk40t";
|
||||
repo = pname;
|
||||
rev = "refs/tags/${version}";
|
||||
hash = "sha256-7Vc7Z+mxy+xRbUBeivkqVwO86ovZDo42M4G0ZD23vMk=";
|
||||
};
|
||||
|
||||
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[@]}")
|
||||
'';
|
||||
|
||||
checkInputs = 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 ];
|
||||
};
|
||||
}
|
|
@ -1,22 +1,49 @@
|
|||
{ lib, buildPythonPackage, pythonOlder, fetchFromGitHub, pyparsing, pytest }:
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, pythonOlder
|
||||
, fetchFromGitHub
|
||||
, pyparsing
|
||||
, typing-extensions
|
||||
, pytestCheckHook
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
version = "0.12";
|
||||
version = "0.18.1";
|
||||
pname = "ezdxf";
|
||||
format = "setuptools";
|
||||
|
||||
disabled = pythonOlder "3.5";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "mozman";
|
||||
repo = "ezdxf";
|
||||
rev = "v${version}";
|
||||
sha256 = "1flcq96ljk5wqrmgsb4acflqzkg7rhlaxz0j5jxky9za0mj1x6dq";
|
||||
rev = "refs/tags/v${version}";
|
||||
sha256 = "sha256-x1p9dWrbDtDreXdBuzOA4Za+ZC40y4xdEU7MGb9uUec=";
|
||||
};
|
||||
|
||||
checkInputs = [ pytest ];
|
||||
checkPhase = "pytest tests integration_tests";
|
||||
propagatedBuildInputs = [
|
||||
pyparsing
|
||||
typing-extensions
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [ pyparsing ];
|
||||
checkInputs = [
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
disabledTests = [
|
||||
# requires geomdl dependency
|
||||
"TestNurbsPythonCorrectness"
|
||||
"test_rational_spline_curve_points_by_nurbs_python"
|
||||
"test_rational_spline_derivatives_by_nurbs_python"
|
||||
"test_from_nurbs_python_curve_to_ezdxf_bspline"
|
||||
"test_from_ezdxf_bspline_to_nurbs_python_curve_non_rational"
|
||||
"test_from_ezdxf_bspline_to_nurbs_python_curve_rational"
|
||||
];
|
||||
|
||||
pythonImportsCheck = [
|
||||
"ezdxf"
|
||||
"ezdxf.addons"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Python package to read and write DXF drawings (interface to the DXF file format)";
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
, CoreFoundation
|
||||
, pillow
|
||||
, numpy
|
||||
, six
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
|
@ -46,7 +47,11 @@ buildPythonPackage rec {
|
|||
[ wxGTK.gtk ]
|
||||
);
|
||||
|
||||
propagatedBuildInputs = [ pillow numpy ];
|
||||
propagatedBuildInputs = [
|
||||
numpy
|
||||
pillow
|
||||
six
|
||||
];
|
||||
|
||||
DOXYGEN = "${doxygen}/bin/doxygen";
|
||||
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
, WebKit
|
||||
, pillow
|
||||
, numpy
|
||||
, six
|
||||
, libXinerama
|
||||
, libSM
|
||||
, libXxf86vm
|
||||
|
@ -108,7 +109,11 @@ buildPythonPackage rec {
|
|||
WebKit
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [ pillow numpy ];
|
||||
propagatedBuildInputs = [
|
||||
pillow
|
||||
numpy
|
||||
six
|
||||
];
|
||||
|
||||
DOXYGEN = "${doxygen}/bin/doxygen";
|
||||
|
||||
|
|
18
pkgs/development/python-modules/wxPython/4.2-ctypes.patch
Normal file
18
pkgs/development/python-modules/wxPython/4.2-ctypes.patch
Normal file
|
@ -0,0 +1,18 @@
|
|||
diff --git a/wx/lib/wxcairo/wx_pycairo.py b/wx/lib/wxcairo/wx_pycairo.py
|
||||
index 7cfe3071..24d1120f 100644
|
||||
--- a/wx/lib/wxcairo/wx_pycairo.py
|
||||
+++ b/wx/lib/wxcairo/wx_pycairo.py
|
||||
@@ -197,7 +197,12 @@ def _findCairoLib():
|
||||
|
||||
# For other DLLs we'll just use a dictionary to track them, as there
|
||||
# probably isn't any need to use them outside of this module.
|
||||
-_dlls = dict()
|
||||
+_dlls = {
|
||||
+ "gdk": ctypes.CDLL("@libgdk@"),
|
||||
+ "pangocairo": ctypes.CDLL("@libpangocairo@"),
|
||||
+ "cairoLib": ctypes.CDLL("@libcairo@"),
|
||||
+ "appsvc": ctypes.CDLL(None),
|
||||
+}
|
||||
|
||||
def _findHelper(names, key, msg):
|
||||
dll = _dlls.get(key, None)
|
133
pkgs/development/python-modules/wxPython/4.2.nix
Normal file
133
pkgs/development/python-modules/wxPython/4.2.nix
Normal file
|
@ -0,0 +1,133 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, buildPythonPackage
|
||||
, pythonOlder
|
||||
, fetchPypi
|
||||
, substituteAll
|
||||
|
||||
# build
|
||||
, autoPatchelfHook
|
||||
, attrdict
|
||||
, doxygen
|
||||
, pkg-config
|
||||
, python
|
||||
, sip
|
||||
, which
|
||||
|
||||
# runtime
|
||||
, cairo
|
||||
, gst_all_1
|
||||
, gtk3
|
||||
, libGL
|
||||
, libGLU
|
||||
, libSM
|
||||
, libXinerama
|
||||
, libXtst
|
||||
, libXxf86vm
|
||||
, libglvnd
|
||||
, mesa
|
||||
, pango
|
||||
, SDL
|
||||
, webkitgtk
|
||||
, wxGTK
|
||||
, xorgproto
|
||||
|
||||
# propagates
|
||||
, numpy
|
||||
, pillow
|
||||
, six
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "wxPython";
|
||||
version = "4.2.0";
|
||||
format = "other";
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
hash = "sha256-ZjzrxFCdfl0RNRiGX+J093+VQ0xdV7w4btWNZc7thsc=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
(substituteAll {
|
||||
src = ./4.2-ctypes.patch;
|
||||
libgdk = "${gtk3.out}/lib/libgdk-3.so";
|
||||
libpangocairo = "${pango}/lib/libpangocairo-1.0.so";
|
||||
libcairo = "${cairo}/lib/libcairo.so";
|
||||
})
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
attrdict
|
||||
pkg-config
|
||||
SDL
|
||||
sip
|
||||
which
|
||||
wxGTK
|
||||
] ++ lib.optionals stdenv.isLinux [
|
||||
autoPatchelfHook
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
wxGTK
|
||||
SDL
|
||||
] ++ lib.optionals stdenv.isLinux [
|
||||
gst_all_1.gst-plugins-base
|
||||
gst_all_1.gstreamer
|
||||
libGL
|
||||
libGLU
|
||||
libSM
|
||||
libXinerama
|
||||
libXtst
|
||||
libXxf86vm
|
||||
libglvnd
|
||||
mesa
|
||||
webkitgtk
|
||||
xorgproto
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
numpy
|
||||
pillow
|
||||
six
|
||||
];
|
||||
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
|
||||
export DOXYGEN=${doxygen}/bin/doxygen
|
||||
export PATH="${wxGTK}/bin:$PATH"
|
||||
export SDL_CONFIG="${SDL.dev}/bin/sdl-config"
|
||||
|
||||
${python.interpreter} build.py -v --use_syswx dox etg sip --nodoc build_py
|
||||
|
||||
runHook postBuild
|
||||
'';
|
||||
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
${python.interpreter} setup.py install --skip-build --prefix=$out
|
||||
wrapPythonPrograms
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
checkPhase = ''
|
||||
runHook preCheck
|
||||
|
||||
${python.interpreter} build.py -v test
|
||||
|
||||
runHook postCheck
|
||||
'';
|
||||
|
||||
|
||||
meta = with lib; {
|
||||
description = "Cross platform GUI toolkit for Python, Phoenix version";
|
||||
homepage = "http://wxpython.org/";
|
||||
license = licenses.wxWindows;
|
||||
maintainers = with maintainers; [ hexa ];
|
||||
};
|
||||
}
|
|
@ -29056,6 +29056,8 @@ with pkgs;
|
|||
|
||||
marker = callPackage ../applications/editors/marker { };
|
||||
|
||||
meerk40t = callPackage ../applications/misc/meerk40t { };
|
||||
|
||||
musikcube = callPackage ../applications/audio/musikcube {
|
||||
inherit (darwin.apple_sdk.frameworks) Cocoa SystemConfiguration;
|
||||
};
|
||||
|
|
|
@ -12044,6 +12044,13 @@ in {
|
|||
};
|
||||
};
|
||||
|
||||
wxPython_4_2 = callPackage ../development/python-modules/wxPython/4.2.nix {
|
||||
wxGTK = pkgs.wxGTK32.override {
|
||||
withWebKit = true;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
x11_hash = callPackage ../development/python-modules/x11_hash { };
|
||||
|
||||
x256 = callPackage ../development/python-modules/x256 { };
|
||||
|
|
Loading…
Reference in a new issue