Coccinelle: Make sure Python modules are looked up in the right place.

svn path=/nixpkgs/trunk/; revision=33763
This commit is contained in:
Ludovic Courtès 2012-04-12 15:30:02 +00:00
parent 205dbbd991
commit eb7575138a

View File

@ -1,4 +1,4 @@
{ fetchurl, stdenv, python, ncurses, ocamlPackages }:
{ fetchurl, stdenv, python, ncurses, ocamlPackages, makeWrapper }:
let
@ -16,11 +16,21 @@ in stdenv.mkDerivation {
buildInputs = with ocamlPackages; [
ocaml findlib menhir
ocaml_pcre ocaml_sexplib pycaml
python ncurses
python ncurses makeWrapper
];
configureFlagsArray = [ "--enable-release" ];
postInstall =
# On non-NixOS systems, Coccinelle would end up looking up Python modules
# in the wrong directory.
'' for p in "$out/bin/"*
do
wrapProgram "$p" \
--prefix "PYTHONPATH" ":" "${python}/lib/python${python.majorVersion}"
done
'';
meta = {
description = "Coccinelle, a program to apply C code semantic patches";