nixpkgs-suyu/pkgs/tools/filesystems/btrfs-progs/default.nix

42 lines
1.3 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchurl, pkg-config, attr, acl, zlib, libuuid, e2fsprogs, lzo
2019-05-07 00:52:54 +02:00
, asciidoc, xmlto, docbook_xml_dtd_45, docbook_xsl, libxslt, zstd, python3
}:
stdenv.mkDerivation rec {
pname = "btrfs-progs";
2021-02-07 03:39:37 +01:00
version = "5.10.1";
src = fetchurl {
2014-09-30 20:35:58 +02:00
url = "mirror://kernel/linux/kernel/people/kdave/btrfs-progs/btrfs-progs-v${version}.tar.xz";
2021-02-07 03:39:37 +01:00
sha256 = "sha256-E3nMcx/q5/RzrZ43yEW7+4czge9ns0Dxoi+8qaTaA0Q=";
};
2018-02-24 14:23:10 +01:00
nativeBuildInputs = [
pkg-config asciidoc xmlto docbook_xml_dtd_45 docbook_xsl libxslt
2019-05-07 00:52:54 +02:00
python3 python3.pkgs.setuptools
];
2019-05-07 00:52:54 +02:00
buildInputs = [ attr acl zlib libuuid e2fsprogs lzo zstd python3 ];
# for python cross-compiling
_PYTHON_HOST_PLATFORM = stdenv.hostPlatform.config;
2018-02-24 14:23:10 +01:00
# gcc bug with -O1 on ARM with gcc 4.8
# This should be fine on all platforms so apply universally
postPatch = "sed -i s/-O1/-O2/ configure";
postInstall = ''
install -v -m 444 -D btrfs-completion $out/share/bash-completion/completions/btrfs
'';
2021-01-15 10:19:50 +01:00
configureFlags = lib.optional stdenv.hostPlatform.isMusl "--disable-backtrace";
meta = with lib; {
description = "Utilities for the btrfs filesystem";
2020-04-09 12:57:13 +02:00
homepage = "https://btrfs.wiki.kernel.org/";
license = licenses.gpl2;
maintainers = with maintainers; [ raskin ];
platforms = platforms.linux;
};
}