I'm trying to use pypi2nix-generated expression to create Kallithea
service.

     systemd.services.kalithea = {
      after = [ "network.target" ];
      wantedBy = [ "multi-user.target" ];
      script =
      let ppath =
        concatMapStringsSep ":" (x:
"${x}/${python.interpreter.python.sitePackages}") (let self =
python.packages; in [
          # package
          self."Kallithea"
          # deps
          self."Babel"
          self."Beaker"
          self."FormEncode"
          self."Mako"
          self."Markdown"
          self."Pygments"
          self."Pylons"
          self."Routes"
          self."SQLAlchemy"
          self."URLObject"
          self."WebHelpers"
          self."WebOb"
          self."WebTest"
          self."Whoosh"
          self."celery"
          self."docutils"
          self."dulwich"
          self."mercurial"
          self."mock"
          self."py-bcrypt"
          self."python-dateutil"
          self."waitress"
          # second level deps
          self."MarkupSafe"
          self."funcsigs"
          self."pbr"
          self."six"
          # TODO: add all the others
        ]);
      in ''
        export PYTHONPATH=${ppath}
        ${pythonPackages.pasteScript}/bin/paster serve
${kallithea1}/etc/development.ini;
      '';
    };

So I need to feed PYTHONPATH into service, but I don't know a nice way to
recursively aggregate all the propagatedBuildInputs from Kallithea into
full PYTHONPATH
(and service wants all of them, as far as I understand)

So, is there a way to do this? I'm pretty new to Python infrastructure and
perhaps miss some obvious thing.

PS. Pinging my previous ask about PERL5LIB, which is an example of exact
this problem, but with Perl.

https://www.mail-archive.com/nix-dev@lists.science.uu.nl/msg22577.html

The solution I found breaks on Travis (I guess, it is of kind "import from
derivation", so it won't work generally)
_______________________________________________
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev

Reply via email to