tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
bam: reimplement using mkDerivation
Joachim Fasting
10 years ago
6ccf87de
ad4167e8
+19
-46
1 changed file
expand all
collapse all
unified
split
pkgs
development
tools
build-managers
bam
default.nix
+19
-46
pkgs/development/tools/build-managers/bam/default.nix
···
1
-
x@{builderDefsPackage
2
-
, lua5, python
3
-
, ...}:
4
-
builderDefsPackage
5
-
(a :
6
-
let
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
-
};
19
-
in
20
-
rec {
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
···
1
+
{ stdenv, fetchurl, lua5, python }:
2
+
3
+
stdenv.mkDerivation rec {
4
+
name = "bam-${version}";
5
+
version = "0.4.0";
0
0
0
6
7
+
src = fetchurl {
8
+
url = "http://github.com/downloads/matricks/bam/${name}.tar.bz2";
9
+
sha256 = "0z90wvyd4nfl7mybdrv9dsd4caaikc6fxw801b72gqi1m9q0c0sn";
0
0
0
0
0
0
0
0
0
0
0
10
};
11
12
+
buildInputs = [ lua5 python ];
0
13
14
+
buildPhase = ''${stdenv.shell} make_unix.sh'';
0
0
0
0
0
15
16
+
checkPhase = ''${python.interpreter} scripts/test.py'';
0
0
17
18
+
installPhase = ''
19
mkdir -p "$out/share/bam"
20
cp -r docs examples tests "$out/share/bam"
21
mkdir -p "$out/bin"
22
cp bam "$out/bin"
23
+
'';
24
25
+
meta = with stdenv.lib; {
26
description = "Yet another build manager";
27
+
maintainers = with maintainers;
28
[
29
raskin
30
];
31
+
platforms = platforms.linux;
32
+
license = licenses.free;
33
+
downloadPage = "http://matricks.github.com/bam/";
0
0
0
0
0
34
};
35
+
}