5 src = fetchFromGitHub {
8 rev = "780e33a07fd821e09ab5b05223ddb4ca15ac663f";
9 sha256 = "1f83cr9qgk95g3571ps644rvgfzv2i4i7532q8pg405s4q5ada3h";
10 fetchSubmodules = true;
13 (callPackage src {}) // { inherit src; };
15 nodeEnv = import ./lib/node-env.nix;
19 json = lib.importJSON path;
22 name = "${json.meta.name}-${version}";
23 src = fetchFromGitHub json.github;
28 json = lib.importJSON path;
31 name = "${json.meta.name}-${version}";
32 src = fetchgit json.git;
35 fetchedGitPrivate = path:
37 json = lib.importJSON path;
40 name = "${json.meta.name}-${version}";
41 src = fetchgitPrivate json.git;
44 wrap = { paths ? [], vars ? {}, file ? null, script ? null, name ? "wrap" }:
45 assert file != null || script != null ||
46 abort "wrap needs 'file' or 'script' argument";
48 set = n: v: "--set ${pkgs.lib.escapeShellArg n} " +
49 "${pkgs.lib.escapeShellArg v}";
50 args = (map (p: "--prefix PATH : ${p}/bin") paths) ++
51 (builtins.attrValues (pkgs.lib.mapAttrs set vars));
55 f = if file == null then writeScript name script else file;
56 buildInputs = [ makeWrapper ];
59 makeWrapper "$f" "$out" ${toString args}
62 # This adds header colors to the builds, but it rebuilds the whole
63 # world from scratch, so only use it to debug!
64 # add it as postHook in derivations
73 printf "\033[1;34m%s:\033[0m" "$1"