diff --git a/pkgs/development/arduino/arduino-core/default.nix b/pkgs/development/arduino/arduino-core/default.nix new file mode 100644 index 00000000000..27d71227424 --- /dev/null +++ b/pkgs/development/arduino/arduino-core/default.nix @@ -0,0 +1,41 @@ +{ stdenv, fetchurl, jdk, jre, ant, coreutils, gnugrep }: + +stdenv.mkDerivation rec { + + version = "1.0.2"; + name = "arduino-core"; + + src = fetchurl { + url = "http://arduino.googlecode.com/files/arduino-${version}-src.tar.gz"; + sha256 = "0nszl2hdjjgxk87gyk0xi0ww9grbq83hch3iqmpaf9yp4y9bra0x"; + }; + + buildInputs = [ jdk ant ]; + + phases = "unpackPhase patchPhase buildPhase installPhase"; + + patchPhase = '' + # + ''; + + buildPhase = '' + cd ./core && ant + cd ../build && ant + cd .. + ''; + + installPhase = '' + mkdir -p $out/share/arduino + cp -r ./build/linux/work/hardware/ $out/share/arduino + cp -r ./build/linux/work/libraries/ $out/share/arduino + cp -r ./build/linux/work/tools/ $out/share/arduino + cp -r ./build/linux/work/lib/ $out/share/arduino + echo ${version} > $out/share/arduino/lib/version.txt + ''; + + meta = { + description = "Arduino libraries"; + homepage = http://arduino.cc/; + license = "GPL"; + }; +} diff --git a/pkgs/development/arduino/ino/default.nix b/pkgs/development/arduino/ino/default.nix new file mode 100644 index 00000000000..d63a610666d --- /dev/null +++ b/pkgs/development/arduino/ino/default.nix @@ -0,0 +1,27 @@ +{ stdenv, fetchurl, buildPythonPackage, minicom, avrdude, arduino_core }: + +buildPythonPackage { + name = "ino-0.3.4"; + namePrefix = ""; + + src = fetchurl { + url = "http://pypi.python.org/packages/source/i/ino/ino-0.3.4.tar.gz"; + sha256 = "1v7z3da31cv212k28aci269qkg92p377fm7i76rymjjpjra7payv"; + }; + + propagatedBuildInputs = [ minicom avrdude arduino_core ]; + + patchPhase = '' + echo "Patching Arduino distribution path" + sed -i 's@/usr/local/share/arduino@${arduino_core}/share/arduino@g' ino/environment.py + ''; + + doCheck = false; + + meta = { + description = "Command line toolkit for working with Arduino hardware"; + homepage = http://inotool.org/; + license = "MIT"; + maintainers = [ stdenv.lib.maintainers.antono ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index e5945703c6c..e8bb9d0a07b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -373,6 +373,11 @@ let archivemount = callPackage ../tools/filesystems/archivemount { }; + arduino_core = callPackage ../development/arduino/arduino-core { + jdk = jdk; + jre = jdk; + }; + asymptote = builderDefsPackage ../tools/graphics/asymptote { inherit freeglut ghostscriptX imagemagick fftw boehmgc mesa ncurses readline gsl libsigsegv python zlib perl @@ -3164,6 +3169,8 @@ let indent = callPackage ../development/tools/misc/indent { }; + ino = callPackage ../development/arduino/ino { }; + inotifyTools = callPackage ../development/tools/misc/inotify-tools { }; intelgen4asm = callPackage ../development/misc/intelgen4asm { };