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