diff options
Diffstat (limited to 'pkgs/development/embedded')
4 files changed, 140 insertions, 70 deletions
diff --git a/pkgs/development/embedded/arduino/arduino-cli/default.nix b/pkgs/development/embedded/arduino/arduino-cli/default.nix index c41f884d4fe16..176f3adfc08c7 100644 --- a/pkgs/development/embedded/arduino/arduino-cli/default.nix +++ b/pkgs/development/embedded/arduino/arduino-cli/default.nix @@ -4,13 +4,13 @@ let pkg = buildGoModule rec { pname = "arduino-cli"; - version = "0.34.2"; + version = "0.35.1"; src = fetchFromGitHub { owner = "arduino"; repo = pname; - rev = version; - hash = "sha256-X7vrcaJkVqzZoaIFLWJhhdlgRpckLG69uVmUUZd/XXY="; + rev = "v${version}"; + hash = "sha256-5XMdI+TMUd+U6bvDQT9Q62ATxtbnRAJ/XDYWHgVEUbU="; }; nativeBuildInputs = [ @@ -23,7 +23,7 @@ let subPackages = [ "." ]; - vendorHash = "sha256-cr5D7QDh65xWZJ4gq32ehklwrHWyQEWW/FZZ4gPTJBk="; + vendorHash = "sha256-y7YxcBFjKcQK6ilCKOyoszq64/0xG5GgTehKrKThknU="; postPatch = let skipTests = [ diff --git a/pkgs/development/embedded/espflash/default.nix b/pkgs/development/embedded/espflash/default.nix new file mode 100644 index 0000000000000..8b3540111a719 --- /dev/null +++ b/pkgs/development/embedded/espflash/default.nix @@ -0,0 +1,39 @@ +{ lib +, rustPlatform +, fetchCrate +, pkg-config +, stdenv +, udev +, Security +, SystemConfiguration +}: + +rustPlatform.buildRustPackage rec { + pname = "espflash"; + version = "2.1.0"; + + src = fetchCrate { + inherit pname version; + hash = "sha256-Gd+8pA36mO+BCA0EFshboBi0etNjsiQFQU1wBYf/o6I="; + }; + + nativeBuildInputs = [ pkg-config ]; + + buildInputs = lib.optionals stdenv.isLinux [ + udev + ] ++ lib.optionals stdenv.isDarwin [ + Security + SystemConfiguration + ]; + + cargoHash = "sha256-IObAbsyrVBXt5zldirRezU7vS3R3aUihMFy2yIRWIlk="; + + meta = with lib; { + description = "Serial flasher utility for Espressif SoCs and modules"; + homepage = "https://github.com/esp-rs/espflash"; + changelog = "https://github.com/esp-rs/espflash/blob/v${version}/CHANGELOG.md"; + mainProgram = "espflash"; + license = with licenses; [ asl20 /* or */ mit ]; + maintainers = with maintainers; [ newam ]; + }; +} diff --git a/pkgs/development/embedded/stm32/stm32cubemx/default.nix b/pkgs/development/embedded/stm32/stm32cubemx/default.nix index 5cab499f7c883..4bcad690bbbdc 100644 --- a/pkgs/development/embedded/stm32/stm32cubemx/default.nix +++ b/pkgs/development/embedded/stm32/stm32cubemx/default.nix @@ -1,84 +1,115 @@ { fdupes +, buildFHSEnv , fetchzip , icoutils , imagemagick , jdk17 , lib , makeDesktopItem -, stdenv +, stdenvNoCC }: let iconame = "STM32CubeMX"; -in -stdenv.mkDerivation rec { - pname = "stm32cubemx"; - version = "6.10.0"; + package = stdenvNoCC.mkDerivation rec { + pname = "stm32cubemx"; + version = "6.10.0"; - src = fetchzip { - url = "https://sw-center.st.com/packs/resource/library/stm32cube_mx_v${builtins.replaceStrings ["."] [""] version}-lin.zip"; - sha256 = "sha256-B5Sf+zM7h9BiFqDYrLS0JdqZi3dGy6H9gAaJIN3izeM="; - stripRoot = false; - }; - - nativeBuildInputs = [ fdupes icoutils imagemagick ]; - desktopItem = makeDesktopItem { - name = "STM32CubeMX"; - exec = "stm32cubemx"; - desktopName = "STM32CubeMX"; - categories = [ "Development" ]; - icon = "stm32cubemx"; - comment = meta.description; - terminal = false; - startupNotify = false; - mimeTypes = [ - "x-scheme-handler/sgnl" - "x-scheme-handler/signalcaptcha" - ]; - }; + src = fetchzip { + url = "https://sw-center.st.com/packs/resource/library/stm32cube_mx_v${builtins.replaceStrings ["."] [""] version}-lin.zip"; + sha256 = "sha256-B5Sf+zM7h9BiFqDYrLS0JdqZi3dGy6H9gAaJIN3izeM="; + stripRoot = false; + }; - buildCommand = '' - mkdir -p $out/{bin,opt/STM32CubeMX,share/applications} + nativeBuildInputs = [ fdupes icoutils imagemagick ]; + desktopItem = makeDesktopItem { + name = "STM32CubeMX"; + exec = "stm32cubemx"; + desktopName = "STM32CubeMX"; + categories = [ "Development" ]; + icon = "stm32cubemx"; + comment = meta.description; + terminal = false; + startupNotify = false; + mimeTypes = [ + "x-scheme-handler/sgnl" + "x-scheme-handler/signalcaptcha" + ]; + }; - cp -r $src/MX/. $out/opt/STM32CubeMX/ - chmod +rx $out/opt/STM32CubeMX/STM32CubeMX + buildCommand = '' + mkdir -p $out/{bin,opt/STM32CubeMX,share/applications} - cat << EOF > $out/bin/${pname} - #!${stdenv.shell} - ${jdk17}/bin/java -jar $out/opt/STM32CubeMX/STM32CubeMX - EOF - chmod +x $out/bin/${pname} + cp -r $src/MX/. $out/opt/STM32CubeMX/ + chmod +rx $out/opt/STM32CubeMX/STM32CubeMX - icotool --extract $out/opt/STM32CubeMX/help/${iconame}.ico - fdupes -dN . > /dev/null - ls - for size in 16 24 32 48 64 128 256; do - mkdir -pv $out/share/icons/hicolor/"$size"x"$size"/apps - if [ $size -eq 256 ]; then - mv ${iconame}_*_"$size"x"$size"x32.png \ - $out/share/icons/hicolor/"$size"x"$size"/apps/${pname}.png - else - convert -resize "$size"x"$size" ${iconame}_*_256x256x32.png \ - $out/share/icons/hicolor/"$size"x"$size"/apps/${pname}.png - fi - done; + cat << EOF > $out/bin/${pname} + #!${stdenvNoCC.shell} + ${jdk17}/bin/java -jar $out/opt/STM32CubeMX/STM32CubeMX + EOF + chmod +x $out/bin/${pname} - cp ${desktopItem}/share/applications/*.desktop $out/share/applications - ''; + icotool --extract $out/opt/STM32CubeMX/help/${iconame}.ico + fdupes -dN . > /dev/null + ls + for size in 16 24 32 48 64 128 256; do + mkdir -pv $out/share/icons/hicolor/"$size"x"$size"/apps + if [ $size -eq 256 ]; then + mv ${iconame}_*_"$size"x"$size"x32.png \ + $out/share/icons/hicolor/"$size"x"$size"/apps/${pname}.png + else + convert -resize "$size"x"$size" ${iconame}_*_256x256x32.png \ + $out/share/icons/hicolor/"$size"x"$size"/apps/${pname}.png + fi + done; - meta = with lib; { - description = "A graphical tool for configuring STM32 microcontrollers and microprocessors"; - longDescription = '' - A graphical tool that allows a very easy configuration of STM32 - microcontrollers and microprocessors, as well as the generation of the - corresponding initialization C code for the Arm® Cortex®-M core or a - partial Linux® Device Tree for Arm® Cortex®-A core), through a - step-by-step process. + cp ${desktopItem}/share/applications/*.desktop $out/share/applications ''; - homepage = "https://www.st.com/en/development-tools/stm32cubemx.html"; - sourceProvenance = with sourceTypes; [ binaryBytecode ]; - license = licenses.unfree; - maintainers = with maintainers; [ angaz wucke13 ]; - platforms = platforms.all; + + meta = with lib; { + description = "A graphical tool for configuring STM32 microcontrollers and microprocessors"; + longDescription = '' + A graphical tool that allows a very easy configuration of STM32 + microcontrollers and microprocessors, as well as the generation of the + corresponding initialization C code for the Arm® Cortex®-M core or a + partial Linux® Device Tree for Arm® Cortex®-A core), through a + step-by-step process. + ''; + homepage = "https://www.st.com/en/development-tools/stm32cubemx.html"; + sourceProvenance = with sourceTypes; [ binaryBytecode ]; + license = licenses.unfree; + maintainers = with maintainers; [ angaz wucke13 ]; + platforms = [ "x86_64-linux" ]; + }; }; + in + buildFHSEnv { + inherit (package) pname meta; + runScript = "${package.outPath}/bin/stm32cubemx"; + targetPkgs = pkgs: + with pkgs; [ + alsa-lib + at-spi2-atk + cairo + cups + dbus + expat + glib + gtk3 + libdrm + libGL + libudev0-shim + libxkbcommon + mesa + nspr + nss + pango + xorg.libX11 + xorg.libxcb + xorg.libXcomposite + xorg.libXdamage + xorg.libXext + xorg.libXfixes + xorg.libXrandr + ]; } diff --git a/pkgs/development/embedded/svdtools/default.nix b/pkgs/development/embedded/svdtools/default.nix index ad270e0ba6515..c2b86d7bd66a6 100644 --- a/pkgs/development/embedded/svdtools/default.nix +++ b/pkgs/development/embedded/svdtools/default.nix @@ -5,14 +5,14 @@ rustPlatform.buildRustPackage rec { pname = "svdtools"; - version = "0.3.8"; + version = "0.3.9"; src = fetchCrate { inherit version pname; - hash = "sha256-daATz1bd5fwfYnfVbweJd/I6SsQyg2CC+MEZ5WLyZBw="; + hash = "sha256-agIr2jM0BqLSXod5V+p//bxcnrXe2+wW5RMq8GAAwnI="; }; - cargoHash = "sha256-TSLUBkPRab6cwlXJw8tHpqYjhLtVa+QJZq13Qj/0UzU="; + cargoHash = "sha256-z9GmFjABgvh2xf4nujnZUgHvKvChfP4Guox89PuuxV8="; meta = with lib; { description = "Tools to handle vendor-supplied, often buggy SVD files"; |