lol
1x@{builderDefsPackage
2 , lua5, python
3 , ...}:
4builderDefsPackage
5(a :
6let
7 helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++
8 [];
9
10 buildInputs = map (n: builtins.getAttr n x)
11 (builtins.attrNames (builtins.removeAttrs x helperArgNames));
12 sourceInfo = rec {
13 baseName="bam";
14 version="0.4.0";
15 name="${baseName}-${version}";
16 url="http://github.com/downloads/matricks/bam/${name}.tar.bz2";
17 hash="0z90wvyd4nfl7mybdrv9dsd4caaikc6fxw801b72gqi1m9q0c0sn";
18 };
19in
20rec {
21 src = a.fetchurl {
22 url = sourceInfo.url;
23 sha256 = sourceInfo.hash;
24 };
25
26 inherit (sourceInfo) name version;
27 inherit buildInputs;
28
29 /* doConfigure should be removed if not needed */
30 phaseNames = ["check" "doDeploy"];
31
32 build = a.fullDepEntry ''
33 sh make_unix.sh
34 '' ["minInit" "doUnpack" "addInputs"];
35
36 check = a.fullDepEntry ''
37 python scripts/test.py
38 '' ["build" "addInputs"];
39
40 doDeploy = a.fullDepEntry ''
41 mkdir -p "$out/share/bam"
42 cp -r docs examples tests "$out/share/bam"
43 mkdir -p "$out/bin"
44 cp bam "$out/bin"
45 '' ["minInit" "defEnsureDir" "build"];
46
47 meta = {
48 description = "Yet another build manager";
49 maintainers = with a.lib.maintainers;
50 [
51 raskin
52 ];
53 platforms = with a.lib.platforms;
54 linux;
55 license = a.lib.licenses.free;
56 };
57 passthru = {
58 updateInfo = {
59 downloadPage = "http://matricks.github.com/bam/";
60 };
61 };
62}) x