diff options
author | Doron Behar <doron.behar@gmail.com> | 2023-05-03 06:31:14 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-03 06:31:14 -0700 |
commit | 68054e5c51421ae721e28caa329b64001fc66d92 (patch) | |
tree | a702f1dbc08580807b90f96d69001b9061026023 | |
parent | 73037ab8f1f414d269485c912b2f15811eae93e6 (diff) | |
parent | 51507a3f280d274d4461ff7b0c4bfa0c9eff390b (diff) |
Merge pull request #227880 from SFrijters/arduino-cli-0.32.2
arduino-cli: 0.31.0 -> 0.32.2, enable (most) unittests
-rw-r--r-- | pkgs/development/embedded/arduino/arduino-cli/default.nix | 36 |
1 files changed, 31 insertions, 5 deletions
diff --git a/pkgs/development/embedded/arduino/arduino-cli/default.nix b/pkgs/development/embedded/arduino/arduino-cli/default.nix index 68e4b7413a303..ed29011b5dde3 100644 --- a/pkgs/development/embedded/arduino/arduino-cli/default.nix +++ b/pkgs/development/embedded/arduino/arduino-cli/default.nix @@ -1,27 +1,53 @@ -{ lib, stdenv, buildGoModule, fetchFromGitHub, buildFHSEnv, installShellFiles }: +{ lib, stdenv, buildGoModule, fetchFromGitHub, buildFHSEnv, installShellFiles, go-task }: let pkg = buildGoModule rec { pname = "arduino-cli"; - version = "0.31.0"; + version = "0.32.2"; src = fetchFromGitHub { owner = "arduino"; repo = pname; rev = version; - hash = "sha256-y51/5Gu6nTaL+XLP7hLk/gaksIdRahecl5q5jYBWATE="; + hash = "sha256-Em8L2ZYS1rgW46/MP5hs/EBWGcb5GP3EDEzWi072F/I="; }; nativeBuildInputs = [ installShellFiles ]; + nativeCheckInputs = [ + go-task + ]; + subPackages = [ "." ]; - vendorSha256 = "sha256-JuuGJuSax2tfuQHH/Hqk1JpQE2OboYJKJjzPjIZ1UD8="; + vendorSha256 = "sha256-+5Cj6wdX25fK+Y9czTwRRqCdY+0iarvii9nD3QMDh+c="; + + 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 "go test" "go test -p $NIX_BUILD_CORES -skip '(${lib.concatStringsSep "|" skipTests})'" + ''; + + doCheck = stdenv.isLinux; - doCheck = false; + 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" |