2016-10-17 15:38:36 +01:00
|
|
|
{ stdenv, fetchurl, python2Packages, picocom
|
2017-09-05 12:51:55 +01:00
|
|
|
, avrdude, arduino-core }:
|
2012-11-28 01:55:24 +00:00
|
|
|
|
2016-10-17 15:38:36 +01:00
|
|
|
python2Packages.buildPythonApplication rec {
|
2013-11-26 22:55:31 +00:00
|
|
|
name = "ino-0.3.6";
|
2012-11-28 01:55:24 +00:00
|
|
|
namePrefix = "";
|
|
|
|
|
|
|
|
src = fetchurl {
|
2016-04-26 13:38:03 +01:00
|
|
|
url = "mirror://pypi/i/ino/${name}.tar.gz";
|
2013-11-26 22:55:31 +00:00
|
|
|
sha256 = "0k6lzfcn55favbj0w4afrvnmwyskf7bgzg9javv2ycvskp35srwv";
|
2012-11-28 01:55:24 +00:00
|
|
|
};
|
|
|
|
|
2012-12-01 02:00:45 +00:00
|
|
|
# TODO: add avrgcclibc, it must be rebuild with C++ support
|
2016-10-17 15:38:36 +01:00
|
|
|
propagatedBuildInputs = with python2Packages; [
|
|
|
|
arduino-core
|
|
|
|
avrdude
|
|
|
|
picocom
|
|
|
|
configobj
|
|
|
|
jinja2
|
|
|
|
pyserial
|
|
|
|
six
|
|
|
|
];
|
2012-11-28 01:55:24 +00:00
|
|
|
|
|
|
|
patchPhase = ''
|
|
|
|
echo "Patching Arduino distribution path"
|
2015-02-01 21:50:34 +00:00
|
|
|
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
|
2013-08-15 22:14:36 +01:00
|
|
|
|
|
|
|
# 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 10:05:19 +01:00
|
|
|
|
2012-11-28 01:55:24 +00:00
|
|
|
meta = {
|
|
|
|
description = "Command line toolkit for working with Arduino hardware";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "http://inotool.org/";
|
2013-08-15 22:14:36 +01:00
|
|
|
license = stdenv.lib.licenses.mit;
|
2020-05-09 10:25:07 +01:00
|
|
|
maintainers = with stdenv.lib.maintainers; [ antono ];
|
2013-10-08 10:05:19 +01:00
|
|
|
platforms = stdenv.lib.platforms.linux;
|
2012-11-28 01:55:24 +00:00
|
|
|
};
|
|
|
|
}
|