2021-01-10 23:54:33 -08:00
|
|
|
{ lib, stdenv, buildPackages, fetchpatch, fetchurl, autoconf, automake, gettext, libtool, pkgconfig
|
2020-12-25 13:06:59 -08:00
|
|
|
, icu, libuuid, readline, inih
|
2018-11-28 01:44:42 -08:00
|
|
|
}:
|
2017-07-20 01:54:25 -07:00
|
|
|
|
2009-12-08 08:58:22 -08:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 05:41:18 -07:00
|
|
|
pname = "xfsprogs";
|
2020-12-25 13:06:59 -08:00
|
|
|
version = "5.10.0";
|
2009-10-08 06:07:56 -07:00
|
|
|
|
2020-12-25 13:06:59 -08:00
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://kernel/linux/utils/fs/xfs/xfsprogs/${pname}-${version}.tar.xz";
|
|
|
|
sha256 = "1schqzjx836jd54l10pqds7hyli2m77df3snk95xbr23dpj1fh70";
|
2009-10-08 06:07:56 -07:00
|
|
|
};
|
|
|
|
|
2017-07-20 01:54:25 -07:00
|
|
|
outputs = [ "bin" "dev" "out" "doc" ];
|
2014-09-19 14:18:33 -07:00
|
|
|
|
2018-11-28 01:44:42 -08:00
|
|
|
depsBuildBuild = [ buildPackages.stdenv.cc ];
|
|
|
|
nativeBuildInputs = [
|
2018-12-02 09:32:03 -08:00
|
|
|
autoconf automake libtool gettext pkgconfig
|
2018-11-28 01:44:42 -08:00
|
|
|
libuuid # codegen tool uses libuuid
|
|
|
|
];
|
2020-12-25 13:06:59 -08:00
|
|
|
buildInputs = [ readline icu inih ];
|
2018-11-28 01:44:42 -08:00
|
|
|
propagatedBuildInputs = [ libuuid ]; # Dev headers include <uuid/uuid.h>
|
2017-07-20 01:54:25 -07:00
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
2012-06-10 07:41:22 -07:00
|
|
|
|
2020-12-25 13:06:59 -08:00
|
|
|
# @sbindir@ is replaced with /run/current-system/sw/bin to fix dependency cycles
|
2014-09-19 16:14:50 -07:00
|
|
|
preConfigure = ''
|
2020-12-25 13:06:59 -08:00
|
|
|
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
|
2017-07-20 01:54:25 -07:00
|
|
|
make configure
|
2020-12-25 13:06:59 -08:00
|
|
|
patchShebangs ./install-sh
|
2014-09-19 16:14:50 -07:00
|
|
|
'';
|
|
|
|
|
2014-09-19 14:18:33 -07:00
|
|
|
configureFlags = [
|
|
|
|
"--disable-lib64"
|
2020-12-25 13:06:59 -08:00
|
|
|
"--with-systemd-unit-dir=${placeholder "out"}/lib/systemd/system"
|
2014-09-19 14:18:33 -07:00
|
|
|
];
|
2009-10-08 06:07:56 -07:00
|
|
|
|
2014-09-19 14:18:33 -07:00
|
|
|
installFlags = [ "install-dev" ];
|
|
|
|
|
2017-07-20 01:54:25 -07:00
|
|
|
# FIXME: forbidden rpath
|
|
|
|
postInstall = ''
|
|
|
|
find . -type d -name .libs | xargs rm -rf
|
|
|
|
'';
|
2014-09-19 14:18:33 -07:00
|
|
|
|
2021-01-10 23:54:33 -08:00
|
|
|
meta = with lib; {
|
2020-10-02 00:58:50 -07:00
|
|
|
homepage = "https://xfs.org/";
|
2009-10-08 06:07:56 -07:00
|
|
|
description = "SGI XFS utilities";
|
2014-09-19 14:18:33 -07:00
|
|
|
license = licenses.lgpl21;
|
|
|
|
platforms = platforms.linux;
|
2020-12-25 13:06:59 -08:00
|
|
|
maintainers = with maintainers; [ dezgeg ajs124 ];
|
2009-10-08 06:07:56 -07:00
|
|
|
};
|
|
|
|
}
|