From 4a7c9e5af23ca8c0116c73ff89583f7be8e01dcf Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Fri, 4 Jan 2019 14:22:03 +0100 Subject: [PATCH] python36.pkgs.rsa: fix build --- pkgs/development/python-modules/rsa/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/development/python-modules/rsa/default.nix b/pkgs/development/python-modules/rsa/default.nix index c062aad4c4be..1b3d339b0785 100644 --- a/pkgs/development/python-modules/rsa/default.nix +++ b/pkgs/development/python-modules/rsa/default.nix @@ -4,6 +4,8 @@ , unittest2 , pyasn1 , mock +, isPy3k +, pythonOlder }: buildPythonPackage rec { @@ -18,6 +20,10 @@ buildPythonPackage rec { checkInputs = [ unittest2 mock ]; propagatedBuildInputs = [ pyasn1 ]; + preConfigure = stdenv.lib.optionalString (isPy3k && pythonOlder "3.7") '' + substituteInPlace setup.py --replace "open('README.md')" "open('README.md',encoding='utf-8')" + ''; + meta = with stdenv.lib; { homepage = https://stuvel.eu/rsa; license = licenses.asl20;