@@ -1,9 +1,10 @@
11{ stdenv, fetchurl, pkgconfig, attr, acl, zlib, libuuid, e2fsprogs, lzo
2−, asciidoc, xmlto, docbook_xml_dtd_45, docbook_xsl, libxslt }:
2+, asciidoc, xmlto, docbook_xml_dtd_45, docbook_xsl, libxslt
3+}:
34
45let version = "4.1.1"; in
56
6−stdenv.mkDerivation (rec {
7+stdenv.mkDerivation rec {
78 name = "btrfs-progs-${version}";
89
910 src = fetchurl {
@@ -16,10 +17,9 @@ stdenv.mkDerivation (rec {
1617 asciidoc xmlto docbook_xml_dtd_45 docbook_xsl libxslt
1718 ];
1819
19− # for btrfs to get the rpath to libgcc_s, needed for pthread_cancel to work
20− NIX_CFLAGS_LINK = "-lgcc_s";
21−
22− makeFlags = "prefix=$(out)";
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";
2323
2424 meta = with stdenv.lib; {
2525 description = "Utilities for the btrfs filesystem";
@@ -28,7 +28,4 @@ stdenv.mkDerivation (rec {
2828 maintainers = with maintainers; [ raskin wkennington ];
2929 platforms = platforms.linux;
3030 };
31−} // (if stdenv.isArm then {
32− # gcc bug with -O1 on ARM
33− patchPhase = "sed -i s/-O1/-O2/ configure";
34−} else {}))
31+}