uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
45
pkgs/development/embedded/arduino/arduino-ci/default.nix
Normal file
45
pkgs/development/embedded/arduino/arduino-ci/default.nix
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
{ lib, stdenv, fetchFromGitHub, makeWrapper, arduino-cli, ruby, python3 }:
|
||||
|
||||
let
|
||||
|
||||
runtimePath = lib.makeBinPath [
|
||||
arduino-cli
|
||||
python3 # required by the esp8266 core
|
||||
];
|
||||
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "arduino-ci";
|
||||
version = "0.2.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "pololu";
|
||||
repo = "arduino-ci";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-9RbBxgwsSQ7oGGKr1Vsn9Ug9AsacoRgvQgd9jbRQ034=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out/bin
|
||||
install $src/ci.rb $out/bin/arduino-ci
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
fixupPhase = ''
|
||||
substituteInPlace $out/bin/arduino-ci --replace "/usr/bin/env nix-shell" "${ruby}/bin/ruby"
|
||||
wrapProgram $out/bin/arduino-ci --prefix PATH ":" "${runtimePath}"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "CI for Arduino Libraries";
|
||||
homepage = src.meta.homepage;
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ ryantm ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
55
pkgs/development/embedded/arduino/arduino-cli/default.nix
Normal file
55
pkgs/development/embedded/arduino/arduino-cli/default.nix
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
{ lib, stdenv, buildGoModule, fetchFromGitHub, buildFHSUserEnv }:
|
||||
|
||||
let
|
||||
|
||||
pkg = buildGoModule rec {
|
||||
pname = "arduino-cli";
|
||||
version = "0.21.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "arduino";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "sha256-IXzN6CnZCzrkcLVNmKc1WB0V+TTa56CBzASzK0FQO8c=";
|
||||
};
|
||||
|
||||
subPackages = [ "." ];
|
||||
|
||||
vendorSha256 = "sha256-VWoKHIRQfs4dbsOzV3AQpqWsCPDm/rVKGMsc4xZvbhU=";
|
||||
|
||||
doCheck = false;
|
||||
|
||||
ldflags = [
|
||||
"-s" "-w" "-X github.com/arduino/arduino-cli/version.versionString=${version}" "-X github.com/arduino/arduino-cli/version.commit=unknown"
|
||||
] ++ lib.optionals stdenv.isLinux [ "-extldflags '-static'" ];
|
||||
|
||||
meta = with lib; {
|
||||
inherit (src.meta) homepage;
|
||||
description = "Arduino from the command line";
|
||||
license = licenses.gpl3Only;
|
||||
maintainers = with maintainers; [ ryantm ];
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
in
|
||||
if stdenv.isLinux then
|
||||
# buildFHSUserEnv is needed because the arduino-cli downloads compiler
|
||||
# toolchains from the internet that have their interpreters pointed at
|
||||
# /lib64/ld-linux-x86-64.so.2
|
||||
buildFHSUserEnv
|
||||
{
|
||||
inherit (pkg) name meta;
|
||||
|
||||
runScript = "${pkg.outPath}/bin/arduino-cli";
|
||||
|
||||
extraInstallCommands = ''
|
||||
mv $out/bin/$name $out/bin/arduino-cli
|
||||
'';
|
||||
|
||||
targetPkgs = pkgs: with pkgs; [
|
||||
zlib
|
||||
];
|
||||
}
|
||||
else
|
||||
pkg
|
||||
36
pkgs/development/embedded/arduino/arduino-core/chrootenv.nix
Normal file
36
pkgs/development/embedded/arduino/arduino-core/chrootenv.nix
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
{ lib, buildFHSUserEnv, arduino-core-unwrapped, withGui ? false, withTeensyduino ? false }:
|
||||
let
|
||||
arduino-unwrapped = arduino-core-unwrapped.override { inherit withGui withTeensyduino; };
|
||||
in
|
||||
buildFHSUserEnv {
|
||||
name = "arduino";
|
||||
|
||||
targetPkgs =
|
||||
pkgs: (with pkgs; [
|
||||
ncurses
|
||||
arduino-unwrapped
|
||||
zlib
|
||||
(python3.withPackages (p: with p; [
|
||||
pyserial
|
||||
]))
|
||||
]);
|
||||
multiPkgs = null;
|
||||
|
||||
extraInstallCommands = ''
|
||||
${lib.optionalString withGui ''
|
||||
# desktop file
|
||||
mkdir -p $out/share/applications
|
||||
cp ${arduino-core-unwrapped.src}/build/linux/dist/desktop.template $out/share/applications/arduino.desktop
|
||||
substituteInPlace $out/share/applications/arduino.desktop \
|
||||
--replace '<BINARY_LOCATION>' "$out/bin/arduino" \
|
||||
--replace '<ICON_NAME>' "$out/share/arduino/icons/128x128/apps/arduino.png"
|
||||
# icon file
|
||||
mkdir -p $out/share/arduino
|
||||
cp -r ${arduino-core-unwrapped.src}/build/shared/icons $out/share/arduino
|
||||
''}
|
||||
'';
|
||||
|
||||
runScript = "arduino";
|
||||
|
||||
meta = arduino-core-unwrapped.meta;
|
||||
}
|
||||
251
pkgs/development/embedded/arduino/arduino-core/default.nix
Normal file
251
pkgs/development/embedded/arduino/arduino-core/default.nix
Normal file
|
|
@ -0,0 +1,251 @@
|
|||
{ stdenv
|
||||
, lib
|
||||
, fetchFromGitHub
|
||||
, fetchurl
|
||||
, jdk
|
||||
, ant
|
||||
, libusb-compat-0_1
|
||||
, libusb1
|
||||
, unzip
|
||||
, zlib
|
||||
, ncurses
|
||||
, readline
|
||||
, withGui ? false
|
||||
, gtk3
|
||||
, wrapGAppsHook
|
||||
, withTeensyduino ? false
|
||||
/* Packages needed for Teensyduino */
|
||||
, upx
|
||||
, fontconfig
|
||||
, xorg
|
||||
, gcc
|
||||
, atk
|
||||
, glib
|
||||
, pango
|
||||
, gdk-pixbuf
|
||||
, gtk2
|
||||
, libpng12
|
||||
, expat
|
||||
, freetype
|
||||
, cairo
|
||||
, udev
|
||||
}:
|
||||
|
||||
assert withTeensyduino -> withGui;
|
||||
let
|
||||
externalDownloads = import ./downloads.nix {
|
||||
inherit fetchurl;
|
||||
inherit (lib) optionalAttrs;
|
||||
inherit (stdenv.hostPlatform) system;
|
||||
};
|
||||
# Some .so-files are later copied from .jar-s to $HOME, so patch them beforehand
|
||||
patchelfInJars =
|
||||
lib.optional (stdenv.hostPlatform.system == "aarch64-linux") { jar = "share/arduino/lib/jssc-2.8.0-arduino4.jar"; file = "libs/linux/libjSSC-2.8_aarch64.so"; }
|
||||
++ lib.optional (builtins.match "armv[67]l-linux" stdenv.hostPlatform.system != null) { jar = "share/arduino/lib/jssc-2.8.0-arduino4.jar"; file = "libs/linux/libjSSC-2.8_armhf.so"; }
|
||||
++ lib.optional (stdenv.hostPlatform.system == "x86_64-linux") { jar = "share/arduino/lib/jssc-2.8.0-arduino4.jar"; file = "libs/linux/libjSSC-2.8_x86_64.so"; }
|
||||
++ lib.optional (stdenv.hostPlatform.system == "i686-linux") { jar = "share/arduino/lib/jssc-2.8.0-arduino4.jar"; file = "libs/linux/libjSSC-2.8_x86.so"; }
|
||||
;
|
||||
# abiVersion 6 is default, but we need 5 for `avrdude_bin` executable
|
||||
ncurses5 = ncurses.override { abiVersion = "5"; };
|
||||
teensy_libpath = lib.makeLibraryPath [
|
||||
atk
|
||||
cairo
|
||||
expat
|
||||
fontconfig
|
||||
freetype
|
||||
gcc.cc.lib
|
||||
gdk-pixbuf
|
||||
glib
|
||||
gtk2
|
||||
libpng12
|
||||
libusb-compat-0_1
|
||||
pango
|
||||
udev
|
||||
xorg.libSM
|
||||
xorg.libX11
|
||||
xorg.libXext
|
||||
xorg.libXft
|
||||
xorg.libXinerama
|
||||
xorg.libXxf86vm
|
||||
zlib
|
||||
];
|
||||
teensy_architecture =
|
||||
if stdenv.hostPlatform.isx86_32 then "linux32"
|
||||
else if stdenv.hostPlatform.isx86_64 then "linux64"
|
||||
else if stdenv.hostPlatform.isAarch64 then "linuxaarch64"
|
||||
else if stdenv.hostPlatform.isAarch32 then "linuxarm"
|
||||
else throw "${stdenv.hostPlatform.system} is not supported in teensy";
|
||||
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
pname = (if withTeensyduino then "teensyduino" else "arduino") + lib.optionalString (!withGui) "-core";
|
||||
version = "1.8.19";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "arduino";
|
||||
repo = "Arduino";
|
||||
rev = version;
|
||||
sha256 = "sha256-I+PvfGc5F8H/NJOGRa18z7dKyKcO8I8Cg7Tj5yxkYAQ=";
|
||||
};
|
||||
|
||||
teensyduino_version = "156";
|
||||
teensyduino_src = fetchurl {
|
||||
url = "https://www.pjrc.com/teensy/td_${teensyduino_version}/TeensyduinoInstall.${teensy_architecture}";
|
||||
sha256 = {
|
||||
linux64 = "sha256-4DbhmmYrx+rCBpDrYFaC0A88Qv9UEeNlQAkFi3zAstk=";
|
||||
linux32 = "sha256-DlRPOtDxmMPv2Qzhib7vNZdKNZCxmm9YmVNnwUKXK/E=";
|
||||
linuxarm = "sha256-d+DbpER/4lFPcPDFeMG5f3WaUGn8pFchdIDo7Hm0XWs=";
|
||||
linuxaarch64 = "sha256-8keQzhWq7QlAGIbfHEe3lfxpJleMMvBORuPaNrLmM6Y=";
|
||||
}.${teensy_architecture} or (throw "No arduino binaries for ${teensy_architecture}");
|
||||
};
|
||||
# Used because teensyduino requires jars be a specific size
|
||||
arduino_dist_src = fetchurl {
|
||||
url = "https://downloads.arduino.cc/arduino-${version}-${teensy_architecture}.tar.xz";
|
||||
sha256 = {
|
||||
linux64 = "sha256-62i93B0cASC+L8oTUKA+40Uxzzf1GEeyEhC25wVFvJs=";
|
||||
linux32 = "sha256-wSxtx3BqXMQCeWQDK8PHkWLlQqQM1Csao8bIk98FrFg=";
|
||||
linuxarm = "sha256-lJ/R1ePq7YtDk3bvloFcn8jswrJH+L63tvH5QpTqfXs=";
|
||||
linuxaarch64 = "sha256-gm8cDjLKNfpcaeO7fw6Kyv1TnWV/ZmH4u++nun9X6jo=";
|
||||
}.${teensy_architecture} or (throw "No arduino binaries for ${teensy_architecture}");
|
||||
};
|
||||
|
||||
# the glib setup hook will populate GSETTINGS_SCHEMAS_PATH,
|
||||
# wrapGAppHooks (among other things) adds it to XDG_DATA_DIRS
|
||||
# so 'save as...' works:
|
||||
nativeBuildInputs = [ glib wrapGAppsHook unzip ];
|
||||
buildInputs = [
|
||||
jdk
|
||||
ant
|
||||
libusb-compat-0_1
|
||||
libusb1
|
||||
zlib
|
||||
ncurses5
|
||||
readline
|
||||
] ++ lib.optionals withTeensyduino [ upx ];
|
||||
downloadSrcList = builtins.attrValues externalDownloads;
|
||||
downloadDstList = builtins.attrNames externalDownloads;
|
||||
|
||||
buildPhase = ''
|
||||
# Copy pre-downloaded files to proper locations
|
||||
download_src=($downloadSrcList)
|
||||
download_dst=($downloadDstList)
|
||||
while [[ "''${#download_src[@]}" -ne 0 ]]; do
|
||||
file_src=''${download_src[0]}
|
||||
file_dst=''${download_dst[0]}
|
||||
mkdir -p $(dirname $file_dst)
|
||||
download_src=(''${download_src[@]:1})
|
||||
download_dst=(''${download_dst[@]:1})
|
||||
cp -v $file_src $file_dst
|
||||
done
|
||||
|
||||
# Deliberately break build.xml's download statement in order to cause
|
||||
# an error if anything needed is missing from download.nix.
|
||||
substituteInPlace build/build.xml \
|
||||
--replace 'ignoreerrors="true"' 'ignoreerrors="false"'
|
||||
|
||||
cd ./arduino-core && ant
|
||||
cd ../build && ant
|
||||
cd ..
|
||||
'';
|
||||
|
||||
# This will be patched into `arduino` wrapper script
|
||||
# Java loads gtk dynamically, so we need to provide it using LD_LIBRARY_PATH
|
||||
dynamicLibraryPath = lib.makeLibraryPath [ gtk3 ];
|
||||
javaPath = lib.makeBinPath [ jdk ];
|
||||
|
||||
# Everything else will be patched into rpath
|
||||
rpath = lib.makeLibraryPath [ zlib libusb-compat-0_1 libusb1 readline ncurses5 stdenv.cc.cc ];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/share/arduino
|
||||
cp -r ./build/linux/work/* "$out/share/arduino/"
|
||||
echo -n ${version} > $out/share/arduino/lib/version.txt
|
||||
|
||||
${lib.optionalString withGui ''
|
||||
mkdir -p $out/bin
|
||||
substituteInPlace $out/share/arduino/arduino \
|
||||
--replace "JAVA=java" "JAVA=$javaPath/java" \
|
||||
--replace "LD_LIBRARY_PATH=" "LD_LIBRARY_PATH=$dynamicLibraryPath:"
|
||||
ln -sr "$out/share/arduino/arduino" "$out/bin/arduino"
|
||||
|
||||
cp -r build/shared/icons $out/share/arduino
|
||||
mkdir -p $out/share/applications
|
||||
cp build/linux/dist/desktop.template $out/share/applications/arduino.desktop
|
||||
substituteInPlace $out/share/applications/arduino.desktop \
|
||||
--replace '<BINARY_LOCATION>' "$out/bin/arduino" \
|
||||
--replace '<ICON_NAME>' "$out/share/arduino/icons/128x128/apps/arduino.png"
|
||||
''}
|
||||
|
||||
${lib.optionalString withTeensyduino ''
|
||||
# Back up the original jars
|
||||
mv $out/share/arduino/lib/arduino-core.jar $out/share/arduino/lib/arduino-core.jar.bak
|
||||
mv $out/share/arduino/lib/pde.jar $out/share/arduino/lib/pde.jar.bak
|
||||
# Extract jars from the arduino distributable package
|
||||
mkdir arduino_dist
|
||||
cd arduino_dist
|
||||
tar xfJ ${arduino_dist_src} arduino-${version}/lib/arduino-core.jar arduino-${version}/lib/pde.jar
|
||||
cd ..
|
||||
# Replace the built jars with the official arduino jars
|
||||
mv arduino_dist/arduino-${version}/lib/{arduino-core,pde}.jar $out/share/arduino/lib/
|
||||
# Delete the directory now that the jars are copied out
|
||||
rm -r arduino_dist
|
||||
# Extract and patch the Teensyduino installer
|
||||
cp ${teensyduino_src} ./TeensyduinoInstall.${teensy_architecture}
|
||||
chmod +w ./TeensyduinoInstall.${teensy_architecture}
|
||||
upx -d ./TeensyduinoInstall.${teensy_architecture}
|
||||
patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
|
||||
--set-rpath "${teensy_libpath}" \
|
||||
./TeensyduinoInstall.${teensy_architecture}
|
||||
chmod +x ./TeensyduinoInstall.${teensy_architecture}
|
||||
./TeensyduinoInstall.${teensy_architecture} --dir=$out/share/arduino
|
||||
# Check for successful installation
|
||||
[ -d $out/share/arduino/hardware/teensy ] || exit 1
|
||||
# After the install, copy the built jars back
|
||||
mv $out/share/arduino/lib/arduino-core.jar.bak $out/share/arduino/lib/arduino-core.jar
|
||||
mv $out/share/arduino/lib/pde.jar.bak $out/share/arduino/lib/pde.jar
|
||||
''}
|
||||
'';
|
||||
|
||||
# So we don't accidentally mess with firmware files
|
||||
dontStrip = true;
|
||||
dontPatchELF = true;
|
||||
|
||||
preFixup = ''
|
||||
for file in $(find $out -type f \( -perm /0111 -o -name \*.so\* \) ); do
|
||||
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" "$file" || true
|
||||
patchelf --set-rpath ${rpath}:$out/lib $file || true
|
||||
done
|
||||
|
||||
${lib.concatMapStringsSep "\n"
|
||||
({ jar, file }:
|
||||
''
|
||||
jar xvf $out/${jar} ${file}
|
||||
patchelf --set-rpath $rpath ${file}
|
||||
jar uvf $out/${jar} ${file}
|
||||
rm -f ${file}
|
||||
''
|
||||
)
|
||||
patchelfInJars}
|
||||
|
||||
# avrdude_bin is linked against libtinfo.so.5
|
||||
mkdir $out/lib/
|
||||
ln -s ${lib.makeLibraryPath [ ncurses5 ]}/libtinfo.so.5 $out/lib/libtinfo.so.5
|
||||
|
||||
${lib.optionalString withTeensyduino ''
|
||||
# Patch the Teensy loader binary
|
||||
patchelf --debug \
|
||||
--set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
|
||||
--set-rpath "${teensy_libpath}" \
|
||||
$out/share/arduino/hardware/tools/teensy{,_ports,_reboot,_restart,_serialmon}
|
||||
''}
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Open-source electronics prototyping platform";
|
||||
homepage = "https://www.arduino.cc/";
|
||||
license = if withTeensyduino then licenses.unfreeRedistributable else licenses.gpl2;
|
||||
sourceProvenance = with sourceTypes; [ binaryBytecode ];
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ antono auntie robberer bjornfor bergey ];
|
||||
};
|
||||
}
|
||||
217
pkgs/development/embedded/arduino/arduino-core/downloads.nix
Normal file
217
pkgs/development/embedded/arduino/arduino-core/downloads.nix
Normal file
|
|
@ -0,0 +1,217 @@
|
|||
{ fetchurl
|
||||
, optionalAttrs
|
||||
, system
|
||||
}:
|
||||
# This file preloads all the archives which Arduino's build/build.xml
|
||||
# would otherwise try to download itself. When updating this for a new
|
||||
# version of Arduino, check build.xml for version numbers and new
|
||||
# urls.
|
||||
{
|
||||
"build/shared/reference-1.6.6-3.zip" = fetchurl {
|
||||
url = "https://downloads.arduino.cc/reference-1.6.6-3.zip";
|
||||
sha256 = "119nj1idz85l71fy6a6wwsx0mcd8y0ib1wy0l6j9kz88nkwvggy3";
|
||||
};
|
||||
"build/shared/Galileo_help_files-1.6.2.zip" = fetchurl {
|
||||
url = "https://downloads.arduino.cc/Galileo_help_files-1.6.2.zip";
|
||||
sha256 = "0qda0xml353sfhjmx9my4mlcyzbf531k40dcr1cnsa438xp2fw0w";
|
||||
};
|
||||
"build/shared/Edison_help_files-1.6.2.zip" = fetchurl {
|
||||
url = "https://downloads.arduino.cc/Edison_help_files-1.6.2.zip";
|
||||
sha256 = "1x25rivmh0zpa6lr8dafyxvim34wl3wnz3r9msfxg45hnbjqqwan";
|
||||
};
|
||||
"build/Ethernet-2.0.0.zip" = fetchurl {
|
||||
url = "https://github.com/arduino-libraries/Ethernet/archive/2.0.0.zip";
|
||||
sha256 = "0had46c1n1wx9fa7ki5dwidvchiy00pv7qj9msp6wgv199vm19m8";
|
||||
};
|
||||
"build/GSM-1.0.6.zip" = fetchurl {
|
||||
url = "https://github.com/arduino-libraries/GSM/archive/1.0.6.zip";
|
||||
sha256 = "1kmikxr07cyzsnhhymvgj9m4dxi671ni120l33gfmmm6079qfwbk";
|
||||
};
|
||||
"build/Stepper-1.1.3.zip" = fetchurl {
|
||||
url = "https://github.com/arduino-libraries/Stepper/archive/1.1.3.zip";
|
||||
sha256 = "1kyv6bmhmbjh7z8x77v04aywd2s54nm80g0j07gay2sa3f6k1p4v";
|
||||
};
|
||||
"build/TFT-1.0.6.zip" = fetchurl {
|
||||
url = "https://github.com/arduino-libraries/TFT/archive/1.0.6.zip";
|
||||
sha256 = "1d69xp3hrva58nrx0vy4skrr1h63649q1jnc2g55bpbaxjhf5j5w";
|
||||
};
|
||||
"build/WiFi-1.2.7.zip" = fetchurl {
|
||||
url = "https://github.com/arduino-libraries/WiFi/archive/1.2.7.zip";
|
||||
sha256 = "1fmj2q2672hivp5jn05xhc875ii3w54nfja3b1yrp8s2fwinh7f6";
|
||||
};
|
||||
"build/Firmata-2.5.8.zip" = fetchurl {
|
||||
url = "https://github.com/firmata/arduino/archive/2.5.8.zip";
|
||||
sha256 = "0jmlqrnw5fksyqkjhcsl6j1q7c0clnvfr8yknanqqssc19pxp722";
|
||||
};
|
||||
"build/Bridge-1.7.0.zip" = fetchurl {
|
||||
url = "https://github.com/arduino-libraries/Bridge/archive/1.7.0.zip";
|
||||
sha256 = "1qpnb2mj77jm4qczk1ndgjc9j2kqxnyahxdvlp0120x6w2jcq8s8";
|
||||
};
|
||||
"build/Robot_Control-1.0.4.zip" = fetchurl {
|
||||
url = "https://github.com/arduino-libraries/Robot_Control/archive/1.0.4.zip";
|
||||
sha256 = "1pkabrghx3h8l60x571vwkbhfm02nhyn5x2vqz4vhx9cczr70zq7";
|
||||
};
|
||||
"build/Robot_Motor-1.0.3.zip" = fetchurl {
|
||||
url = "https://github.com/arduino-libraries/Robot_Motor/archive/1.0.3.zip";
|
||||
sha256 = "1pkvrimg77jrhdsz4l81y59hv50h6cl7hvhk9w8ac7ckg70lvxkw";
|
||||
};
|
||||
"build/RobotIRremote-2.0.0.zip" = fetchurl {
|
||||
url = "https://github.com/arduino-libraries/RobotIRremote/archive/2.0.0.zip";
|
||||
sha256 = "0j5smap74j8p3wc6k0h73b1skj4gkr7r25jbjh1j1cg052dxri86";
|
||||
};
|
||||
"build/SpacebrewYun-1.0.2.zip" = fetchurl {
|
||||
url = "https://github.com/arduino-libraries/SpacebrewYun/archive/1.0.2.zip";
|
||||
sha256 = "1d8smmsx12qhf2ldvmi93h48cvdyz4id5gd68cvf076wfyv6dks8";
|
||||
};
|
||||
"build/Temboo-1.2.1.zip" = fetchurl {
|
||||
url = "https://github.com/arduino-libraries/Temboo/archive/1.2.1.zip";
|
||||
sha256 = "1fyzfihsbcjpjasqbmbbfcall2zl48nzrp4xk9pslppal31mvl8x";
|
||||
};
|
||||
"build/Esplora-1.0.4.zip" = fetchurl {
|
||||
url = "https://github.com/arduino-libraries/Esplora/archive/1.0.4.zip";
|
||||
sha256 = "1dflfrg38f0312nxn6wkkgq1ql4hx3y9kplalix6mkqmzwrdvna4";
|
||||
};
|
||||
"build/Mouse-1.0.1.zip" = fetchurl {
|
||||
url = "https://github.com/arduino-libraries/Mouse/archive/1.0.1.zip";
|
||||
sha256 = "106jjqxzpf5lrs9akwvamqsblj5w2fb7vd0wafm9ihsikingiypr";
|
||||
};
|
||||
"build/Keyboard-1.0.2.zip" = fetchurl {
|
||||
url = "https://github.com/arduino-libraries/Keyboard/archive/1.0.2.zip";
|
||||
sha256 = "17yfj95r1i7fb87q4krmxmaq07b4x2xf8cjngrj5imj68wgjck53";
|
||||
};
|
||||
"build/SD-1.2.4.zip" = fetchurl {
|
||||
url = "https://github.com/arduino-libraries/SD/archive/1.2.4.zip";
|
||||
sha256 = "123g9px9nqcrsx696wqwzjd5s4hr55nxgfz95b7ws3v007i1f3fz";
|
||||
};
|
||||
"build/Servo-1.1.8.zip" = fetchurl {
|
||||
url = "https://github.com/arduino-libraries/Servo/archive/1.1.8.zip";
|
||||
sha256 = "sha256-8mfRQG/HIRVvdiRApjMib6n1ENqAB63vGsxe6vwndeU=";
|
||||
};
|
||||
"build/LiquidCrystal-1.0.7.zip" = fetchurl {
|
||||
url = "https://github.com/arduino-libraries/LiquidCrystal/archive/1.0.7.zip";
|
||||
sha256 = "1wrxrqz3n4yrj9j1a2b7pdd7a1rlyi974ra7crv5amjng8817x9n";
|
||||
};
|
||||
"build/Adafruit_Circuit_Playground-1.11.3.zip" = fetchurl {
|
||||
url = "https://github.com/adafruit/Adafruit_CircuitPlayground/archive/1.11.3.zip";
|
||||
sha256 = "sha256-YL4ZAi9Fno+rG/bAdjxnXIglfZnbN6KpXFpj23Bf3LQ=";
|
||||
};
|
||||
"build/libastylej-2.05.1-5.zip" = fetchurl {
|
||||
url = "https://downloads.arduino.cc/libastylej-2.05.1-5.zip";
|
||||
sha256 = "11mlprwvqfq3nvmz6hdf1fcg02a7xi2a9qhffa1d8a4w15s2iwny";
|
||||
};
|
||||
"build/liblistSerials-1.4.2-2.zip" = fetchurl {
|
||||
url = "https://downloads.arduino.cc/liblistSerials/liblistSerials-1.4.2-2.zip";
|
||||
sha256 = "0sqzwp1lfjy452z3d4ma5c4blwsj7za72ymxf7crpq9dh9qd8f53";
|
||||
};
|
||||
"build/shared/WiFi101-Updater-ArduinoIDE-Plugin-0.12.0.zip" = fetchurl {
|
||||
url = "https://github.com/arduino-libraries/WiFi101-FirmwareUpdater-Plugin/releases/download/v0.12.0/WiFi101-Updater-ArduinoIDE-Plugin-0.12.0.zip";
|
||||
sha256 = "sha256-6RM7Sr/tk5PVeonhzaa6WvRaz+7av+MhSYKPAinaOkg=";
|
||||
};
|
||||
"build/avr-1.8.3.tar.bz2" = fetchurl {
|
||||
url = "https://downloads.arduino.cc/cores/avr-1.8.3.tar.bz2";
|
||||
sha256 = "051wnc0nmsmxvvs4c79zvjag33yx5il2pz2j7qyjsxkp4jc9p2ny";
|
||||
};
|
||||
"build/arduino-examples-1.9.1.zip" = fetchurl {
|
||||
url = "https://github.com/arduino/arduino-examples/archive/refs/tags/1.9.1.zip";
|
||||
sha256 = "sha256-kAxIhYQ8P2ULTzQwi6bUXXEXJ53mKNgQxuwX3QYhNoQ=";
|
||||
};
|
||||
}
|
||||
|
||||
// optionalAttrs (system == "x86_64-linux") {
|
||||
"build/arduino-builder-linux64-1.6.1.tar.bz2" = fetchurl {
|
||||
url = "https://downloads.arduino.cc/tools/arduino-builder-linux64-1.6.1.tar.bz2";
|
||||
sha256 = "sha256-QUHuC+rE5vrMX8+Bkfuw+59UQdJAekeoaZd1Mch7UXE=";
|
||||
};
|
||||
"build/linux/avr-gcc-7.3.0-atmel3.6.1-arduino7-x86_64-pc-linux-gnu.tar.bz2" = fetchurl {
|
||||
url = "https://downloads.arduino.cc/tools/avr-gcc-7.3.0-atmel3.6.1-arduino7-x86_64-pc-linux-gnu.tar.bz2";
|
||||
sha256 = "07nrzv7gsq7bi7ichlw3xsdvgzk0lvv56b73ksn3089ajpv3g35x";
|
||||
};
|
||||
"build/linux/avrdude-6.3.0-arduino17-x86_64-pc-linux-gnu.tar.bz2" = fetchurl {
|
||||
url = "https://downloads.arduino.cc/tools/avrdude-6.3.0-arduino17-x86_64-pc-linux-gnu.tar.bz2";
|
||||
sha256 = "0gfic26af9vlcpkw8v914psn05vmq1rsrlk1fi7vzapj1a9gpkdc";
|
||||
};
|
||||
"build/linux/arduinoOTA-1.3.0-linux_amd64.tar.bz2" = fetchurl {
|
||||
url = "https://downloads.arduino.cc/tools/arduinoOTA-1.3.0-linux_amd64.tar.bz2";
|
||||
sha256 = "1ylz4pfa9np0nn0w9igmmm3sr8hz3na04n7cv8ia3hzz84jfwida";
|
||||
};
|
||||
}
|
||||
|
||||
// optionalAttrs (system == "i686-linux") {
|
||||
"build/arduino-builder-linux32-1.6.1.tar.bz2" = fetchurl {
|
||||
url = "https://downloads.arduino.cc/tools/arduino-builder-linux32-1.6.1.tar.bz2";
|
||||
sha256 = "sha256-GX2oGUGYYyatLroASBCBOGjsdCws06907O+O5Rz7Kls=";
|
||||
};
|
||||
"build/linux/avr-gcc-7.3.0-atmel3.6.1-arduino5-i686-pc-linux-gnu.tar.bz2" = fetchurl {
|
||||
url = "https://downloads.arduino.cc/tools/avr-gcc-7.3.0-atmel3.6.1-arduino5-i686-pc-linux-gnu.tar.bz2";
|
||||
sha256 = "078f3rbpdrghk63mbaq73bd5p6znimp14b1wdf6nh2gdswwjgw9g";
|
||||
};
|
||||
"build/linux/avrdude-6.3.0-arduino17-i686-pc-linux-gnu.tar.bz2" = fetchurl {
|
||||
url = "https://downloads.arduino.cc/tools/avrdude-6.3.0-arduino17-i686-pc-linux-gnu.tar.bz2";
|
||||
sha256 = "0py0jvpim0frmv0dnvzfj122ni5hg1qwshgya4a0wc5rgp0wd32w";
|
||||
};
|
||||
"build/linux/arduinoOTA-1.3.0-linux_386.tar.bz2" = fetchurl {
|
||||
url = "https://downloads.arduino.cc/tools/arduinoOTA-1.3.0-linux_386.tar.bz2";
|
||||
sha256 = "1cl79019ldsq0sc3fd4pm0vx2kqcklld7w03hdcj99y7zgb5jzry";
|
||||
};
|
||||
}
|
||||
|
||||
// optionalAttrs (system == "x86_64-darwin") {
|
||||
"build/arduino-builder-macosx-1.6.1-signed.tar.bz2" = fetchurl {
|
||||
url = "https://downloads.arduino.cc/tools/arduino-builder-macosx-1.6.1-signed.tar.bz2";
|
||||
sha256 = "sha256-icMXwovzT2UQAKry9sWyRvcNxPXaFdltAPyW/DDVEFA=";
|
||||
};
|
||||
"build/macosx/avr-gcc-7.3.0-atmel3.6.1-arduino5-x86_64-apple-darwin14-signed.tar.bz2" = fetchurl {
|
||||
url = "https://downloads.arduino.cc/tools/avr-gcc-7.3.0-atmel3.6.1-arduino5-x86_64-apple-darwin14-signed.tar.bz2";
|
||||
sha256 = "0lcnp525glnc2chcynnz2nllm4q6ar4n9nrjqd1jbj4m706zbv67";
|
||||
};
|
||||
"build/macosx/avrdude-6.3.0-arduino17-x86_64-apple-darwin12-signed.tar.bz2" = fetchurl {
|
||||
url = "https://downloads.arduino.cc/tools/avrdude-6.3.0-arduino17-x86_64-apple-darwin12-signed.tar.bz2";
|
||||
sha256 = "1m24dci8mjf70yrf033mp1834pbp870m8sns2jxs3iy2i4qviiki";
|
||||
};
|
||||
"build/linux/arduinoOTA-1.3.0-darwin_amd64-signed.tar.bz2" = fetchurl {
|
||||
url = "https://downloads.arduino.cc/tools/arduinoOTA-1.3.0-darwin_amd64-signed.tar.bz2";
|
||||
sha256 = "12pwfnikq3z3ji5wgjhzx1mfyaha5cym7mr63r8kfl5a85fhk8nz";
|
||||
};
|
||||
"build/macosx/appbundler/appbundler-1.0ea-arduino5.jar.zip" = fetchurl {
|
||||
url = "https://downloads.arduino.cc/appbundler-1.0ea-arduino5.jar.zip";
|
||||
sha256 = "1ims951z7ajprqms7yd8ll83c79n7krhd9ljw30yn61f6jk46x82";
|
||||
};
|
||||
}
|
||||
|
||||
// optionalAttrs (system == "aarch64-linux") {
|
||||
"build/arduino-builder-linuxaarch64-1.6.1.tar.bz2" = fetchurl {
|
||||
url = "https://downloads.arduino.cc/tools/arduino-builder-linuxaarch64-1.6.1.tar.bz2";
|
||||
sha256 = "sha256-BLcAIvGt0OQfjN87W1aLpLAQchhdFHoBqJPCcIWyHxQ=";
|
||||
};
|
||||
"build/linux/avr-gcc-7.3.0-atmel3.6.1-arduino7-aarch64-pc-linux-gnu.tar.bz2" = fetchurl {
|
||||
url = "https://downloads.arduino.cc/tools/avr-gcc-7.3.0-atmel3.6.1-arduino7-aarch64-pc-linux-gnu.tar.bz2";
|
||||
sha256 = "sha256-A9Miud9toXKJ6efGIzw0qFNdnGRcGe/HcroZ5WkU8zk=";
|
||||
};
|
||||
"build/linux/avrdude-6.3.0-arduino17-aarch64-pc-linux-gnu.tar.bz2" = fetchurl {
|
||||
url = "https://downloads.arduino.cc/tools/avrdude-6.3.0-arduino17-aarch64-pc-linux-gnu.tar.bz2";
|
||||
sha256 = "1z59dx2j2j4675awjzag9fswhvkn3hlz4ds5d2b7pzmca7vliybc";
|
||||
};
|
||||
"build/linux/arduinoOTA-1.3.0-linux_aarch64.tar.bz2" = fetchurl {
|
||||
url = "https://downloads.arduino.cc/tools/arduinoOTA-1.3.0-linux_aarch64.tar.bz2";
|
||||
sha256 = "04s1is2w8xhvc7lg0lmyk0yjsnar2l2gdc6ig7lkgb7zgkrxhpl3";
|
||||
};
|
||||
}
|
||||
|
||||
// optionalAttrs (builtins.match "armv[67]l-linux" system != null) {
|
||||
"build/arduino-builder-linuxarm-1.6.1.tar.bz2" = fetchurl {
|
||||
url = "https://downloads.arduino.cc/tools/arduino-builder-linuxarm-1.6.1.tar.bz2";
|
||||
sha256 = "sha256-VtJxhRaOOKdBxmTWjTYnSPAXl728hMksBKSKS49qiMU=";
|
||||
};
|
||||
"build/linux/avr-gcc-7.3.0-atmel3.6.1-arduino5-arm-linux-gnueabihf.tar.bz2" = fetchurl {
|
||||
url = "https://downloads.arduino.cc/tools/avr-gcc-7.3.0-atmel3.6.1-arduino5-arm-linux-gnueabihf.tar.bz2";
|
||||
sha256 = "0fcn0s0fdgbz3yma2gjv16s1idrzn6nhmypdw8awg0kb3i9xbb7l";
|
||||
};
|
||||
"build/linux/avrdude-6.3.0-arduino17-armhf-pc-linux-gnu.tar.bz2" = fetchurl {
|
||||
url = "https://downloads.arduino.cc/tools/avrdude-6.3.0-arduino17-armhf-pc-linux-gnu.tar.bz2";
|
||||
sha256 = "1lah9wvwvliajrrf5jw5blkjhk1sxivz26gj5s86zah3v32ni3ia";
|
||||
};
|
||||
"build/linux/arduinoOTA-1.3.0-linux_arm.tar.bz2" = fetchurl {
|
||||
url = "https://downloads.arduino.cc/tools/arduinoOTA-1.3.0-linux_arm.tar.bz2";
|
||||
sha256 = "0mm6spjlg0lhkfx5c9q27b6agjywnc1nf3mbl15yysmm15s5i20q";
|
||||
};
|
||||
}
|
||||
32
pkgs/development/embedded/arduino/arduino-mk/default.nix
Normal file
32
pkgs/development/embedded/arduino/arduino-mk/default.nix
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
{ stdenv, lib, fetchFromGitHub, python3Packages, installShellFiles }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "1.6.0";
|
||||
pname = "arduino-mk";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "sudar";
|
||||
repo = "Arduino-Makefile";
|
||||
rev = version;
|
||||
sha256 = "0flpl97d2231gp51n3y4qvf3y1l8xzafi1sgpwc305vwc2h4dl2x";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ python3Packages.wrapPython installShellFiles ];
|
||||
propagatedBuildInputs = with python3Packages; [ pyserial ];
|
||||
installPhase = ''
|
||||
mkdir $out
|
||||
cp -rT $src $out
|
||||
installManPage *.1
|
||||
'';
|
||||
postFixupPhase = ''
|
||||
wrapPythonPrograms
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Makefile for Arduino sketches";
|
||||
homepage = "https://github.com/sudar/Arduino-Makefile";
|
||||
license = licenses.lgpl21;
|
||||
maintainers = [ maintainers.eyjhb ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue