[Nix-dev] Python & installation

Marc Weber marco-oweber at gmx.de
Fri Apr 22 17:59:53 CEST 2016


The question I have is which is the recommended way to install "scrapy
along with dependencies", the following fixes it by making
propagatedUserEnvPkgs equal to propagatedBuildInputs.. is there another
way?

  diff --git a/pkgs/development/python-modules/generic/default.nix b/pkgs/development/python-modules/generic/default.nix
  index 1fdbd4f..458d187 100644
  --- a/pkgs/development/python-modules/generic/default.nix
  +++ b/pkgs/development/python-modules/generic/default.nix
  @@ -70,6 +70,8 @@ python.stdenv.mkDerivation (builtins.removeAttrs attrs ["disabled" "doCheck"] //
     # propagate python/setuptools to active setup-hook in nix-shell
     propagatedBuildInputs = propagatedBuildInputs ++ [ python setuptools ];
   
  +  propagatedUserEnvPkgs = propagatedBuildInputs ++ [ python setuptools ];
  +
     pythonPath = pythonPath;
   
     configurePhase = attrs.configurePhase or ''

Then installing scrapy and setting PYTHONPATH or PYTHONUSERBASE seems to
enough.

Full patch adding the missing packages:
http://mawercer.de/tmp/scrapy-diff.patch

Is there an automated maintained way to do such python packaging work I
missed? Sorry for asking such stupid question - I didn't look at python
for a long time.

Marc Weber


More information about the nix-dev mailing list