mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-18 07:46:09 +01:00
Merge pull request #180446 from aaronjheng/mysql-shell-wrap
mysql-shell: fix missing pyyaml dependency
This commit is contained in:
commit
a75694d857
1 changed files with 8 additions and 9 deletions
|
@ -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";
|
||||
|
|
Loading…
Reference in a new issue