https://github.com/telent/python-ant/blob/biscuit/demos/ant.core/cadence.py
50 lines
1.3 KiB
Nix
50 lines
1.3 KiB
Nix
with import <nixpkgs> {};
|
|
let
|
|
inherit (pkgs.python3.pkgs) pydbus ruamel-yaml buildPythonPackage fetchPypi;
|
|
vext = buildPythonPackage rec {
|
|
propagatedBuildInputs = [ ruamel-yaml ];
|
|
pname = "vext";
|
|
version = "0.7.4";
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
hash = "sha256-0Yiw0hQXnNYjS0jDrHCPnLd5NznSp7t9HLA/O/Wc92c=";
|
|
};
|
|
};
|
|
vext_gi = buildPythonPackage rec {
|
|
propagatedBuildInputs = [ vext ];
|
|
pname = "vext.gi";
|
|
version = "0.7.4";
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
hash = "sha256-aKVWiMbN3JE90178aIITJHSXhW6FrykEUP70R53/PIE=";
|
|
};
|
|
};
|
|
ble_gatt = buildPythonPackage rec {
|
|
pname = "BLE_GATT";
|
|
version = "0.5.0";
|
|
propagatedBuildInputs = [
|
|
pydbus
|
|
# vext_gi
|
|
];
|
|
prePatch = ''
|
|
sed -i -e '/import vext/d' BLE_GATT/__init__.py
|
|
sed -i -e "s/'vext.gi'//g" setup.py
|
|
'';
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
hash = "sha256-5qJ0FoopVqQH7JHBriD/D0VE24vM+UtoPJWTm1VmY0w=";
|
|
};
|
|
doCheck = false;
|
|
};
|
|
python = python3.withPackages(ps: with ps;
|
|
[
|
|
setuptools pydbus pyserial pyusb msgpack six future pygame
|
|
ble_gatt
|
|
]);
|
|
in stdenv.mkDerivation {
|
|
name = "wobble";
|
|
# PYTHONPATH = "./src";
|
|
buildInputs = [ python dejavu_fonts ];
|
|
FONT = "${dejavu_fonts}/share/fonts/truetype/DejaVuSansMono-Bold.ttf";
|
|
}
|