arduino-cli: 1.2.2 -> 1.3.1, use writableTmpDirAsHomeHook (#432845)
This commit is contained in:
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user