1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-15 06:52:43 +01:00
nix/lib/default.nix
Eelco Dolstra af54a60204 * 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.
2004-07-06 16:33:46 +00:00

36 lines
806 B
Nix

rec {
inherit (import /home/eelco/nixpkgs/pkgs/system/i686-linux.nix) stdenv;
compileC = {main, localIncludes ? []}: stdenv.mkDerivation {
name = "compile-c";
builder = ./compile-c.sh;
localIncludes =
if localIncludes == "auto" then
import (findIncludes {main = toString main; hack = curTime;})
else
localIncludes;
inherit main;
};
/*
runCommand = {command}: {
name = "run-command";
builder = ./run-command.sh;
inherit command;
};
*/
findIncludes = {main, hack}: stdenv.mkDerivation {
name = "find-includes";
builder = ./find-includes.sh;
inherit main hack;
};
link = {objects, programName ? "program"}: stdenv.mkDerivation {
name = "link";
builder = ./link.sh;
inherit objects programName;
};
}