mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2025-01-05 20:11:43 +03:00
Merge pull request #205 from NixOS/arduino
Arduino-core, inotool.org, avr-g++
This commit is contained in:
commit
43e12fb252
42
pkgs/development/arduino/arduino-core/default.nix
Normal file
42
pkgs/development/arduino/arduino-core/default.nix
Normal file
@ -0,0 +1,42 @@
|
||||
{ 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";
|
||||
maintainers = [ stdenv.lib.maintainers.antono ];
|
||||
};
|
||||
}
|
28
pkgs/development/arduino/ino/default.nix
Normal file
28
pkgs/development/arduino/ino/default.nix
Normal file
@ -0,0 +1,28 @@
|
||||
{ stdenv, fetchurl, buildPythonPackage, minicom, avrdude, arduino_core, avrgcclibc }:
|
||||
|
||||
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";
|
||||
};
|
||||
|
||||
# TODO: add avrgcclibc, it must be rebuild with C++ support
|
||||
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 ];
|
||||
};
|
||||
}
|
@ -6,13 +6,18 @@ stdenv.mkDerivation {
|
||||
name = "avr-gcc-libc";
|
||||
|
||||
srcBinutils = fetchurl {
|
||||
url = "mirror://gnu/binutils/binutils-2.21.tar.bz2";
|
||||
sha256 = "1iyhc42zfa0j2gaxy4zvpk47sdqj4rqvib0mb8597ss8yidyrav0";
|
||||
url = "mirror://gnu/binutils/binutils-2.21.1.tar.bz2";
|
||||
sha256 = "0m7nmd7gc9d9md43wbrv65hz6lbi2crqwryzpigv19ray1lzmv6d";
|
||||
};
|
||||
|
||||
srcGCC = fetchurl {
|
||||
url = "mirror://gcc/releases/gcc-4.6.1/gcc-core-4.6.1.tar.bz2";
|
||||
sha256 = "0bbb8f754a31f29013f6e9ad4c755d92bb0f154a665c4b623e86ae7174d98e33";
|
||||
url = "mirror://gcc/releases/gcc-4.6.3/gcc-core-4.6.3.tar.bz2";
|
||||
sha256 = "1hai090f0svf886nyhn4glmfw54v9lz88w2izkx5iqhd3j400gi8";
|
||||
};
|
||||
|
||||
srcGCCGPP = fetchurl {
|
||||
url = "mirror://gcc/releases/gcc-4.6.3/gcc-g++-4.6.3.tar.bz2";
|
||||
sha256 = "1s199gb6p65r5k69cdfqqcz5hgifw9bhyj65n2b91s80x4rwgq5k";
|
||||
};
|
||||
|
||||
srcAVRLibc = fetchurl {
|
||||
@ -55,10 +60,11 @@ stdenv.mkDerivation {
|
||||
|
||||
cd $TMP
|
||||
tar jxf $srcGCC
|
||||
tar jxf $srcGCCGPP
|
||||
cd gcc-*
|
||||
mkdir obj-avr
|
||||
cd obj-avr
|
||||
../configure --target=avr --prefix="$prefix" --disable-nls --enable-languages=c --disable-libssp --with-dwarf2
|
||||
../configure --target=avr --prefix="$prefix" --disable-nls --enable-languages=c,c++ --disable-libssp --with-dwarf2
|
||||
make $MAKE_FLAGS
|
||||
make install
|
||||
|
||||
|
@ -373,6 +373,11 @@ let
|
||||
|
||||
archivemount = callPackage ../tools/filesystems/archivemount { };
|
||||
|
||||
arduino_core = callPackage ../development/arduino/arduino-core {
|
||||
jdk = jdk;
|
||||
jre = jdk;
|
||||
};
|
||||
|
||||
argyllcms = callPackage ../tools/graphics/argyllcms {};
|
||||
|
||||
ascii = callPackage ../tools/text/ascii { };
|
||||
@ -3155,6 +3160,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 { };
|
||||
|
Loading…
Reference in New Issue
Block a user