Problem: nix-build and nix-shell treat differently source root directory
When using nix-build, shell is in $sourceRoot after unpackPhase, when using
nix-shell, it is left in current directory. How can I make nix script
behave same when nix-building it and nix-shelling?
Side problem: is there shortcut for `${pkgs.python}/bin/python`?
How to reproduce:
run `nix-build default.nix`
then run `nix-shell default.nix --command "rm -rf QSci*; unpackPhase;
configurePhase"`
notice, that second one failed preConfigure step
Input: 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";
#preConfigure = "cd $sourceRoot/Python"; #### <----- correct for
nix-shell, but wrong for nix-build
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;
};
}
_______________________________________________
nix-dev mailing list
[email protected]
http://lists.science.uu.nl/mailman/listinfo/nix-dev