From 2e333e801a436793bb83e68dc4a68da5ea3dfb8c Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Tue, 23 Apr 2019 04:20:00 -0500 Subject: [PATCH 1/2] pythonPackages.macfsevents: init at 0.8.1 --- .../python-modules/macfsevents/default.nix | 24 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 4 ++++ 2 files changed, 28 insertions(+) create mode 100644 pkgs/development/python-modules/macfsevents/default.nix diff --git a/pkgs/development/python-modules/macfsevents/default.nix b/pkgs/development/python-modules/macfsevents/default.nix new file mode 100644 index 00000000000..8dfa0038cdd --- /dev/null +++ b/pkgs/development/python-modules/macfsevents/default.nix @@ -0,0 +1,24 @@ +{ lib, buildPythonPackage, fetchPypi, CoreFoundation, CoreServices }: + +buildPythonPackage rec { + pname = "MacFSEvents"; + version = "0.8.1"; + + src = fetchPypi { + inherit pname version; + sha256 = "1324b66b356051de662ba87d84f73ada062acd42b047ed1246e60a449f833e10"; + }; + + buildInputs = [ CoreFoundation CoreServices ]; + + # Some tests fail under nix build directory + doCheck = false; + + meta = with lib; { + homepage = https://github.com/malthe/macfsevents; + description = "Thread-based interface to file system observation primitives"; + license = licenses.bsd2; + maintainers = [ maintainers.marsam ]; + platforms = platforms.darwin; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 592ff04178a..da40c6169d2 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -3136,6 +3136,10 @@ in { Mako = callPackage ../development/python-modules/Mako { }; + macfsevents = callPackage ../development/python-modules/macfsevents { + inherit (pkgs.darwin.apple_sdk.frameworks) CoreFoundation CoreServices; + }; + manifestparser = callPackage ../development/python-modules/marionette-harness/manifestparser.nix {}; marionette_driver = callPackage ../development/python-modules/marionette-harness/marionette_driver.nix {}; mozcrash = callPackage ../development/python-modules/marionette-harness/mozcrash.nix {}; From 9c4d8bcee7e81215b4a480308fa46bf3fe78a30b Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Tue, 23 Apr 2019 04:21:00 -0500 Subject: [PATCH 2/2] doit: fix darwin build --- pkgs/development/tools/build-managers/doit/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/development/tools/build-managers/doit/default.nix b/pkgs/development/tools/build-managers/doit/default.nix index c6ed406840d..e2689f2c265 100644 --- a/pkgs/development/tools/build-managers/doit/default.nix +++ b/pkgs/development/tools/build-managers/doit/default.nix @@ -15,7 +15,9 @@ in python3Packages.buildPythonApplication { buildInputs = with python3Packages; [ mock pytest ]; - propagatedBuildInputs = with python3Packages; [ cloudpickle pyinotify ]; + propagatedBuildInputs = with python3Packages; [ cloudpickle ] + ++ stdenv.lib.optional stdenv.isLinux pyinotify + ++ stdenv.lib.optional stdenv.isDarwin macfsevents; # Tests fail due to mysterious gdbm.open() resource temporarily # unavailable errors.