arduino-cli: init at 0.11.0
This commit is contained in:
parent
c9c957d476
commit
8315778d5d
44
pkgs/development/arduino/arduino-cli/default.nix
Normal file
44
pkgs/development/arduino/arduino-cli/default.nix
Normal file
|
@ -0,0 +1,44 @@
|
|||
{ stdenv, buildGoModule, fetchFromGitHub, buildFHSUserEnv }:
|
||||
|
||||
let
|
||||
|
||||
pkg = buildGoModule rec {
|
||||
pname = "arduino-cli";
|
||||
version = "0.11.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "arduino";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "0k9091ci7n7hl44nyzlxkmbwibgrrh9s6z7pgyj9v0mzxjmgz8h2";
|
||||
};
|
||||
|
||||
subPackages = [ "." ];
|
||||
|
||||
vendorSha256 = "1qybym95a38az8lk8bqc53ngn08hijckajv8v2giifc4q7sb17d2";
|
||||
|
||||
buildFlagsArray = [
|
||||
"-ldflags=-s -w -X github.com/arduino/arduino-cli/version.versionString=${version} -X github.com/arduino/arduino-cli/version.commit=unknown"
|
||||
] ++ stdenv.lib.optionals stdenv.isLinux [ "-extldflags '-static'" ];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
inherit (src.meta) homepage;
|
||||
description = "Arduino from the command line";
|
||||
license = licenses.gpl3Only;
|
||||
maintainers = with maintainers; [ ryantm ];
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
# buildFHSUserEnv 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
|
||||
in buildFHSUserEnv {
|
||||
inherit (pkg) name meta;
|
||||
|
||||
runScript = "${pkg.outPath}/bin/arduino-cli";
|
||||
|
||||
extraInstallCommands = ''
|
||||
mv $out/bin/$name $out/bin/arduino-cli
|
||||
'';
|
||||
}
|
|
@ -719,6 +719,8 @@ in
|
|||
|
||||
arduino = arduino-core.override { withGui = true; };
|
||||
|
||||
arduino-cli = callPackage ../development/arduino/arduino-cli { };
|
||||
|
||||
arduino-core = callPackage ../development/arduino/arduino-core { };
|
||||
|
||||
arduino-mk = callPackage ../development/arduino/arduino-mk {};
|
||||
|
|
Loading…
Reference in a new issue