Merge pull request #336368 from Sigmanificient/makePythonWriter-doCheck

makePythonWriter: add doCheck toggle
This commit is contained in:
lassulus
2024-08-21 20:55:15 +02:00
committed by GitHub
+3 -1
View File
@@ -717,6 +717,7 @@ rec {
{
libraries ? [ ],
flakeIgnore ? [ ],
doCheck ? true,
...
}@args:
let
@@ -728,6 +729,7 @@ rec {
(builtins.removeAttrs args [
"libraries"
"flakeIgnore"
"doCheck"
])
// {
interpreter =
@@ -735,7 +737,7 @@ rec {
if libraries == [ ] then python.interpreter else (python.withPackages (ps: libraries)).interpreter
else
python.interpreter;
check = optionalString python.isPy3k (
check = optionalString (python.isPy3k && doCheck) (
writeDash "pythoncheck.sh" ''
exec ${buildPythonPackages.flake8}/bin/flake8 --show-source ${ignoreAttribute} "$1"
''