@@ -0,0 +1,31 @@
1+{ stdenv, fetchurl, pkgconfig, attr, acl, zlib, libuuid, e2fsprogs, lzo
2+, asciidoc, xmlto, docbook_xml_dtd_45, docbook_xsl, libxslt
3+}:
4+
5+let version = "4.4.1"; in
6+
7+stdenv.mkDerivation rec {
8+ name = "btrfs-progs-${version}";
9+
10+ src = fetchurl {
11+ url = "mirror://kernel/linux/kernel/people/kdave/btrfs-progs/btrfs-progs-v${version}.tar.xz";
12+ sha256 = "1z5882zx9jx02vyg067siws0irsl8pg37myx17hr4imn9ypf6r4r";
13+ };
14+
15+ buildInputs = [
16+ pkgconfig attr acl zlib libuuid e2fsprogs lzo
17+ asciidoc xmlto docbook_xml_dtd_45 docbook_xsl libxslt
18+ ];
19+
20+ # gcc bug with -O1 on ARM with gcc 4.8
21+ # This should be fine on all platforms so apply universally
22+ patchPhase = "sed -i s/-O1/-O2/ configure";
23+
24+ meta = with stdenv.lib; {
25+ description = "Utilities for the btrfs filesystem";
26+ homepage = https://btrfs.wiki.kernel.org/;
27+ license = licenses.gpl2;
28+ maintainers = with maintainers; [ nckx raskin wkennington ];
29+ platforms = platforms.linux;
30+ };
31+}