diff --git a/pkgs/applications/misc/meerk40t/camera.nix b/pkgs/applications/misc/meerk40t/camera.nix new file mode 100644 index 000000000000..9d262488a67e --- /dev/null +++ b/pkgs/applications/misc/meerk40t/camera.nix @@ -0,0 +1,38 @@ +{ lib +, python3 +}: + +let + inherit (python3.pkgs) buildPythonPackage fetchPypi; +in +buildPythonPackage rec { + pname = "meerk40t-camera"; + version = "0.1.9"; + format = "setuptools"; + + src = python3.pkgs.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 ]; + }; +} diff --git a/pkgs/applications/misc/meerk40t/default.nix b/pkgs/applications/misc/meerk40t/default.nix index 28a136c9a257..354c68926936 100644 --- a/pkgs/applications/misc/meerk40t/default.nix +++ b/pkgs/applications/misc/meerk40t/default.nix @@ -1,5 +1,6 @@ { lib , fetchFromGitHub +, meerk40t-camera , python3 , gtk3 , wrapGAppsHook @@ -7,38 +8,6 @@ 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"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 896fb0a5e258..fb1c702a30d4 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -29289,6 +29289,8 @@ with pkgs; meerk40t = callPackage ../applications/misc/meerk40t { }; + meerk40t-camera = callPackage ../applications/misc/meerk40t/camera.nix { }; + musikcube = callPackage ../applications/audio/musikcube { inherit (darwin.apple_sdk.frameworks) Cocoa SystemConfiguration; };