Actually fix mysqlclient 1.4.6 on nixos-20.09

This commit is contained in:
Jeremy Penner 2021-01-30 20:25:04 -05:00
parent 4c2edb607f
commit 26fee1890c

View file

@ -2,15 +2,20 @@
let
python = let
packageOverrides = self: super: {
mysqlclient = super.mysqlclient.overridePythonAttrs(old: rec {
# on nixos-20.09, mysqlclient is marked disabled when using python 2.7
# disabled can't be overridden, so we recreate the package definition from scratch
# https://github.com/NixOS/nixpkgs/issues/48663
mysqlclient = super.buildPythonPackage rec {
pname = "mysqlclient";
version = "1.4.6";
disabled = false;
nativeBuildInputs = [pkgs.libmysqlclient];
buildInputs = [pkgs.libmysqlclient];
doCheck = false;
src = super.fetchPypi {
pname = old.pname;
inherit version;
inherit pname version;
sha256 = "f3fdaa9a38752a3b214a6fe79d7cae3653731a53e577821f9187e67cbecb2e16";
};
});
};
};
in pkgs.python2.override { inherit packageOverrides; self = python; };
pyenv = pypkgs: with pypkgs; [