2011-10-06 15:15:09 +02:00
|
|
|
a :
|
|
|
|
let
|
2009-04-01 07:42:07 +02:00
|
|
|
fetchurl = a.fetchurl;
|
2011-12-13 05:30:49 +01:00
|
|
|
fetchgit = a.fetchgit;
|
2009-04-01 07:42:07 +02:00
|
|
|
|
2011-10-06 15:15:09 +02:00
|
|
|
version = a.lib.attrByPath ["version"] "0.19" a;
|
2009-04-01 07:42:07 +02:00
|
|
|
buildInputs = with a; [
|
2011-12-13 05:30:49 +01:00
|
|
|
zlib libuuid acl attr
|
2009-04-01 07:42:07 +02:00
|
|
|
];
|
|
|
|
in
|
2009-10-02 17:06:07 +02:00
|
|
|
|
2009-10-02 17:15:18 +02:00
|
|
|
assert a.libuuid != null;
|
2009-10-02 17:06:07 +02:00
|
|
|
|
2009-04-01 07:42:07 +02:00
|
|
|
rec {
|
2011-12-13 05:30:49 +01:00
|
|
|
srcDrv = fetchgit {
|
|
|
|
url="git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-progs.git" ;
|
|
|
|
rev="fdb6c0402337d9607c7a39155088eaf033742752" ;
|
|
|
|
sha256="de7f9e04401bd747a831c48d312106e188adb32f32b6d64078ae6d2aab45b1f8" ;
|
2009-04-01 07:42:07 +02:00
|
|
|
};
|
|
|
|
|
2011-12-13 05:30:49 +01:00
|
|
|
src = srcDrv + "/";
|
|
|
|
|
2009-04-01 07:42:07 +02:00
|
|
|
inherit buildInputs;
|
|
|
|
configureFlags = [];
|
2011-10-06 15:15:02 +02:00
|
|
|
makeFlags = ["prefix=$out CFLAGS=-Os"];
|
2009-04-01 07:42:07 +02:00
|
|
|
|
2011-12-13 05:30:49 +01:00
|
|
|
patches = [];
|
|
|
|
phaseNames = ["fixMakefile" "doEnsureBtrfsImage" "doMakeInstall"];
|
|
|
|
|
|
|
|
fixMakefile = a.fullDepEntry ''
|
|
|
|
sed -e 's@^progs = @progs=@g' -i Makefile
|
|
|
|
'' ["minInit" "doUnpack"];
|
2011-10-06 15:15:09 +02:00
|
|
|
|
2009-07-07 23:47:28 +02:00
|
|
|
doEnsureBtrfsImage = a.fullDepEntry (''
|
2011-10-06 15:15:09 +02:00
|
|
|
if ! grep 'progs = ' Makefile | grep btrfs-image; then
|
2009-07-07 23:47:28 +02:00
|
|
|
sed -e 's/progs = .*/& btrfs-image/' -i Makefile
|
|
|
|
fi
|
|
|
|
'') ["minInit" "doUnpack"];
|
|
|
|
|
2009-04-01 07:42:07 +02:00
|
|
|
name = "btrfs-progs-" + version;
|
|
|
|
meta = {
|
|
|
|
description = "BTRFS utilities";
|
2009-08-04 09:49:16 +02:00
|
|
|
maintainers = [a.lib.maintainers.raskin];
|
2009-04-01 07:42:07 +02:00
|
|
|
};
|
|
|
|
}
|