commit b32aeefa59eee10825cc0fa0f055a7123dfc24bd Author: Sebastián Santisi Date: Wed Sep 18 20:25:42 2024 +0000 Initial commit 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"; +} +