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