diff options
Diffstat (limited to 'nixpkgs/pkgs/development/arduino/ino/default.nix')
-rw-r--r-- | nixpkgs/pkgs/development/arduino/ino/default.nix | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/arduino/ino/default.nix b/nixpkgs/pkgs/development/arduino/ino/default.nix new file mode 100644 index 000000000000..83b72488bfd4 --- /dev/null +++ b/nixpkgs/pkgs/development/arduino/ino/default.nix @@ -0,0 +1,46 @@ +{ stdenv, fetchurl, python2Packages, picocom +, avrdude, arduino-core }: + +python2Packages.buildPythonApplication rec { + name = "ino-0.3.6"; + namePrefix = ""; + + src = fetchurl { + url = "mirror://pypi/i/ino/${name}.tar.gz"; + sha256 = "0k6lzfcn55favbj0w4afrvnmwyskf7bgzg9javv2ycvskp35srwv"; + }; + + # TODO: add avrgcclibc, it must be rebuild with C++ support + propagatedBuildInputs = with python2Packages; [ + arduino-core + avrdude + picocom + configobj + jinja2 + pyserial + six + ]; + + patchPhase = '' + echo "Patching Arduino distribution path" + sed -i 's@/usr/local/share/arduino@${arduino-core}/share/arduino@g' \ + ino/environment.py + sed -i -e 's@argparse@@' -e 's@ordereddict@@' \ + requirements.txt + sed -i -e 's@from ordereddict@from collections@' \ + ino/environment.py ino/utils.py + + # Patch the upload command so it uses the correct avrdude + substituteInPlace ino/commands/upload.py \ + --replace "self.e['avrdude']" "'${avrdude}/bin/avrdude'" \ + --replace "'-C', self.e['avrdude.conf']," "" + ''; + + meta = { + description = "Command line toolkit for working with Arduino hardware"; + homepage = http://inotool.org/; + license = stdenv.lib.licenses.mit; + maintainers = with stdenv.lib.maintainers; [ antono the-kenny ]; + platforms = stdenv.lib.platforms.linux; + }; +} |