mirror of
https://github.com/CHN-beta/nixpkgs.git
synced 2026-01-13 11:30:35 +08:00
This commit was created by a combination of scripts and tools: - an ast-grep script to prefix things in meta with `lib.`, - a modified nixf-diagnose / nixf combination to remove unused `with lib;`, and - regular nixfmt. Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
40 lines
852 B
Nix
40 lines
852 B
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
python,
|
|
pillow,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "python-ev3dev2";
|
|
version = "2.1.0";
|
|
format = "setuptools";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "ev3dev";
|
|
repo = "ev3dev-lang-python";
|
|
rev = version;
|
|
sha256 = "XxsiQs3k5xKb+3RewARbvBbxaztdvdq3w5ZMgTq+kRc=";
|
|
fetchSubmodules = true;
|
|
};
|
|
|
|
postPatch = ''
|
|
echo "${version}" > RELEASE-VERSION
|
|
'';
|
|
|
|
propagatedBuildInputs = [ pillow ];
|
|
|
|
checkPhase = ''
|
|
chmod -R g+rw ./tests/fake-sys/devices/**/*
|
|
${python.interpreter} -W ignore::ResourceWarning tests/api_tests.py
|
|
'';
|
|
|
|
meta = {
|
|
description = "Python language bindings for ev3dev";
|
|
homepage = "https://github.com/ev3dev/ev3dev-lang-python";
|
|
license = with lib.licenses; [ mit ];
|
|
maintainers = with lib.maintainers; [ emilytrau ];
|
|
};
|
|
}
|