9bb3fccb5b
continuation of #109595 pkgconfig was aliased in 2018, however, it remained in all-packages.nix due to its wide usage. This cleans up the remaining references to pkgs.pkgsconfig and moves the entry to aliases.nix. python3Packages.pkgconfig remained unchanged because it's the canonical name of the upstream package on pypi.
45 lines
1.0 KiB
Nix
45 lines
1.0 KiB
Nix
{ stdenv, lib, fetchFromGitHub, pkg-config, libffi, python3, readline }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "micropython";
|
|
version = "1.13";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "micropython";
|
|
repo = "micropython";
|
|
rev = "v${version}";
|
|
sha256 = "0m9g6isys4pnlnkdmrw7lxaxdrjn02j481wz5x5cdrmrbi4zi17z";
|
|
fetchSubmodules = true;
|
|
};
|
|
|
|
nativeBuildInputs = [ pkg-config 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 ];
|
|
};
|
|
}
|