@ -299,28 +299,30 @@ pkgs: oldpkgs: {
$ { pkgs . cabal2nix } /bin/cabal2nix $ { path } > $ out
'' ) ;
writePython2 = name : deps :
writePython2 = name : { deps ? [ ] , flakeIgnore ? [ ] } :
let
py = pkgs . python2 . withPackages ( ps : attrVals deps ps ) ;
py = pkgs . python2 . withPackages ( ps : deps ) ;
ignoreAttribute = lib . optionalString ( ignore != [ ] ) " - - i g n o r e ${ lib . concatMapStringsSep " , " lib . escapeShellArg flakeIgnore } " ;
in
pkgs . makeScriptWriter {
interpreter = " ${ py } / b i n / p y t h o n " ;
check = pkgs . writeDash " p y t h o n 2 c h e c k . s h " ''
exec $ { pkgs . python2Packages . flake8 } /bin/flake8 - - show-source "$ 1 "
exec $ { pkgs . python2Packages . flake8 } /bin/flake8 - - show-source $ { ignoreAttribute } "$ 1 "
'' ;
} name ;
writePython2Bin = name :
pkgs . writePython2 " / b i n / ${ name } " ;
writePython3 = name : deps :
writePython3 = name : { deps ? [ ] , flakeIgnore ? [ ] } :
let
py = pkgs . python3 . withPackages ( ps : attrVals deps ps ) ;
py = pkgs . python3 . withPackages ( ps : deps ) ;
ignoreAttribute = lib . optionalString ( ignore != [ ] ) " - - i g n o r e ${ lib . concatMapStringsSep " , " lib . escapeShellArg flakeIgnore } " ;
in
pkgs . makeScriptWriter {
interpreter = " ${ py } / b i n / p y t h o n " ;
check = pkgs . writeDash " p y t h o n 3 c h e c k . s h " ''
exec $ { pkgs . python3Packages . flake8 } /bin/flake8 - - show-source "$ 1 "
exec $ { pkgs . python3Packages . flake8 } /bin/flake8 - - show-source $ { ignoreAttribute } "$ 1 "
'' ;
} name ;