depot/third_party/nixpkgs/pkgs/tools/filesystems/xfsprogs/default.nix
Default email ffc78d3539 Project import generated by Copybara.
GitOrigin-RevId: d9dba88d08a9cdf483c3d45f0d7220cf97a4ce64
2021-01-05 19:05:55 +02:00

55 lines
1.5 KiB
Nix

{ stdenv, buildPackages, fetchpatch, fetchurl, autoconf, automake, gettext, libtool, pkgconfig
, icu, libuuid, readline, inih
}:
stdenv.mkDerivation rec {
pname = "xfsprogs";
version = "5.10.0";
src = fetchurl {
url = "mirror://kernel/linux/utils/fs/xfs/xfsprogs/${pname}-${version}.tar.xz";
sha256 = "1schqzjx836jd54l10pqds7hyli2m77df3snk95xbr23dpj1fh70";
};
outputs = [ "bin" "dev" "out" "doc" ];
depsBuildBuild = [ buildPackages.stdenv.cc ];
nativeBuildInputs = [
autoconf automake libtool gettext pkgconfig
libuuid # codegen tool uses libuuid
];
buildInputs = [ readline icu inih ];
propagatedBuildInputs = [ libuuid ]; # Dev headers include <uuid/uuid.h>
enableParallelBuilding = true;
# @sbindir@ is replaced with /run/current-system/sw/bin to fix dependency cycles
preConfigure = ''
for file in scrub/{xfs_scrub_all.cron.in,xfs_scrub@.service.in,xfs_scrub_all.service.in}; do
substituteInPlace "$file" \
--replace '@sbindir@' '/run/current-system/sw/bin'
done
make configure
patchShebangs ./install-sh
'';
configureFlags = [
"--disable-lib64"
"--with-systemd-unit-dir=${placeholder "out"}/lib/systemd/system"
];
installFlags = [ "install-dev" ];
# FIXME: forbidden rpath
postInstall = ''
find . -type d -name .libs | xargs rm -rf
'';
meta = with stdenv.lib; {
homepage = "https://xfs.org/";
description = "SGI XFS utilities";
license = licenses.lgpl21;
platforms = platforms.linux;
maintainers = with maintainers; [ dezgeg ajs124 ];
};
}