micropython: init at 1.12
This commit is contained in:
parent
9ec439e009
commit
76bd004a4b
44
pkgs/development/interpreters/micropython/default.nix
Normal file
44
pkgs/development/interpreters/micropython/default.nix
Normal file
@ -0,0 +1,44 @@
|
||||
{ stdenv, lib, fetchFromGitHub, pkgconfig, libffi, python3, readline }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "micropython";
|
||||
version = "1.12";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "micropython";
|
||||
repo = "micropython";
|
||||
rev = "v${version}";
|
||||
sha256 = "1fsigdahnv5yn0mc7dr1y6h7g8ywg084pcgj6d64kb39w641n8j5";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkgconfig python3 ];
|
||||
|
||||
buildInputs = [ libffi readline ];
|
||||
|
||||
doCheck = true;
|
||||
|
||||
buildPhase = ''
|
||||
make -C mpy-cross
|
||||
make -C ports/unix
|
||||
'';
|
||||
|
||||
checkPhase = ''
|
||||
pushd tests
|
||||
MICROPY_MICROPYTHON=../ports/unix/micropython ${python3.interpreter} ./run-tests
|
||||
popd
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
install -Dm755 ports/unix/micropython $out/bin/micropython
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "A lean and efficient Python implementation for microcontrollers and constrained systems";
|
||||
homepage = "https://micropython.org";
|
||||
platforms = [ "x86_64-linux" ];
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ sgo ];
|
||||
};
|
||||
}
|
@ -13234,6 +13234,8 @@ in
|
||||
|
||||
micronucleus = callPackage ../development/tools/misc/micronucleus { };
|
||||
|
||||
micropython = callPackage ../development/interpreters/micropython { };
|
||||
|
||||
mimalloc = callPackage ../development/libraries/mimalloc { };
|
||||
|
||||
minizip = callPackage ../development/libraries/minizip { };
|
||||
|
Loading…
Reference in New Issue
Block a user