Closed adnelson closed 9 years ago
I don't know how to fix your specific problem, but I believe that if you omit the src
attribute, you'll get what you want (i.e., a shell environment suitable for working with the package). Add more stuff to the environment via buildInputs
. Also, supplying a version
is redundant in this case. That's how I use nix-shell
, anyway.
Why is specifying a version redundant?
It's redundant in the sense that it's not required for getting a working shell environment. I don't know what buildPythonPackage
does with version
, but it's normally just used as a suffix for name
.
@adnelson we already have uwsgi package which apparently doesn't use typical setup.py
installations: https://github.com/NixOS/nixpkgs/blob/master/pkgs/servers/uwsgi/default.nix
I'm writing a nix expression for the
uwsgi
package. I've rungit clone https://github.com/unbit/uwsgi
, and added the followingdefault.nix
to theuwsgi
directory:Interestingly, I can run
nix-env -i -f .
and everything will install correctly. However, I wanted to run the tests of the package; to do this I wanted to runnix-shell --pure
, then run the test suite. However, when I runnix-shell --pure
, it fails:Looking into this myself, it looks like the folder is read-only, which is why the binary cannot be created:
What can I do to get around this? Also, and I know this has come up before, but why is the
setup.py
foruwsgi
being run in the first place? My understanding ofnix-shell
was that it builds all of the packages dependencies and sets up environment variables -- but does not build the actual package itself.