From a375bbc5f06144bafa4972c74add063d212429da Mon Sep 17 00:00:00 2001 From: Angus Trau Date: Wed, 11 Aug 2021 14:01:37 +1000 Subject: [PATCH] python3Packages.pymunk: add x86_64-darwin support --- pkgs/development/python-modules/pymunk/default.nix | 9 ++++++++- pkgs/top-level/python-packages.nix | 4 +++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/pymunk/default.nix b/pkgs/development/python-modules/pymunk/default.nix index 92918efa8ed8..4ee22feed1df 100644 --- a/pkgs/development/python-modules/pymunk/default.nix +++ b/pkgs/development/python-modules/pymunk/default.nix @@ -1,9 +1,11 @@ -{ lib +{ stdenv +, lib , buildPythonPackage , fetchPypi , python , cffi , pytestCheckHook +, ApplicationServices }: buildPythonPackage rec { @@ -17,6 +19,9 @@ buildPythonPackage rec { }; propagatedBuildInputs = [ cffi ]; + buildInputs = lib.optionals stdenv.isDarwin [ + ApplicationServices + ]; preBuild = '' ${python.interpreter} setup.py build_ext --inplace @@ -26,11 +31,13 @@ buildPythonPackage rec { pytestFlagsArray = [ "pymunk/tests" ]; + pythonImportsCheck = [ "pymunk" ]; meta = with lib; { description = "2d physics library"; homepage = "https://www.pymunk.org"; license = with licenses; [ mit ]; maintainers = with maintainers; [ angustrau ]; + platforms = platforms.linux ++ [ "x86_64-darwin" ]; }; } diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index b30dfe4511bf..5c5c71396ec0 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -6323,7 +6323,9 @@ in { pymumble = callPackage ../development/python-modules/pymumble { }; - pymunk = callPackage ../development/python-modules/pymunk { }; + pymunk = callPackage ../development/python-modules/pymunk { + inherit (pkgs.darwin.apple_sdk.frameworks) ApplicationServices; + }; pymupdf = callPackage ../development/python-modules/pymupdf { };