Nixos default.nix fix, again #15
128
default.nix
128
default.nix
|
@ -1,46 +1,133 @@
|
|||
with (import <nixpkgs> {});
|
||||
with python312Packages;
|
||||
let
|
||||
glibStorePath = lib.getLib glib;
|
||||
qtpyStorePath = lib.getLib qtpy;
|
||||
pyqt6StorePath = lib.getLib pyqt6;
|
||||
pyqt6SipStorePath = lib.getLib pyqt6-sip;
|
||||
zstdStorePath = lib.getLib zstd;
|
||||
dbusStorePath = lib.getLib dbus;
|
||||
libGLStorePath = lib.getLib libGL;
|
||||
freetypeStorePath = lib.getLib freetype;
|
||||
qt6baseStorePath = lib.getLib qt6.qtbase;
|
||||
rapidfuzzStorePath = lib.getLib rapidfuzz;
|
||||
qdarkstyleStorePath = lib.getLib qdarkstyle;
|
||||
fontconfigStorePath = lib.getLib fontconfig;
|
||||
libxkbcommonStorePath = lib.getLib libxkbcommon;
|
||||
xcbutilcursorStorePath = lib.getLib xcb-util-cursor;
|
||||
|
||||
qtpyStorePath = lib.getLib python312Packages.qtpy;
|
||||
pyqt6StorePath = lib.getLib python312Packages.pyqt6;
|
||||
pyqt6SipStorePath = lib.getLib python312Packages.pyqt6-sip;
|
||||
rapidfuzzStorePath = lib.getLib python312Packages.rapidfuzz;
|
||||
qdarkstyleStorePath = lib.getLib python312Packages.qdarkstyle;
|
||||
|
||||
xorgLibX11StorePath = lib.getLib xorg.libX11;
|
||||
xorgLibxcbStorePath = lib.getLib xorg.libxcb;
|
||||
xorgxcbutilwmStorePath = lib.getLib xorg.xcbutilwm;
|
||||
xorgxcbutilimageStorePath = lib.getLib xorg.xcbutilimage;
|
||||
xorgxcbutilerrorsStorePath = lib.getLib xorg.xcbutilerrors;
|
||||
xorgxcbutilkeysymsStorePath = lib.getLib xorg.xcbutilkeysyms;
|
||||
xorgxcbutilrenderutilStorePath = lib.getLib xorg.xcbutilrenderutil;
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
name = "piker-qt6-poetry-shell";
|
||||
buildInputs = [
|
||||
# System requirements.
|
||||
glib
|
||||
dbus
|
||||
zstd
|
||||
libGL
|
||||
freetype
|
||||
qt6.qtbase
|
||||
libgcc.lib
|
||||
fontconfig
|
||||
libxkbcommon
|
||||
|
||||
# Xorg requirements
|
||||
xcb-util-cursor
|
||||
xorg.libxcb
|
||||
xorg.libX11
|
||||
xorg.xcbutilwm
|
||||
xorg.xcbutilimage
|
||||
xorg.xcbutilerrors
|
||||
xorg.xcbutilkeysyms
|
||||
xorg.xcbutilrenderutil
|
||||
|
||||
# Python requirements.
|
||||
python312Full
|
||||
poetry-core
|
||||
qdarkstyle
|
||||
rapidfuzz
|
||||
pyqt6
|
||||
qtpy
|
||||
python312Packages.poetry-core
|
||||
python312Packages.qdarkstyle
|
||||
python312Packages.rapidfuzz
|
||||
python312Packages.pyqt6
|
||||
python312Packages.qtpy
|
||||
];
|
||||
src = null;
|
||||
shellHook = ''
|
||||
set -e
|
||||
|
||||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${libgcc.lib}/lib:${glibStorePath}/lib
|
||||
|
||||
# Set the Qt plugin path
|
||||
# export QT_DEBUG_PLUGINS=1
|
||||
|
||||
QTBASE_PATH="${qt6baseStorePath}"
|
||||
echo "qtbase path: $QTBASE_PATH"
|
||||
echo ""
|
||||
export QT_PLUGIN_PATH="$QTBASE_PATH/lib/qt-6/plugins"
|
||||
|
||||
QTBASE_PATH="${qt6baseStorePath}/lib"
|
||||
export QT_PLUGIN_PATH="$QTBASE_PATH/qt-6/plugins"
|
||||
export QT_QPA_PLATFORM_PLUGIN_PATH="$QT_PLUGIN_PATH/platforms"
|
||||
echo "qt plugin path: $QT_PLUGIN_PATH"
|
||||
|
||||
LIB_GCC_PATH="${libgcc.lib}/lib"
|
||||
GLIB_PATH="${glibStorePath}/lib"
|
||||
ZSTD_PATH="${zstdStorePath}/lib"
|
||||
DBUS_PATH="${dbusStorePath}/lib"
|
||||
LIBGL_PATH="${libGLStorePath}/lib"
|
||||
FREETYPE_PATH="${freetypeStorePath}/lib"
|
||||
FONTCONFIG_PATH="${fontconfigStorePath}/lib"
|
||||
LIB_XKB_COMMON_PATH="${libxkbcommonStorePath}/lib"
|
||||
|
||||
XCB_UTIL_CURSOR_PATH="${xcbutilcursorStorePath}/lib"
|
||||
XORG_LIB_X11_PATH="${xorgLibX11StorePath}/lib"
|
||||
XORG_LIB_XCB_PATH="${xorgLibxcbStorePath}/lib"
|
||||
XORG_XCB_UTIL_IMAGE_PATH="${xorgxcbutilimageStorePath}/lib"
|
||||
XORG_XCB_UTIL_WM_PATH="${xorgxcbutilwmStorePath}/lib"
|
||||
XORG_XCB_UTIL_RENDER_UTIL_PATH="${xorgxcbutilrenderutilStorePath}/lib"
|
||||
XORG_XCB_UTIL_KEYSYMS_PATH="${xorgxcbutilkeysymsStorePath}/lib"
|
||||
XORG_XCB_UTIL_ERRORS_PATH="${xorgxcbutilerrorsStorePath}/lib"
|
||||
|
||||
echo "glib path: $GLIB_PATH"
|
||||
echo "zstd path: $ZSTD_PATH"
|
||||
echo "dbus path: $DBUS_PATH"
|
||||
echo "libGL path: $LIBGL_PATH"
|
||||
echo "libgcc.lib path: $LIB_GCC_PATH"
|
||||
echo "freetype path: $FREETYPE_PATH"
|
||||
echo "fontconfig path: $FONTCONFIG_PATH"
|
||||
echo "libxkbcommon path: $LIB_XKB_COMMON_PATH"
|
||||
echo ""
|
||||
echo "xcb-util-cursor path: $XCB_UTIL_CURSOR_PATH"
|
||||
echo "xorg.libxcb path: $XORG_LIB_XCB_PATH"
|
||||
echo "xorg.libX11 path: $XORG_LIB_X11_PATH"
|
||||
echo "xorg.xcbutilimage path: $XORG_XCB_UTIL_IMAGE_PATH"
|
||||
echo "xorg.xcbutilwm path: $XORG_XCB_UTIL_WM_PATH"
|
||||
echo "xorg.xcbutilrenderutil path: $XORG_XCB_UTIL_RENDER_UTIL_PATH"
|
||||
echo "xorg.xcbutilkeysyms path: $XORG_XCB_UTIL_KEYSYMS_PATH"
|
||||
echo "xorg.xcbutilerrors path: $XORG_XCB_UTIL_ERRORS_PATH"
|
||||
echo ""
|
||||
echo "qtbase path: $QTBASE_PATH"
|
||||
echo "qt plugin path: $QT_PLUGIN_PATH"
|
||||
echo ""
|
||||
|
||||
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$LIB_GCC_PATH"
|
||||
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$DBUS_PATH"
|
||||
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$GLIB_PATH"
|
||||
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$ZSTD_PATH"
|
||||
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$LIBGL_PATH"
|
||||
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$FONTCONFIG_PATH"
|
||||
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$FREETYPE_PATH"
|
||||
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$LIB_XKB_COMMON_PATH"
|
||||
|
||||
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$XCB_UTIL_CURSOR_PATH"
|
||||
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$XORG_LIB_X11_PATH"
|
||||
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$XORG_LIB_XCB_PATH"
|
||||
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$XORG_XCB_UTIL_IMAGE_PATH"
|
||||
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$XORG_XCB_UTIL_WM_PATH"
|
||||
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$XORG_XCB_UTIL_RENDER_UTIL_PATH"
|
||||
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$XORG_XCB_UTIL_KEYSYMS_PATH"
|
||||
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$XORG_XCB_UTIL_ERRORS_PATH"
|
||||
|
||||
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$QTBASE_PATH"
|
||||
|
||||
export LD_LIBRARY_PATH
|
||||
|
||||
# Maybe create venv & install deps
|
||||
poetry install --with uis
|
||||
|
@ -77,6 +164,7 @@ stdenv.mkDerivation {
|
|||
sed -i "\$i$PATCH" $ACTIVATE_SCRIPT_PATH
|
||||
fi
|
||||
|
||||
poetry shell
|
||||
poetry run piker -b deribit chart btc-7feb25-100000-c.reversed_option.deribit
|
||||
|
||||
'';
|
||||
}
|
||||
|
|
|
@ -130,6 +130,7 @@ ledger = 'piker.accounting.cli:ledger'
|
|||
|
||||
|
||||
[project]
|
||||
name="piker"
|
||||
keywords=[
|
||||
"async",
|
||||
"trading",
|
||||
|
|
Loading…
Reference in New Issue