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

40 lines
1.3 KiB
Nix
Raw Normal View History

2013-03-25 14:28:09 +00:00
{ stdenv, fetchurl, buildPythonPackage, pythonPackages, minicom
, avrdude, arduino_core, avrgcclibc }:
2012-11-28 01:55:24 +00:00
buildPythonPackage rec {
name = "ino-0.3.5";
2012-11-28 01:55:24 +00:00
namePrefix = "";
src = fetchurl {
url = "http://pypi.python.org/packages/source/i/ino/${name}.tar.gz";
2013-08-16 20:26:34 +01:00
sha256 = "1j2qzcjp6r2an1v431whq9l47s81d5af6ni8j87gv294f53sl1ab";
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 minicom pythonPackages.configobj
pythonPackages.jinja2 pythonPackages.pyserial ];
2012-11-28 01:55:24 +00:00
patchPhase = ''
echo "Patching Arduino distribution path"
2013-03-25 14:28:09 +00:00
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']," ""
2012-11-28 01:55:24 +00:00
'';
2012-12-23 16:21:51 +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 ];
2012-11-28 01:55:24 +00:00
};
}