diff --git a/default.nix b/default.nix --- a/default.nix +++ b/default.nix @@ -142,7 +142,7 @@ let mkdir -p $out/bin # expose python - ln -s ${self.python}/bin/python $out/bin/ + ln -s ${pkgs.pythonWithSetuptools}/bin/python $out/bin/ # required binaries from dependencies ln -s ${self.gunicorn}/bin/gunicorn $out/bin/ diff --git a/pkgs/nix-common/pip2nix.nix b/pkgs/nix-common/pip2nix.nix --- a/pkgs/nix-common/pip2nix.nix +++ b/pkgs/nix-common/pip2nix.nix @@ -14,4 +14,12 @@ rec { pythonPackages; }; + pip-tools = pythonPackages.pip-tools; + + setuptools = pythonPackages.setuptools; + + wheel = pythonPackages.wheel; + + pip = pythonPackages.pip; + } diff --git a/pkgs/overlays.nix b/pkgs/overlays.nix --- a/pkgs/overlays.nix +++ b/pkgs/overlays.nix @@ -1,5 +1,9 @@ self: super: { + pythonWithSetuptools = self.python.withPackages(ps: with ps; [ + setuptools + ]); + # change GIT version # latest supported are in: https://github.com/NixOS/nixpkgs/tree/master/pkgs/applications/version-management/git-and-tools/git git = super.lib.overrideDerivation super.git (oldAttrs: { @@ -68,5 +72,4 @@ self: super: { }); - } diff --git a/pkgs/shell-generate.nix b/pkgs/shell-generate.nix --- a/pkgs/shell-generate.nix +++ b/pkgs/shell-generate.nix @@ -26,7 +26,9 @@ pkgs.stdenv.mkDerivation { buildInputs = [ # Allows to generate python packages pip2nix.pip2nix - pythonPackages.pip-tools + pip2nix.pip + pip2nix.pip-tools + # compile using ffi pkgs.libffi @@ -49,11 +51,10 @@ pkgs.stdenv.mkDerivation { export TMPDIR=/tmp export LOCALE_ARCHIVE="${pkgs.glibcLocales}/lib/locale/locale-archive" export LC_ALL="en_US.UTF-8" + export PYCURL_SSL_LIBRARY=openssl # Custom prompt to distinguish from other dev envs. export PS1="\n\[\033[1;32m\][pip2nix-generate-shell]$\[\033[0m\] " - export PYCURL_SSL_LIBRARY=openssl - ''; }