These are failed experiments to setup a development environment for Python in NixOS.
The working solution can be found: https://github.com/monadplus/python-template-nix
These are failed experiments to setup a development environment for Python in NixOS.
The working solution can be found: https://github.com/monadplus/python-template-nix
with import <nixpkgs> {}; # Please, fix always the package | |
(let | |
python = let | |
packageOverrides = self: super: { | |
pandas = super.pandas.overridePythonAttrs(old: rec { | |
doCheck = false; | |
}); | |
}; | |
in pkgs.python37.override {inherit packageOverrides; self = python;}; | |
in python.withPackages(ps: [ ps.pandas ])).env |
let unstableTarball = fetchTarball https://github.com/NixOS/nixpkgs-channels/archive/nixos-unstable.tar.gz; | |
pkgs = import unstableTarball {}; | |
pythonPackages = pkgs.python35Packages; | |
in | |
pkgs.mkShell rec { | |
name = "impurePythonEnv"; | |
venvDir = "./.venv"; | |
buildInputs = [ | |
pythonPackages.python | |
pythonPackages.venvShellHook | |
#pythonPackages.numpy | |
#pythonPackages.requests | |
pkgs.openssl | |
pkgs.git | |
pkgs.gcc | |
]; | |
postShellHook = '' | |
pip install -r requirements.txt | |
''; | |
} |