1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-19 12:11:28 +00:00
nixpkgs/pkgs/build-support/builder-defs/template-auto-callable.nix
Michael Raskin 5e32f98f5c Recursive sourceInfo is more convenient
svn path=/nixpkgs/trunk/; revision=23868
2010-09-20 07:48:17 +00:00

43 lines
953 B
Nix

x@{builderDefsPackage
(abort "Specify dependencies")
, ...}:
builderDefsPackage
(a :
let
helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++
[(abort "Specify helper argument names")];
buildInputs = map (n: builtins.getAttr n x)
(builtins.attrNames (builtins.removeAttrs x helperArgNames));
sourceInfo = rec {
};
in
rec {
src = a.fetchurl {
url = sourceInfo.url;
sha256 = sourceInfo.hash;
};
inherit (sourceInfo) name version;
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");
};
passthru = {
updateInfo = {
downloadPage = "${abort ''Specify download page''}";
};
};
}) x