2023-05-24 07:50:37 +00:00
|
|
|
{ lib, stdenv, buildPackages, fetchurl, gettext, pkg-config
|
2022-03-23 19:42:00 +00:00
|
|
|
, icu, libuuid, readline, inih, liburcu
|
2023-01-14 20:56:30 +00:00
|
|
|
, nixosTests
|
2018-11-28 09:44:42 +00:00
|
|
|
}:
|
2017-07-20 08:54:25 +00:00
|
|
|
|
2009-12-08 16:58:22 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "xfsprogs";
|
2023-05-23 12:07:02 +00:00
|
|
|
version = "6.3.0";
|
2009-10-08 13:07:56 +00:00
|
|
|
|
2020-12-25 21:06:59 +00:00
|
|
|
src = fetchurl {
|
2023-01-08 20:35:57 +00:00
|
|
|
url = "mirror://kernel/linux/utils/fs/xfs/xfsprogs/${pname}-${version}.tar.xz";
|
2023-05-23 12:07:02 +00:00
|
|
|
hash = "sha256-7Jh8nwvLLbKZG/+4DTUxULOJw6K3m2gwQR9wQq32mQw=";
|
2009-10-08 13:07:56 +00:00
|
|
|
};
|
|
|
|
|
2017-07-20 08:54:25 +00:00
|
|
|
outputs = [ "bin" "dev" "out" "doc" ];
|
2014-09-19 21:18:33 +00:00
|
|
|
|
2018-11-28 09:44:42 +00:00
|
|
|
depsBuildBuild = [ buildPackages.stdenv.cc ];
|
|
|
|
nativeBuildInputs = [
|
2023-05-24 07:50:37 +00:00
|
|
|
gettext pkg-config
|
2018-11-28 09:44:42 +00:00
|
|
|
libuuid # codegen tool uses libuuid
|
2023-05-29 11:12:29 +00:00
|
|
|
liburcu # required by crc32selftest
|
2018-11-28 09:44:42 +00:00
|
|
|
];
|
2022-03-23 19:42:00 +00:00
|
|
|
buildInputs = [ readline icu inih liburcu ];
|
2018-11-28 09:44:42 +00:00
|
|
|
propagatedBuildInputs = [ libuuid ]; # Dev headers include <uuid/uuid.h>
|
2017-07-20 08:54:25 +00:00
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
2023-02-23 07:53:15 +00:00
|
|
|
# Install fails as:
|
|
|
|
# make[1]: *** No rule to make target '\', needed by 'kmem.lo'. Stop.
|
|
|
|
enableParallelInstalling = false;
|
2012-06-10 14:41:22 +00:00
|
|
|
|
2020-12-25 21:06:59 +00:00
|
|
|
# @sbindir@ is replaced with /run/current-system/sw/bin to fix dependency cycles
|
2014-09-19 23:14:50 +00:00
|
|
|
preConfigure = ''
|
2020-12-25 21:06:59 +00: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
|
|
|
|
patchShebangs ./install-sh
|
2014-09-19 23:14:50 +00:00
|
|
|
'';
|
|
|
|
|
2014-09-19 21:18:33 +00:00
|
|
|
configureFlags = [
|
|
|
|
"--disable-lib64"
|
2020-12-25 21:06:59 +00:00
|
|
|
"--with-systemd-unit-dir=${placeholder "out"}/lib/systemd/system"
|
2014-09-19 21:18:33 +00:00
|
|
|
];
|
2009-10-08 13:07:56 +00:00
|
|
|
|
2014-09-19 21:18:33 +00:00
|
|
|
installFlags = [ "install-dev" ];
|
|
|
|
|
2017-07-20 08:54:25 +00:00
|
|
|
# FIXME: forbidden rpath
|
|
|
|
postInstall = ''
|
|
|
|
find . -type d -name .libs | xargs rm -rf
|
|
|
|
'';
|
2014-09-19 21:18:33 +00:00
|
|
|
|
2023-01-14 20:56:30 +00:00
|
|
|
passthru.tests = {
|
|
|
|
inherit (nixosTests.installer) lvm;
|
|
|
|
};
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-10-02 07:58:50 +00:00
|
|
|
homepage = "https://xfs.org/";
|
2009-10-08 13:07:56 +00:00
|
|
|
description = "SGI XFS utilities";
|
2021-03-30 17:43:59 +00:00
|
|
|
license = with licenses; [ gpl2Only lgpl21 gpl3Plus ]; # see https://git.kernel.org/pub/scm/fs/xfs/xfsprogs-dev.git/tree/debian/copyright
|
2014-09-19 21:18:33 +00:00
|
|
|
platforms = platforms.linux;
|
2020-12-25 21:06:59 +00:00
|
|
|
maintainers = with maintainers; [ dezgeg ajs124 ];
|
2009-10-08 13:07:56 +00:00
|
|
|
};
|
|
|
|
}
|