1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-22 02:09:36 +01:00

* Dirty interim hack to make header file dependency determination

reliable (if somewhat inefficient): make the current time an
  attribute of the derivation.  Thus, every call to `nix-build' will
  cause the find-includes derivation to be re-done (but not the actual
  compilations if that's not necessary!).  I added a `curTime' primop
  to do this.
This commit is contained in:
Eelco Dolstra 2004-07-06 16:33:46 +00:00
parent 7d386d5c29
commit af54a60204
4 changed files with 22 additions and 3 deletions

View file

@ -5,7 +5,12 @@ rec {
compileC = {main, localIncludes ? []}: stdenv.mkDerivation {
name = "compile-c";
builder = ./compile-c.sh;
inherit main localIncludes;
localIncludes =
if localIncludes == "auto" then
import (findIncludes {main = toString main; hack = curTime;})
else
localIncludes;
inherit main;
};
/*
@ -16,10 +21,10 @@ rec {
};
*/
findIncludes = {main}: stdenv.mkDerivation {
findIncludes = {main, hack}: stdenv.mkDerivation {
name = "find-includes";
builder = ./find-includes.sh;
inherit main;
inherit main hack;
};
link = {objects, programName ? "program"}: stdenv.mkDerivation {