Pin mysqlclient to 1.4.6 as 2.0 doesn't support Python 2

This commit is contained in:
Jeremy Penner 2020-10-08 14:51:00 -04:00
parent d2dcf6dbee
commit a5416f7321

View file

@ -1,9 +1,21 @@
{ pkgs ? import <nixpkgs> {}, shell ? false }:
let
python = let
packageOverrides = self: super: {
mysqlclient = super.mysqlclient.overridePythonAttrs(old: rec {
version = "1.4.6";
src = super.fetchPypi {
pname = old.pname;
inherit version;
sha256 = "f3fdaa9a38752a3b214a6fe79d7cae3653731a53e577821f9187e67cbecb2e16";
};
});
};
in pkgs.python2.override { inherit packageOverrides; self = python; };
pyenv = pypkgs: with pypkgs; [
greenlet twisted cython mysqlclient bcrypt
];
buildInputs = [ (pkgs.python2.withPackages pyenv) ];
buildInputs = [ (python.withPackages pyenv) ];
in
if shell then
pkgs.mkShell { inherit buildInputs; }