diff --git a/README.rst b/README.rst index 9b973d26..e0612e28 100644 --- a/README.rst +++ b/README.rst @@ -71,6 +71,19 @@ for a development install:: source ./env/bin/activate pip install -r requirements.txt -e . +install for nixos +***************** +for users of `NixOS` we offer a development shell envoirment that can be +loaded with:: + + nix-shell develop.nix + +this will setup the required python environment to run piker, make sure to +run:: + + pip install -r requirements.txt -e . + +once after loading the shell install for tinas ***************** diff --git a/develop.nix b/develop.nix new file mode 100644 index 00000000..30ae2f08 --- /dev/null +++ b/develop.nix @@ -0,0 +1,32 @@ +with (import {}); +with python310Packages; +stdenv.mkDerivation { + name = "pip-env"; + buildInputs = [ + # System requirements. + readline + + # Python requirements (enough to get a virtualenv going). + python310Full + virtualenv + setuptools + pyqt5 + pip + ]; + src = null; + shellHook = '' + # Allow the use of wheels. + SOURCE_DATE_EPOCH=$(date +%s) + + # Augment the dynamic linker path + export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${R}/lib/R/lib:${readline}/lib + + export QT_QPA_PLATFORM_PLUGIN_PATH="${qt5.qtbase.bin}/lib/qt-${qt5.qtbase.version}/plugins"; + + if [ ! -d "venv" ]; then + virtualenv venv + fi + + source venv/bin/activate + ''; +}