[Nix-dev] Python: Provide your own buildPhase and installPhase.
Nawal Husnoo
nawal at husnoo.com
Fri May 26 22:03:24 CEST 2017
Hi,
Could anyone point me to an example where I can see this in action please?
https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/interpreters/python/build-python-package.nix
# "other" : Provide your own buildPhase and installPhase.
Say I copy the build-python-package-flit.nix file as
build-python-package-panda3d.nix - how do I get my default.nix to use this?
My current attempt:
with import <nixpkgs> {};
# nix-shell
# python2.7 makepanda/makepanda.py --everything --wheel --no-egl --no-gles
--no-gles2 --no-opencv --use-x11 --use-python --use-gl --use-fftw
--use-gtk2 --python-incdir
/nix/store/3n3r10921c0mzfrq64hc4m2jzjk13qpr-python-2.7.13/include
--python-libdir
/nix/store/3n3r10921c0mzfrq64hc4m2jzjk13qpr-python-2.7.13/lib
# pip install --prefix /home/nawal/usr
panda3d-1.10.0-cp27-cp27mu-linux_x86_64.whl
# export PYTHONPATH=/home/nawal/usr/lib/python2.7/site-packages/:$PYTHONPATH
(let
panda3d = pkgs.pythonPackages.buildPythonPackage rec{
name = "panda3d-${version}";
version = "";
src = ./panda3d;
propagatedBuildInputs = [
xorg.libX11
xorg.xproto
pkgconfig
python
ffmpeg-full
assimp
freetype
harfbuzz
glfw
ode
openal
libtiff
openexr
vrpn
bullet
libvorbis
libjpeg
openjpeg
libpng
openssl
zlib
gtk2-x11
opusTools
x11
xorg.libX11
xorg.xproto
pythonPackages.pip
];
};
in python.buildEnv.override {
extraLibs = [
panda3d
pkgs.pythonPackages.gnureadline
];
ignoreCollisions = true;
}).env
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.science.uu.nl/pipermail/nix-dev/attachments/20170526/d862ff3e/attachment-0001.html>
More information about the nix-dev
mailing list