From b32aeefa59eee10825cc0fa0f055a7123dfc24bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Santisi?= Date: Wed, 18 Sep 2024 20:25:42 +0000 Subject: [PATCH] Initial commit --- README.md | 13 +++++++++++++ shell_python.nix | 18 ++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 README.md create mode 100644 shell_python.nix diff --git a/README.md b/README.md new file mode 100644 index 0000000..72c4f8e --- /dev/null +++ b/README.md @@ -0,0 +1,13 @@ +# Entorno Python3 en Nix + +Esta definición define un entorno de Python3 con pip, lo que permite generar environments locales e instalar paquetes de Python3. + +## Uso + +Ejecutar: + +``` +nix-shell shell_python.nix +``` + +para cargar el entorno local. diff --git a/shell_python.nix b/shell_python.nix new file mode 100644 index 0000000..9e23f25 --- /dev/null +++ b/shell_python.nix @@ -0,0 +1,18 @@ +# nix-shell -p [ (python3Full.withPackages(ps: with ps; [ pip ])) gfortran zlib] + +with import {}; + +stdenv.mkDerivation { + name = "python-env-petsc"; + + nativeBuildInputs = [ m4 removeReferencesTo ]; + buildInputs = [ (python3Full.withPackages(ps: with ps; [ pip ])) + gfortran + zlib + gcc + ]; + dontAddPrefix=true; + + env.LD_LIBRARY_PATH = zlib + "/lib:" + stdenv.cc.cc.lib + "/lib"; +} +