From 3ea6554ab058be49627707a63abc769dbdea3459 Mon Sep 17 00:00:00 2001 From: Guillermo Rodriguez Date: Sat, 4 Feb 2023 14:04:06 -0300 Subject: [PATCH 1/4] Add nix development shell file --- develop.nix | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 develop.nix diff --git a/develop.nix b/develop.nix new file mode 100644 index 00000000..c9b2aa5f --- /dev/null +++ b/develop.nix @@ -0,0 +1,26 @@ +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"; + ''; +} From 5017c541dbb89b96ff9cf0694ccf9b189424fd6a Mon Sep 17 00:00:00 2001 From: Guillermo Rodriguez Date: Sat, 11 Feb 2023 15:36:50 -0300 Subject: [PATCH 2/4] Auto initialize and activate virtualenv --- develop.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/develop.nix b/develop.nix index c9b2aa5f..30ae2f08 100644 --- a/develop.nix +++ b/develop.nix @@ -22,5 +22,11 @@ stdenv.mkDerivation { 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 ''; } From 096e87cd3b6d7f3a1c4a26ade8f6d784f7bf6a8e Mon Sep 17 00:00:00 2001 From: Guillermo Rodriguez Date: Sat, 11 Feb 2023 15:45:29 -0300 Subject: [PATCH 3/4] Add info about nix to README.rst --- README.rst | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/README.rst b/README.rst index 9b973d26..606feaf4 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 envoirment to run piker, make sure to +run:: + + pip install -r requirements.txt -e . + +once after loading the shell install for tinas ***************** From 69707786fcef45d88eb11f043a56ee14bb5e422f Mon Sep 17 00:00:00 2001 From: Guillermo Rodriguez Date: Sat, 11 Feb 2023 16:17:01 -0300 Subject: [PATCH 4/4] Fix environment spelling --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 606feaf4..e0612e28 100644 --- a/README.rst +++ b/README.rst @@ -78,7 +78,7 @@ loaded with:: nix-shell develop.nix -this will setup the required python envoirment to run piker, make sure to +this will setup the required python environment to run piker, make sure to run:: pip install -r requirements.txt -e .