nixpkgs/pkgs/development/arduino/ino/default.nix

41 lines
1.4 KiB
Nix
Raw Normal View History

{ stdenv, fetchurl, pythonPackages, picocom
, avrdude, arduino-core, avrgcclibc }:
2012-11-28 01:55:24 +00:00
pythonPackages.buildPythonApplication rec {
name = "ino-0.3.6";
2012-11-28 01:55:24 +00:00
namePrefix = "";
src = fetchurl {
url = "mirror://pypi/i/ino/${name}.tar.gz";
sha256 = "0k6lzfcn55favbj0w4afrvnmwyskf7bgzg9javv2ycvskp35srwv";
2012-11-28 01:55:24 +00:00
};
# TODO: add avrgcclibc, it must be rebuild with C++ support
2013-03-25 14:28:09 +00:00
propagatedBuildInputs =
[ arduino-core avrdude picocom pythonPackages.configobj
2014-08-27 17:02:05 +00:00
pythonPackages.jinja2 pythonPackages.pyserial pythonPackages.six ];
2012-11-28 01:55:24 +00:00
patchPhase = ''
echo "Patching Arduino distribution path"
sed -i 's@/usr/local/share/arduino@${arduino-core}/share/arduino@g' \
2013-03-25 14:28:09 +00:00
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']," ""
2012-11-28 01:55:24 +00:00
'';
2013-10-08 09:05:19 +00:00
2012-11-28 01:55:24 +00:00
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 ];
2013-10-08 09:05:19 +00:00
platforms = stdenv.lib.platforms.linux;
2012-11-28 01:55:24 +00:00
};
}