@@ -69,17 +69,16 @@ let
6969 xorg.libXxf86vm
7070 zlib
7171 ];
72− teensy_architecture = if stdenv.hostPlatform.isx86_32 then "linux32"
73− else if stdenv.hostPlatform.isx86_64 then "linux64"
74− else if stdenv.hostPlatform.isAarch64 then "linuxaarch64"
75− else if stdenv.hostPlatform.isAarch32 then "linuxarm"
76− else throw "${stdenv.hostPlatform.system} is not supported in teensy";
77−
78− pname = (if withTeensyduino then "teensyduino" else "arduino")
79− + lib.optionalString (!withGui) "-core";
72+ teensy_architecture =
73+ if stdenv.hostPlatform.isx86_32 then "linux32"
74+ else if stdenv.hostPlatform.isx86_64 then "linux64"
75+ else if stdenv.hostPlatform.isAarch64 then "linuxaarch64"
76+ else if stdenv.hostPlatform.isAarch32 then "linuxarm"
77+ else throw "${stdenv.hostPlatform.system} is not supported in teensy";
78+
8079in
8180stdenv.mkDerivation rec {
82− inherit pname;
81+ pname = (if withTeensyduino then "teensyduino" else "arduino") + lib.optionalString (!withGui) "-core";
8382 version = "1.8.16";
8483
8584 src = fetchFromGitHub {
@@ -195,8 +194,8 @@ stdenv.mkDerivation rec {
195194 chmod +w ./TeensyduinoInstall.${teensy_architecture}
196195 upx -d ./TeensyduinoInstall.${teensy_architecture}
197196 patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
198− --set-rpath "${teensy_libpath}" \
199− ./TeensyduinoInstall.${teensy_architecture}
197+ --set-rpath "${teensy_libpath}" \
198+ ./TeensyduinoInstall.${teensy_architecture}
200199 chmod +x ./TeensyduinoInstall.${teensy_architecture}
201200 ./TeensyduinoInstall.${teensy_architecture} --dir=$out/share/arduino
202201 # Check for successful installation
@@ -213,8 +212,8 @@ stdenv.mkDerivation rec {
213212
214213 preFixup = ''
215214 for file in $(find $out -type f \( -perm /0111 -o -name \*.so\* \) ); do
216− patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" "$file" || true
217− patchelf --set-rpath ${rpath}:$out/lib $file || true
215+ patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" "$file" || true
216+ patchelf --set-rpath ${rpath}:$out/lib $file || true
218217 done
219218
220219 ${lib.concatMapStringsSep "\n"
@@ -235,15 +234,15 @@ stdenv.mkDerivation rec {
235234 ${lib.optionalString withTeensyduino ''
236235 # Patch the Teensy loader binary
237236 patchelf --debug \
238− --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
239− --set-rpath "${teensy_libpath}" \
240− $out/share/arduino/hardware/tools/teensy{,_ports,_reboot,_restart,_serialmon}
237+ --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
238+ --set-rpath "${teensy_libpath}" \
239+ $out/share/arduino/hardware/tools/teensy{,_ports,_reboot,_restart,_serialmon}
241240 ''}
242241 '';
243242
244243 meta = with lib; {
245244 description = "Open-source electronics prototyping platform";
246− homepage = "http://arduino.cc/";
245+ homepage = "https://www.arduino.cc/";
247246 license = if withTeensyduino then licenses.unfreeRedistributable else licenses.gpl2;
248247 platforms = platforms.linux;
249248 maintainers = with maintainers; [ antono auntie robberer bjornfor bergey ];