Unverified Commit 98a7c46e authored by dish's avatar dish Committed by GitHub
Browse files

arduino-cli: 1.2.2 -> 1.3.1, use writableTmpDirAsHomeHook (#432845)

parents a23a8bdd 692a7980
Loading
Loading
Loading
Loading
+8 −6
Original line number Diff line number Diff line
@@ -5,6 +5,7 @@
  fetchFromGitHub,
  buildFHSEnv,
  installShellFiles,
  writableTmpDirAsHomeHook,
  go-task,
}:

@@ -12,22 +13,25 @@ let

  pkg = buildGoModule rec {
    pname = "arduino-cli";
    version = "1.2.2";
    version = "1.3.1";

    src = fetchFromGitHub {
      owner = "arduino";
      repo = "arduino-cli";
      tag = "v${version}";
      hash = "sha256-zP0N9QfyaKCFP413S2rlrWwqVdfhdcxAgcxsAO/mfpE=";
      hash = "sha256-vUa/Mgztyu5jKVIIhp+Cg79n+ulN94mlfVpxecRb6PA=";
    };

    nativeBuildInputs = [ installShellFiles ];
    nativeBuildInputs = [
      installShellFiles
      writableTmpDirAsHomeHook
    ];

    nativeCheckInputs = [ go-task ];

    subPackages = [ "." ];

    vendorHash = "sha256-BOB9K5N4ELLWdSHCNdFYCypbEyoZz2dOz9wouwP7AHw=";
    vendorHash = "sha256-msv+ZG6uabTtPDVcRksRd8UTSpoztMKw3YGxvhJr26w=";

    postPatch =
      let
@@ -64,12 +68,10 @@ let
    ++ lib.optionals stdenv.hostPlatform.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 = {