bam: reimplement using mkDerivation
This commit is contained in:
parent
ad4167e87e
commit
6ccf87defe
@ -1,62 +1,35 @@
|
|||||||
x@{builderDefsPackage
|
{ stdenv, fetchurl, lua5, python }:
|
||||||
, lua5, python
|
|
||||||
, ...}:
|
|
||||||
builderDefsPackage
|
|
||||||
(a :
|
|
||||||
let
|
|
||||||
helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++
|
|
||||||
[];
|
|
||||||
|
|
||||||
buildInputs = map (n: builtins.getAttr n x)
|
stdenv.mkDerivation rec {
|
||||||
(builtins.attrNames (builtins.removeAttrs x helperArgNames));
|
name = "bam-${version}";
|
||||||
sourceInfo = rec {
|
version = "0.4.0";
|
||||||
baseName="bam";
|
|
||||||
version="0.4.0";
|
src = fetchurl {
|
||||||
name="${baseName}-${version}";
|
url = "http://github.com/downloads/matricks/bam/${name}.tar.bz2";
|
||||||
url="http://github.com/downloads/matricks/bam/${name}.tar.bz2";
|
sha256 = "0z90wvyd4nfl7mybdrv9dsd4caaikc6fxw801b72gqi1m9q0c0sn";
|
||||||
hash="0z90wvyd4nfl7mybdrv9dsd4caaikc6fxw801b72gqi1m9q0c0sn";
|
|
||||||
};
|
|
||||||
in
|
|
||||||
rec {
|
|
||||||
src = a.fetchurl {
|
|
||||||
url = sourceInfo.url;
|
|
||||||
sha256 = sourceInfo.hash;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
inherit (sourceInfo) name version;
|
buildInputs = [ lua5 python ];
|
||||||
inherit buildInputs;
|
|
||||||
|
|
||||||
/* doConfigure should be removed if not needed */
|
buildPhase = ''${stdenv.shell} make_unix.sh'';
|
||||||
phaseNames = ["check" "doDeploy"];
|
|
||||||
|
|
||||||
build = a.fullDepEntry ''
|
checkPhase = ''${python.interpreter} scripts/test.py'';
|
||||||
sh make_unix.sh
|
|
||||||
'' ["minInit" "doUnpack" "addInputs"];
|
|
||||||
|
|
||||||
check = a.fullDepEntry ''
|
installPhase = ''
|
||||||
python scripts/test.py
|
|
||||||
'' ["build" "addInputs"];
|
|
||||||
|
|
||||||
doDeploy = a.fullDepEntry ''
|
|
||||||
mkdir -p "$out/share/bam"
|
mkdir -p "$out/share/bam"
|
||||||
cp -r docs examples tests "$out/share/bam"
|
cp -r docs examples tests "$out/share/bam"
|
||||||
mkdir -p "$out/bin"
|
mkdir -p "$out/bin"
|
||||||
cp bam "$out/bin"
|
cp bam "$out/bin"
|
||||||
'' ["minInit" "defEnsureDir" "build"];
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = with stdenv.lib; {
|
||||||
description = "Yet another build manager";
|
description = "Yet another build manager";
|
||||||
maintainers = with a.lib.maintainers;
|
maintainers = with maintainers;
|
||||||
[
|
[
|
||||||
raskin
|
raskin
|
||||||
];
|
];
|
||||||
platforms = with a.lib.platforms;
|
platforms = platforms.linux;
|
||||||
linux;
|
license = licenses.free;
|
||||||
license = a.lib.licenses.free;
|
downloadPage = "http://matricks.github.com/bam/";
|
||||||
};
|
};
|
||||||
passthru = {
|
}
|
||||||
updateInfo = {
|
|
||||||
downloadPage = "http://matricks.github.com/bam/";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}) x
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user