Based on @brodul work at
https://github.com/brodul/nixpkgs/tree/arduino-update
Desktop file generation is from #13690
- Solved all download problems. Package/library lists are changing
daily, so I've created my own snapshot of them.
- Prepatch jssc .so inside jar - @brodul mentions that it can be copied
into $HOME while running program.
- Removed some unnecessary dependencies
Tested it by uploading simple sketch to Arduino Uno.
This reverts commit 6ff886e539 because it
doesn't work when chroot builds are enabled (nix.useChroot = true):
$ nix-build -A arduino
these derivations will be built:
/nix/store/xjv1j3mww4jx1vccfc0p1inlcrlgx2if-arduino-1.6.6.drv
building path(s) ‘/nix/store/58sdiphd4pm3811gir0b8j718pgq8zvk-arduino-1.6.6’
...
untar-unzip-download:
[get] Getting: http://downloads.arduino.cc/reference-1.6.6-3.zip
[get] To: /tmp/nix-build-arduino-1.6.6.drv-0/Arduino-1.6.6-src/build/shared/reference-1.6.6-3.zip
[get] Error getting http://downloads.arduino.cc/reference-1.6.6-3.zip to /tmp/nix-build-arduino-1.6.6.drv-0/Arduino-1.6.6-src/build/shared/reference-1.6.6-3.zip
untar-unzip-checksum:
[echo] Testing checksum of "shared/reference-1.6.6-3.zip"
[checksum] Could not find file /tmp/nix-build-arduino-1.6.6.drv-0/Arduino-1.6.6-src/build/shared/reference-1.6.6-3.zip to generate checksum for.
BUILD FAILED
Reasoning: without a revert, the build farm cannot produce binaries and
users that build from source, without chroot, cannot trust that they get
a working result (non-deterministic build, depending on how pure the
arduino builder is).
[Now without the "stdenv.glibc" reference, which is unavailable on
darwin. It seems the dynamic linker finds libc/libm without it being
explicitly in RPATH, so we can just drop it.]
This commit adds the graphical Arduino IDE, built from the arduino-core
expression.
Also:
- Add libusb to RPATH for avrdude. Without this, avrdude is broken.
Possible TODO: replace bundled avrdude with the one from nixpkgs.
- Use "cp -r ./build/linux/work/*", so example sketeches, the HTML
reference documentation and the 'arduino' shell script that starts the
IDE gets included.
- Make meta.description slightly more generic, to cover both GUI/core
variants.
This commit adds the graphical Arduino IDE, built from the arduino-core
expression.
Also:
- Add libusb to RPATH for avrdude. Without this, avrdude is broken.
Possible TODO: replace bundled avrdude with the one from nixpkgs.
- Use "cp -r ./build/linux/work/*", so example sketeches, the HTML
reference documentation and the 'arduino' shell script that starts the
IDE gets included.
- Make meta.description slightly more generic, to cover both GUI/core
variants.
- replace fetchurl with fetchgit because googlecode is unmaintained
- remove unnecessary phases
- change license and maintainers
- tested with a few sketches and inotool
- change description according to "Contributors Guide"
change fetchgit to fetchFromgitHub
Closes#4449
0.3.5 is just a patch-release (no code changes). More important is the
patch to the upload-command. It now uses the nix-supplied avrdude
instead of some random avrdude it finds (in the arduino distribution
or wherever).
Signed-off-by: Moritz Ulrich <moritz@tarn-vedra.de>