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
|
|
|
|
2012-03-31 16:51:36 +02:00
|
|
|
version = a.lib.attrByPath ["version"] "0.19-20120328" a;
|
2009-04-01 07:42:07 +02:00
|
|
|
buildInputs = with a; [
|
2012-03-31 16:51:36 +02:00
|
|
|
zlib libuuid acl attr e2fsprogs
|
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" ;
|
2012-03-31 16:51:36 +02:00
|
|
|
rev="1957076ab4fefa47b6efed3da541bc974c83eed7";
|
|
|
|
sha256="566d863c5500652e999d0d6b823365fb06f2f8f9523e65e69eaa3e993e9b26e1";
|
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
|
2012-01-18 21:32:45 +01:00
|
|
|
sed -e 's/progs = \(.*\)\\/progs = \1btrfs-image \\/' -i Makefile
|
2009-07-07 23:47:28 +02:00
|
|
|
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
|
|
|
};
|
|
|
|
}
|