Merge pull request #180446 from aaronjheng/mysql-shell-wrap

mysql-shell: fix missing pyyaml dependency
This commit is contained in:
Guillaume Girol 2022-07-15 16:01:43 +00:00 committed by GitHub
commit a75694d857
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -31,14 +31,12 @@
, CoreServices
, developer_cmds
, DarwinTools
, makeWrapper
}:
let
pythonDeps = [ python3.pkgs.certifi python3.pkgs.paramiko ];
site = ''
import sys; sys.path.extend([${lib.concatStringsSep ", " (map (x: ''"${x}/${python3.sitePackages}"'') pythonDeps)}])
'';
pythonDeps = with python3.pkgs; [ certifi paramiko pyyaml ];
pythonPath = lib.makeSearchPath python3.sitePackages pythonDeps;
in
stdenv.mkDerivation rec{
pname = "mysql-shell";
@ -62,12 +60,9 @@ stdenv.mkDerivation rec{
substituteInPlace ../mysql-${version}/cmake/os/Darwin.cmake --replace /usr/bin/libtool libtool
substituteInPlace cmake/libutils.cmake --replace /usr/bin/libtool libtool
# For python dependencies
echo '${site}' >> python/packages/mysqlsh/__init__.py
'';
nativeBuildInputs = [ pkg-config cmake git bison ] ++ lib.optionals (!stdenv.isDarwin) [ rpcsvc-proto ];
nativeBuildInputs = [ pkg-config cmake git bison makeWrapper ] ++ lib.optionals (!stdenv.isDarwin) [ rpcsvc-proto ];
buildInputs = [
boost
@ -121,6 +116,10 @@ stdenv.mkDerivation rec{
CXXFLAGS = [ "-DV8_COMPRESS_POINTERS=1" "-DV8_31BIT_SMIS_ON_64BIT_ARCH=1" ];
postFixup = ''
wrapProgram $out/bin/mysqlsh --set PYTHONPATH "${pythonPath}"
'';
meta = with lib; {
homepage = "https://dev.mysql.com/doc/mysql-shell/${lib.versions.majorMinor version}/en/";
description = "A new command line scriptable shell for MySQL";