Add zephyr sdk package for putting everything together
This commit is contained in:
parent
2e3f4a4adf
commit
f728872208
|
@ -11,4 +11,10 @@ in rec {
|
||||||
inherit target sources;
|
inherit target sources;
|
||||||
inherit (assets) version hosts;
|
inherit (assets) version hosts;
|
||||||
}) assets.toolchains;
|
}) assets.toolchains;
|
||||||
|
|
||||||
|
sdk = callPackage ./sdk.nix {
|
||||||
|
inherit host-tools;
|
||||||
|
inherit (assets) version hosts;
|
||||||
|
source = assets.sdk;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
21
packages/zephyr/sdk.nix
Normal file
21
packages/zephyr/sdk.nix
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
{ lib, symlinkJoin, fetchurl, host-tools, source, version, hosts
|
||||||
|
, toolchains ? [ ] }:
|
||||||
|
let src = fetchurl source;
|
||||||
|
in symlinkJoin rec {
|
||||||
|
pname = "zephyr-sdk";
|
||||||
|
inherit version;
|
||||||
|
name = "${pname}-${version}";
|
||||||
|
|
||||||
|
paths = [ host-tools ] ++ toolchains;
|
||||||
|
postBuild = ''
|
||||||
|
tar -C "$out" -xf "${src}" --exclude setup.sh --exclude sdk_toolchains --strip-components=1
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
homepage = "https://www.zephyrproject.org/";
|
||||||
|
description = "Full Zephyr SDK with customized toolchains";
|
||||||
|
license = licenses.asl20;
|
||||||
|
platforms = hosts;
|
||||||
|
maintainers = with maintainers; [ artemist ];
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue