From 8de2c9edb5e9e95cc919dd7a4a747cea42bedec2 Mon Sep 17 00:00:00 2001 From: David Leung Date: Sat, 25 May 2019 20:32:29 +0800 Subject: [PATCH 1/2] pythonPackage.serverlessrepo: fix pyyaml override --- .../python-modules/serverlessrepo/default.nix | 29 +++++++------------ 1 file changed, 11 insertions(+), 18 deletions(-) diff --git a/pkgs/development/python-modules/serverlessrepo/default.nix b/pkgs/development/python-modules/serverlessrepo/default.nix index 7c89d9d1f8d..c6795f17206 100644 --- a/pkgs/development/python-modules/serverlessrepo/default.nix +++ b/pkgs/development/python-modules/serverlessrepo/default.nix @@ -1,24 +1,13 @@ { lib -, python +, buildPythonPackage +, fetchPypi +, pytest +, boto3 +, six +, pyyaml +, mock }: -let - py = python.override { - packageOverrides = self: super: { - pyyaml = super.pyyaml.overridePythonAttrs (oldAttrs: rec { - version = "3.12"; - src = oldAttrs.src.override { - inherit version; - sha256 = "592766c6303207a20efc445587778322d7f73b161bd994f227adaa341ba212ab"; - }; - }); - }; - }; - -in - -with py.pkgs; - buildPythonPackage rec { pname = "serverlessrepo"; version = "0.1.8"; @@ -40,6 +29,10 @@ buildPythonPackage rec { pytest tests/unit ''; + postPatch = '' + substituteInPlace setup.py --replace "pyyaml~=3.12" "pyyaml~=5.1" + ''; + meta = with lib; { homepage = https://github.com/awslabs/aws-serverlessrepo-python; description = "Helpers for working with the AWS Serverless Application Repository"; From 93a90e1fbb7c23e35465568cdc0f9d015c4c77ec Mon Sep 17 00:00:00 2001 From: David Leung Date: Sat, 25 May 2019 20:43:54 +0800 Subject: [PATCH 2/2] aws-sam-cli: Fix pyyaml override --- pkgs/development/tools/aws-sam-cli/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/development/tools/aws-sam-cli/default.nix b/pkgs/development/tools/aws-sam-cli/default.nix index 70fb86559d9..c4095a6f9b3 100644 --- a/pkgs/development/tools/aws-sam-cli/default.nix +++ b/pkgs/development/tools/aws-sam-cli/default.nix @@ -59,6 +59,7 @@ buildPythonApplication rec { postPatch = '' substituteInPlace requirements/base.txt --replace "requests==2.20.1" "requests==2.21.0" substituteInPlace requirements/base.txt --replace "six~=1.11.0" "six~=1.12.0" + substituteInPlace requirements/base.txt --replace "PyYAML~=3.12" "PyYAML~=5.1" ''; meta = with lib; {