Created
October 3, 2020 13:04
-
-
Save yorickvP/a49044800881ebbc0616b6a77847d97d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ stdenvNoCC, fetchFromGitHub, telink-825x-sdk, tc32-gcc, python3 }: | |
stdenvNoCC.mkDerivation { | |
pname = "ATC_Thermometer"; | |
version = "20201003"; | |
src = "${fetchFromGitHub { | |
owner = "atc1441"; | |
repo = "ATC_MiThermometer"; | |
rev = "772348a2266ea22bd58795314be148a8154e6462"; | |
sha256 = "05ggw0c61fbhw751c5icpv31i0cjk2nx5nmnkixid07ajsmhb7fw"; | |
}}/ATC_Thermometer"; | |
enableParallelBuilding = true; | |
nativeBuildInputs = [ tc32-gcc python3 ]; | |
makeFlags = [ "TEL_PATH=${telink-825x-sdk}" ]; | |
installPhase = '' | |
runHook preInstall | |
mkdir $out | |
cp -r ATC_Thermometer.bin $_ | |
runHook postInstall | |
''; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
with import ./pkgs.nix; atc_thermometer |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import (builtins.fetchTarball channel:nixos-unstable) { | |
overlays = [ (self: super: { | |
tc32-gcc = super.callPackage ./tc32-gcc.nix {}; | |
telink-825x-sdk = super.callPackage ./telink-825x-sdk.nix {}; | |
atc_thermometer = super.callPackage ./atc_thermometer.nix {}; | |
}) ]; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ stdenv | |
, fetchurl, autoPatchelfHook | |
, zlib, ncurses5, expat, libusb, libusb-compat-0_1 | |
}: | |
stdenv.mkDerivation { | |
pname = "tc32-gcc"; | |
version = "2.0"; | |
src = fetchurl { | |
url = "http://shyboy.oss-cn-shenzhen.aliyuncs.com/readonly/tc32_gcc_v2.0.tar.bz2"; | |
sha256 = "0c5lj5wxwmjr1558cqnmskgr877ashndmkfsnjjdpcrx7sz59f1k"; | |
}; | |
buildInputs = [ | |
zlib ncurses5 expat | |
libusb libusb-compat-0_1 | |
]; | |
nativeBuildInputs = [ | |
autoPatchelfHook | |
]; | |
unpackPhase = '' | |
tar xf $src | |
''; | |
installPhase = '' | |
mkdir $out | |
cp -r tc32/bin $out/bin | |
cp -r tc32/lib $out/lib | |
cp -r tc32/share $out/share | |
# ... | |
cp -r tc32/include $out/include | |
cp -r tc32/tc32-elf $out/tc32-elf | |
''; | |
meta = { | |
description = "Toolchain for the Telink TC32 platform, as prebuilt gcc binaries"; | |
platforms = [ "x86_64-linux" ]; | |
}; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ stdenv, fetchFromGitHub }: | |
fetchFromGitHub { | |
owner = "Ai-Thinker-Open"; | |
repo = "Telink_825X_SDK"; | |
rev = "3c93f1518b2da895ea2fef50eff0791cbedd5d9d"; | |
sha256 = "1www3wjx7ixqkjyvsjp1rpdpxxnbs70172rb3grsxdksw32b34vj"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment