summary refs log tree commit diff
path: root/pkgs/build-support/builder-defs/template-auto-callable.nix
blob: 4801e4253028c4f2d6bb881442b5da743878af79 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
x@{builderDefsPackage
  (abort "Specify dependencies")
  , ...}:
builderDefsPackage
(a :  
let 
  s = import ./src-for-default.nix;
  helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++ 
    [(abort "Specify helper argument names")];
  buildInputs = map (n: builtins.getAttr n x)
    (builtins.attrNames (builtins.removeAttrs x helperArgNames));
in
rec {
  src = a.fetchUrlFromSrcInfo s;

  inherit (s) name;
  inherit buildInputs;

  /* doConfigure should be removed if not needed */
  phaseNames = ["doConfigure" "doMakeInstall"];
      
  meta = {
    description = "${abort ''Specify description''}";
    maintainers = with a.lib.maintainers;
    [
      (abort "Specify maintainers")
    ];
    platforms = with a.lib.platforms;
      (abort "Specify platforms");
  };
}) x