Added develop_headless.nix file with necessary libs and python's deps to run piker's backend daemons.
parent
ab1463d942
commit
50381b7f5e
|
@ -0,0 +1,38 @@
|
|||
with (import <nixpkgs> {});
|
||||
with python311Packages;
|
||||
let
|
||||
glibStorePath = lib.getLib glib;
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
name = "piker-poetry-shell-with-qt6";
|
||||
buildInputs = [
|
||||
# System libraries
|
||||
libgcc.lib
|
||||
glib
|
||||
|
||||
# Python requirements.
|
||||
python311Full
|
||||
poetry-core
|
||||
];
|
||||
src = null;
|
||||
shellHook = ''
|
||||
set -e
|
||||
|
||||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${libgcc.lib}/lib:${glibStorePath}/lib
|
||||
|
||||
# Maybe create venv & install deps
|
||||
poetry install
|
||||
|
||||
# Use pyqt6 from System, patch activate script
|
||||
ACTIVATE_SCRIPT_PATH="$(poetry env info --path)/bin/activate"
|
||||
|
||||
if grep -q "$PATCH" "$ACTIVATE_SCRIPT_PATH"; then
|
||||
echo "venv is already patched."
|
||||
else
|
||||
echo "patching $ACTIVATE_SCRIPT_PATH"
|
||||
echo "$PATCH" >> "$ACTIVATE_SCRIPT_PATH"
|
||||
fi
|
||||
|
||||
poetry shell
|
||||
'';
|
||||
}
|
|
@ -0,0 +1,38 @@
|
|||
with (import <nixpkgs> {});
|
||||
with python311Packages;
|
||||
let
|
||||
glibStorePath = lib.getLib glib;
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
name = "piker-poetry-shell-with-qt6";
|
||||
buildInputs = [
|
||||
# System libraries
|
||||
libgcc.lib
|
||||
glib
|
||||
|
||||
# Python requirements.
|
||||
python311Full
|
||||
poetry-core
|
||||
];
|
||||
src = null;
|
||||
shellHook = ''
|
||||
set -e
|
||||
|
||||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${libgcc.lib}/lib:${glibStorePath}/lib
|
||||
|
||||
# Maybe create venv & install deps
|
||||
poetry install
|
||||
|
||||
# Use pyqt6 from System, patch activate script
|
||||
ACTIVATE_SCRIPT_PATH="$(poetry env info --path)/bin/activate"
|
||||
|
||||
if grep -q "$PATCH" "$ACTIVATE_SCRIPT_PATH"; then
|
||||
echo "venv is already patched."
|
||||
else
|
||||
echo "patching $ACTIVATE_SCRIPT_PATH"
|
||||
echo "$PATCH" >> "$ACTIVATE_SCRIPT_PATH"
|
||||
fi
|
||||
|
||||
poetry shell
|
||||
'';
|
||||
}
|
Loading…
Reference in New Issue