diff options
Diffstat (limited to 'pkgs/development/embedded')
-rw-r--r-- | pkgs/development/embedded/arduino/arduino-cli/default.nix | 99 | ||||
-rw-r--r-- | pkgs/development/embedded/edl/default.nix | 31 | ||||
-rw-r--r-- | pkgs/development/embedded/elf2uf2-rs/default.nix | 2 | ||||
-rw-r--r-- | pkgs/development/embedded/fpga/apio/default.nix | 26 | ||||
-rw-r--r-- | pkgs/development/embedded/fpga/openfpgaloader/default.nix | 2 | ||||
-rw-r--r-- | pkgs/development/embedded/fpga/tinyprog/default.nix | 2 | ||||
-rw-r--r-- | pkgs/development/embedded/openocd/default.nix | 22 | ||||
-rw-r--r-- | pkgs/development/embedded/rshell/default.nix | 4 | ||||
-rw-r--r-- | pkgs/development/embedded/svdtools/default.nix | 6 | ||||
-rw-r--r-- | pkgs/development/embedded/teensy-cmake-macros/hook.nix | 3 |
10 files changed, 59 insertions, 138 deletions
diff --git a/pkgs/development/embedded/arduino/arduino-cli/default.nix b/pkgs/development/embedded/arduino/arduino-cli/default.nix deleted file mode 100644 index 8c5ec833c46f3..0000000000000 --- a/pkgs/development/embedded/arduino/arduino-cli/default.nix +++ /dev/null @@ -1,99 +0,0 @@ -{ lib, stdenv, buildGoModule, fetchFromGitHub, buildFHSEnv, installShellFiles, go-task }: - -let - - pkg = buildGoModule rec { - pname = "arduino-cli"; - version = "1.0.1"; - - src = fetchFromGitHub { - owner = "arduino"; - repo = pname; - rev = "v${version}"; - hash = "sha256-3VXc0Ksv6swmKEClNF5RRjX68RFLg2IRdBwcVgI5Syo="; - }; - - nativeBuildInputs = [ - installShellFiles - ]; - - nativeCheckInputs = [ - go-task - ]; - - subPackages = [ "." ]; - - vendorHash = "sha256-lB/PfUZFL5+YBcAhrMMV2ckAHPhtW2SL3/zM3L4XGVc="; - - postPatch = let - skipTests = [ - # tries to "go install" - "TestDummyMonitor" - # try to Get "https://downloads.arduino.cc/libraries/library_index.tar.bz2" - "TestDownloadAndChecksums" - "TestParseArgs" - "TestParseReferenceCores" - "TestPlatformSearch" - "TestPlatformSearchSorting" - ]; - in '' - substituteInPlace Taskfile.yml \ - --replace-fail "go test" "go test -p $NIX_BUILD_CORES -skip '(${lib.concatStringsSep "|" skipTests})'" - ''; - - doCheck = stdenv.isLinux; - - checkPhase = '' - runHook preCheck - task go:test - runHook postCheck - ''; - - 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'" ]; - - postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' - export HOME="$(mktemp -d)" - installShellCompletion --cmd arduino-cli \ - --bash <($out/bin/arduino-cli completion bash) \ - --zsh <($out/bin/arduino-cli completion zsh) \ - --fish <($out/bin/arduino-cli completion fish) - unset HOME - ''; - - meta = with lib; { - inherit (src.meta) homepage; - description = "Arduino from the command line"; - mainProgram = "arduino-cli"; - changelog = "https://github.com/arduino/arduino-cli/releases/tag/${version}"; - license = licenses.gpl3Only; - maintainers = with maintainers; [ ryantm ]; - }; - - }; - -in -if stdenv.isLinux then -# buildFHSEnv 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 - buildFHSEnv - { - inherit (pkg) name meta; - - runScript = "${pkg.outPath}/bin/arduino-cli"; - - extraInstallCommands = '' - mv $out/bin/$name $out/bin/arduino-cli - '' + lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' - cp -r ${pkg.outPath}/share $out/share - ''; - passthru.pureGoPkg = pkg; - - targetPkgs = pkgs: with pkgs; [ - zlib - ]; - } -else - pkg diff --git a/pkgs/development/embedded/edl/default.nix b/pkgs/development/embedded/edl/default.nix index 2e1f09ffd2089..23fbc7310ce01 100644 --- a/pkgs/development/embedded/edl/default.nix +++ b/pkgs/development/embedded/edl/default.nix @@ -1,25 +1,17 @@ { lib, stdenv, fetchFromGitHub, python3Packages }: -python3Packages.buildPythonPackage rec { +python3Packages.buildPythonPackage { pname = "edl"; version = "unstable-2022-09-07"; - src = fetchFromGitHub rec { + src = fetchFromGitHub { owner = "bkerler"; repo = "edl"; rev = "f6b94da5faa003b48d24a5f4a8f0b8495626fd5b"; fetchSubmodules = true; hash = "sha256-bxnRy+inWNArE2gUA/qDPy7NKvqBm43sbxdIaTc9N28="; }; - # edl has a spurious dependency on "usb" which has nothing to do with the - # project and was probably added by accident trying to add pyusb - postPatch = '' - sed -i '/'usb'/d' setup.py - ''; - # No tests set up - doCheck = false; - # EDL loaders are ELFs but shouldn't be touched, rest is Python anyways - dontStrip = true; + propagatedBuildInputs = with python3Packages; [ pyusb pyserial @@ -28,11 +20,26 @@ python3Packages.buildPythonPackage rec { pycryptodome lxml colorama - # usb capstone keystone-engine ]; + # No tests set up + doCheck = false; + # EDL loaders are ELFs but shouldn't be touched, rest is Python anyways + dontStrip = true; + + # edl has a spurious dependency on "usb" which has nothing to do with the + # project and was probably added by accident trying to add pyusb + postPatch = '' + sed -i '/'usb'/d' setup.py + ''; + + postInstall = '' + mkdir -p $out/etc/udev/rules.d + cp $src/Drivers/51-edl.rules $out/etc/udev/rules.d/51-edl.rules + ''; + meta = with lib; { homepage = "https://github.com/bkerler/edl"; description = "Qualcomm EDL tool (Sahara / Firehose / Diag)"; diff --git a/pkgs/development/embedded/elf2uf2-rs/default.nix b/pkgs/development/embedded/elf2uf2-rs/default.nix index e02b54a8d12cb..b3091df1e3f65 100644 --- a/pkgs/development/embedded/elf2uf2-rs/default.nix +++ b/pkgs/development/embedded/elf2uf2-rs/default.nix @@ -6,7 +6,7 @@ rustPlatform.buildRustPackage rec { src = fetchCrate { inherit pname version; - sha256 = "sha256-cmiCOykORue0Cg2uUUWa/nXviX1ddbGNC5gRKe+1kYs="; + hash = "sha256-cmiCOykORue0Cg2uUUWa/nXviX1ddbGNC5gRKe+1kYs="; }; nativeBuildInputs = [ diff --git a/pkgs/development/embedded/fpga/apio/default.nix b/pkgs/development/embedded/fpga/apio/default.nix index 47ff562958ecf..ef153b96ca49b 100644 --- a/pkgs/development/embedded/fpga/apio/default.nix +++ b/pkgs/development/embedded/fpga/apio/default.nix @@ -16,26 +16,27 @@ buildPythonApplication rec { pname = "apio"; - version = "0.8.1"; - format = "pyproject"; + version = "0.9.5"; + + pyproject = true; src = fetchFromGitHub { owner = "FPGAwars"; repo = "apio"; rev = "v${version}"; - sha256 = "sha256-04qAGTzusMT3GsaRxDoXNJK1Mslzxu+ugQclBJx8xzE="; + hash = "sha256-VU4tOszGkw20DWW2SerFsnjFiSkrSwqBcwosGnHJfU8="; }; postPatch = '' substituteInPlace pyproject.toml \ - --replace 'scons==4.2.0' 'scons' \ - --replace '==' '>=' + --replace-fail 'scons==4.2.0' 'scons' \ + --replace-fail '==' '>=' - substituteInPlace apio/managers/scons.py --replace \ + substituteInPlace apio/managers/scons.py --replace-fail \ 'return "tinyprog --libusb --program"' \ 'return "${tinyprog}/bin/tinyprog --libusb --program"' - substituteInPlace apio/util.py --replace \ - '_command = join(get_bin_dir(), "tinyprog")' \ + substituteInPlace apio/util.py --replace-fail \ + '_command = apio_bin_dir / "tinyprog"' \ '_command = "${tinyprog}/bin/tinyprog"' # semantic-version seems to not support version numbers like the one of tinyprog in Nixpkgs (1.0.24.dev114+gxxxxxxx). @@ -43,7 +44,7 @@ buildPythonApplication rec { # This leads to an error like "Error: Invalid version string: '1.0.24.dev114+g97f6353'" # when executing "apio upload" for a TinyFPGA. # Replace the dot with a dash to work around this problem. - substituteInPlace apio/managers/scons.py --replace \ + substituteInPlace apio/managers/scons.py --replace-fail \ 'version = semantic_version.Version(pkg_version)' \ 'version = semantic_version.Version(pkg_version.replace(".dev", "-dev"))' ''; @@ -69,8 +70,15 @@ buildPythonApplication rec { pytestCheckHook ]; + disabledTestPaths = [ + # This test fails and is also not executed in upstream's CI + "test2" + ]; + pytestFlagsArray = [ "--offline" ]; + strictDeps = true; + meta = with lib; { description = "Open source ecosystem for open FPGA boards"; mainProgram = "apio"; diff --git a/pkgs/development/embedded/fpga/openfpgaloader/default.nix b/pkgs/development/embedded/fpga/openfpgaloader/default.nix index 5309093f17800..2a84bfdc8c9ac 100644 --- a/pkgs/development/embedded/fpga/openfpgaloader/default.nix +++ b/pkgs/development/embedded/fpga/openfpgaloader/default.nix @@ -41,7 +41,7 @@ stdenv.mkDerivation (finalAttrs: { mainProgram = "openFPGALoader"; homepage = "https://github.com/trabucayre/openFPGALoader"; license = lib.licenses.agpl3Only; - maintainers = with lib.maintainers; [ ]; + maintainers = [ ]; platforms = lib.platforms.unix; }; }) diff --git a/pkgs/development/embedded/fpga/tinyprog/default.nix b/pkgs/development/embedded/fpga/tinyprog/default.nix index b5a9937ad2af4..0e962d2f2a2b7 100644 --- a/pkgs/development/embedded/fpga/tinyprog/default.nix +++ b/pkgs/development/embedded/fpga/tinyprog/default.nix @@ -34,7 +34,7 @@ with python3Packages; buildPythonApplication rec { homepage = "https://github.com/tinyfpga/TinyFPGA-Bootloader/tree/master/programmer"; description = "Programmer for FPGA boards using the TinyFPGA USB Bootloader"; mainProgram = "tinyprog"; - maintainers = with maintainers; [ ]; + maintainers = [ ]; license = licenses.asl20; }; } diff --git a/pkgs/development/embedded/openocd/default.nix b/pkgs/development/embedded/openocd/default.nix index 5efd11c65f98e..366d1ed832c21 100644 --- a/pkgs/development/embedded/openocd/default.nix +++ b/pkgs/development/embedded/openocd/default.nix @@ -3,6 +3,7 @@ , fetchurl , pkg-config , hidapi +, tcl , jimtcl , libjaylink , libusb1 @@ -12,8 +13,12 @@ # Allow selection the hardware targets (SBCs, JTAG Programmers, JTAG Adapters) , extraHardwareSupport ? [] -}: +}: let + isWindows = stdenv.hostPlatform.isWindows; + notWindows = !isWindows; + +in stdenv.mkDerivation rec { pname = "openocd"; version = "0.12.0"; @@ -22,23 +27,24 @@ stdenv.mkDerivation rec { sha256 = "sha256-ryVHiL6Yhh8r2RA/5uYKd07Jaow3R0Tu+Rl/YEMHWvo="; }; - nativeBuildInputs = [ pkg-config ]; + nativeBuildInputs = [ pkg-config tcl ]; - buildInputs = [ hidapi jimtcl libftdi1 libjaylink libusb1 ] + buildInputs = [ libusb1 ] + ++ lib.optionals notWindows [ hidapi jimtcl libftdi1 libjaylink ] ++ # tracking issue for v2 api changes https://sourceforge.net/p/openocd/tickets/306/ lib.optional stdenv.isLinux libgpiod_1; configureFlags = [ "--disable-werror" - "--disable-internal-jimtcl" - "--disable-internal-libjaylink" "--enable-jtag_vpi" - "--enable-buspirate" "--enable-remote-bitbang" - (lib.enableFeature enableFtdi "ftdi") + (lib.enableFeature notWindows "buspirate") + (lib.enableFeature (notWindows && enableFtdi) "ftdi") (lib.enableFeature stdenv.isLinux "linuxgpiod") (lib.enableFeature stdenv.isLinux "sysfsgpio") + (lib.enableFeature isWindows "internal-jimtcl") + (lib.enableFeature isWindows "internal-libjaylink") ] ++ map (hardware: "--enable-${hardware}") extraHardwareSupport ; @@ -75,6 +81,6 @@ stdenv.mkDerivation rec { homepage = "https://openocd.sourceforge.net/"; license = licenses.gpl2Plus; maintainers = with maintainers; [ bjornfor prusnak ]; - platforms = platforms.unix; + platforms = platforms.unix ++ platforms.windows; }; } diff --git a/pkgs/development/embedded/rshell/default.nix b/pkgs/development/embedded/rshell/default.nix index b42651aa1404c..926832ec6ea5c 100644 --- a/pkgs/development/embedded/rshell/default.nix +++ b/pkgs/development/embedded/rshell/default.nix @@ -7,11 +7,11 @@ buildPythonApplication rec { pname = "rshell"; - version = "0.0.32"; + version = "0.0.33"; src = fetchPypi { inherit pname version; - sha256 = "sha256-frIwZ21JzVgxRS+KouBjDShHCP1lCoUwwySy2oFGcJ8="; + hash = "sha256-yD4F4xZpHaID5aXZ5tbCZB24a/+FtyobmAOV5GOJMMU="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/embedded/svdtools/default.nix b/pkgs/development/embedded/svdtools/default.nix index ba65d94a292de..1c5aae230f7d4 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.14"; + version = "0.3.17"; src = fetchCrate { inherit version pname; - hash = "sha256-sTogOCpcfJHy+e3T4pEvclCddCUX+RHCQ238oz5bAEo="; + hash = "sha256-mXxxsAN/KgQOAgVq6jNVtrb11g3WUbU6e+T1Tgmgciw="; }; - cargoHash = "sha256-lRSt46yxFWSlhU6Pns3PCLJ4c6Fvi4EbOIqVx9IoPCc="; + cargoHash = "sha256-2qA9xMJFj+28/ZCnz4KKm7T3EiG6NUY01JQvYmmuIOc="; meta = with lib; { description = "Tools to handle vendor-supplied, often buggy SVD files"; diff --git a/pkgs/development/embedded/teensy-cmake-macros/hook.nix b/pkgs/development/embedded/teensy-cmake-macros/hook.nix index b0abdbdc681ee..55f9aec729f57 100644 --- a/pkgs/development/embedded/teensy-cmake-macros/hook.nix +++ b/pkgs/development/embedded/teensy-cmake-macros/hook.nix @@ -1,5 +1,4 @@ -{ lib -, makeSetupHook +{ makeSetupHook , teensy-cmake-macros }: |