diff options
author | Gabriel Ebner <gebner@gebner.org> | 2019-05-19 12:12:09 +0200 |
---|---|---|
committer | Gabriel Ebner <gebner@gebner.org> | 2019-05-19 12:12:09 +0200 |
commit | ef22dd015dd537717f1f28e793fc98a19009329c (patch) | |
tree | fd6d37ae38d1eca271bfa27e91618a19a71cc093 /pkgs/development/python-modules/pc-ble-driver-py/default.nix | |
parent | 4ca821fbce3aa0938779d043c8e0b5d8dc32e80e (diff) |
pythonPackages.pc-ble-driver-py: init at 0.11.4
Diffstat (limited to 'pkgs/development/python-modules/pc-ble-driver-py/default.nix')
-rw-r--r-- | pkgs/development/python-modules/pc-ble-driver-py/default.nix | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/pc-ble-driver-py/default.nix b/pkgs/development/python-modules/pc-ble-driver-py/default.nix new file mode 100644 index 0000000000000..d21d9d07150de --- /dev/null +++ b/pkgs/development/python-modules/pc-ble-driver-py/default.nix @@ -0,0 +1,51 @@ +{ stdenv, buildPythonPackage, fetchpatch, fetchFromGitHub, + python, cmake, git, swig, boost, udev, + setuptools, enum34, wrapt, future }: + +buildPythonPackage rec { + pname = "pc-ble-driver-py"; + version = "0.11.4"; + disabled = python.isPy3k; + + src = fetchFromGitHub { + owner = "NordicSemiconductor"; + repo = "pc-ble-driver-py"; + rev = "v${version}"; + fetchSubmodules = true; + sha256 = "0lgmcnrlcivmawmlcwnn4pdp6afdbnf3fyfgq22xzs6v72m9gp81"; + }; + + nativeBuildInputs = [ cmake swig git setuptools ]; + buildInputs = [ boost udev ]; + propagatedBuildInputs = [ enum34 wrapt future ]; + + patches = [ + # build system expects case-insensitive file system + (fetchpatch { + url = "https://patch-diff.githubusercontent.com/raw/NordicSemiconductor/pc-ble-driver-py/pull/84.patch"; + sha256 = "0ibx5g2bndr5h9sfnx51bk9b62q4jvpdwhxadbnj3da8kvcz13cy"; + }) + ]; + + postPatch = '' + # do not force static linking of boost + sed -i /Boost_USE_STATIC_LIBS/d pc-ble-driver/cmake/*.cmake + + cd python + ''; + + preBuild = '' + pushd ../build + cmake .. + make -j $NIX_BUILD_CORES + popd + ''; + + meta = with stdenv.lib; { + description = "Bluetooth Low Energy nRF5 SoftDevice serialization"; + homepage = "https://github.com/NordicSemiconductor/pc-ble-driver-py"; + license = licenses.unfreeRedistributable; + platforms = platforms.unix; + maintainers = with maintainers; [ gebner ]; + }; +} |