From bd003832d2925618a9d7a9c8ff29ff4ce74e0cd8 Mon Sep 17 00:00:00 2001 From: Ingolf Wagner Date: Thu, 30 Aug 2018 17:52:42 +0200 Subject: fixed writePython{2,3}{,Bin} moved deps (and additional rarely used parameters in an attribute set) now you have to do instead of: ``` writePython2Bin "foo.py" [] '' ... '' ``` this: ``` writePython2Bin "foo.py" {} '' ... '' ``` --- pkgs/default.nix | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/pkgs/default.nix b/pkgs/default.nix index c01f88c..87fec50 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -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 != []) "--ignore ${lib.concatMapStringsSep "," lib.escapeShellArg flakeIgnore}"; in pkgs.makeScriptWriter { interpreter = "${py}/bin/python"; check = pkgs.writeDash "python2check.sh" '' - exec ${pkgs.python2Packages.flake8}/bin/flake8 --show-source "$1" + exec ${pkgs.python2Packages.flake8}/bin/flake8 --show-source ${ignoreAttribute} "$1" ''; } name; writePython2Bin = name: pkgs.writePython2 "/bin/${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 != []) "--ignore ${lib.concatMapStringsSep "," lib.escapeShellArg flakeIgnore}"; in pkgs.makeScriptWriter { interpreter = "${py}/bin/python"; check = pkgs.writeDash "python3check.sh" '' - exec ${pkgs.python3Packages.flake8}/bin/flake8 --show-source "$1" + exec ${pkgs.python3Packages.flake8}/bin/flake8 --show-source ${ignoreAttribute} "$1" ''; } name; -- cgit v1.2.3