[Nix-dev] Problem with builder #2 - $out variable is escaped in configureFlags

Daniel Hlynskyi abcz2.uprola at gmail.com
Thu May 14 07:39:12 CEST 2015


Problem: $out path is escaped in configureFlags and not expanded in
configure time
to /nix/store/i02i938nm28zjxx0hswxx4bc5pknqzaj-qscintilla-python
However, when I write custom configurePhase script via double-singleticks
and explicit EOL-escaping, it works. How can I achive this with
stock configureScript and configureFlags?

Input #1: default.nix

let
     pkgs = import <nixpkgs> {};
in rec {

  qscintilla-python = pkgs.stdenv.mkDerivation rec {
    name = "qscintilla-python";

    src = pkgs.qscintilla.src;
    buildInputs = [ pkgs.python ];
    propagatedBuildInputs = [ pkgs.pyqt4 pkgs.qscintilla pkgs.qt4 ];

    preConfigure = "cd Python";
    configureScript = "${pkgs.python}/bin/python configure.py";
    configureFlags = "
          --destdir $out/lib/${pkgs.python.libPrefix}/site-packages
          --no-sip-files
          --no-qsci-api
          --pyqt PyQt4
          --qsci-incdir ${pkgs.qscintilla}/include
          --qsci-libdir ${pkgs.qscintilla}/lib
    ";
    dontAddPrefix = true;

  };
}

Input #2: default.nix with custom configure step

let
     pkgs = import <nixpkgs> {};
in rec {

  qscintilla-python = pkgs.stdenv.mkDerivation rec {
    name = "qscintilla-python";

    src = pkgs.qscintilla.src;
    buildInputs = [ pkgs.python ];
    propagatedBuildInputs = [ pkgs.pyqt4 pkgs.qscintilla pkgs.qt4 ];

    configurePhase = ''
      cd Python
      ${pkgs.python}/bin/python ./configure.py \
          --destdir $out/lib/${pkgs.python.libPrefix}/site-packages \
          --no-sip-files \
          --no-qsci-api \
          --pyqt PyQt4 \
          --qsci-incdir ${pkgs.qscintilla}/include \
          --qsci-libdir ${pkgs.qscintilla}/lib
    '';

  };
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.science.uu.nl/pipermail/nix-dev/attachments/20150514/300cc65d/attachment.html 


More information about the nix-dev mailing list