Python: Difference between revisions
imported>Samuela No edit summary |
imported>Samuela |
||
| Line 54: | Line 54: | ||
<syntaxhighlight lang="nix"> | <syntaxhighlight lang="nix"> | ||
let pkgs = import <nixpkgs> {}; | let | ||
pkgs = import <nixpkgs> {}; | |||
nanomsg-py = ...build expression for this python library...; | |||
in pkgs.mkShell { | in pkgs.mkShell { | ||
buildInputs = [ | buildInputs = [ | ||
pkgs. | pkgs.python3 | ||
pkgs.python3.pkgs.requests | |||
nanomsg-py | nanomsg-py | ||
]; | ]; | ||
shellHook = '' | shellHook = '' | ||
export PIP_PREFIX=$(pwd)/_build/pip_packages | export PIP_PREFIX=$(pwd)/_build/pip_packages | ||
export PYTHONPATH="$PIP_PREFIX/${ | export PYTHONPATH="$PIP_PREFIX/${pkgs.python3.sitePackages}:$PYTHONPATH" | ||
export PATH="$PIP_PREFIX/bin:$PATH" | export PATH="$PIP_PREFIX/bin:$PATH" | ||
unset SOURCE_DATE_EPOCH | unset SOURCE_DATE_EPOCH | ||
| Line 73: | Line 75: | ||
Discussion and consequences of this approach are in PR https://github.com/NixOS/nixpkgs/pull/55265. | Discussion and consequences of this approach are in PR https://github.com/NixOS/nixpkgs/pull/55265. | ||
=== conda === | === conda === | ||