2023-07-15 17:15:38 +00:00
|
|
|
{ lib, stdenv, buildPackages, fetchurl, gettext, pkg-config
|
2022-03-30 09:31:56 +00:00
|
|
|
, icu, libuuid, readline, inih, liburcu
|
2023-01-20 10:41:00 +00:00
|
|
|
, nixosTests
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "xfsprogs";
|
2024-07-27 06:49:29 +00:00
|
|
|
version = "6.9.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-05 17:05:55 +00:00
|
|
|
src = fetchurl {
|
2023-01-11 07:51:40 +00:00
|
|
|
url = "mirror://kernel/linux/utils/fs/xfs/xfsprogs/${pname}-${version}.tar.xz";
|
2024-07-27 06:49:29 +00:00
|
|
|
hash = "sha256-l1KEeD+z+8ThrmQL2ATXiOQjeoawdYKs7oa25I9lIbc=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
outputs = [ "bin" "dev" "out" "doc" ];
|
|
|
|
|
|
|
|
depsBuildBuild = [ buildPackages.stdenv.cc ];
|
|
|
|
nativeBuildInputs = [
|
2023-07-15 17:15:38 +00:00
|
|
|
gettext pkg-config
|
2020-04-24 23:36:52 +00:00
|
|
|
libuuid # codegen tool uses libuuid
|
2023-07-15 17:15:38 +00:00
|
|
|
liburcu # required by crc32selftest
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
2022-03-30 09:31:56 +00:00
|
|
|
buildInputs = [ readline icu inih liburcu ];
|
2020-04-24 23:36:52 +00:00
|
|
|
propagatedBuildInputs = [ libuuid ]; # Dev headers include <uuid/uuid.h>
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
2023-03-27 19:17:25 +00:00
|
|
|
# Install fails as:
|
|
|
|
# make[1]: *** No rule to make target '\', needed by 'kmem.lo'. Stop.
|
|
|
|
enableParallelInstalling = false;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-05 17:05:55 +00:00
|
|
|
# @sbindir@ is replaced with /run/current-system/sw/bin to fix dependency cycles
|
2020-04-24 23:36:52 +00:00
|
|
|
preConfigure = ''
|
2021-01-05 17:05:55 +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
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
configureFlags = [
|
|
|
|
"--disable-lib64"
|
2021-01-05 17:05:55 +00:00
|
|
|
"--with-systemd-unit-dir=${placeholder "out"}/lib/systemd/system"
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
installFlags = [ "install-dev" ];
|
|
|
|
|
|
|
|
# FIXME: forbidden rpath
|
|
|
|
postInstall = ''
|
|
|
|
find . -type d -name .libs | xargs rm -rf
|
|
|
|
'';
|
|
|
|
|
2023-01-20 10:41:00 +00:00
|
|
|
passthru.tests = {
|
|
|
|
inherit (nixosTests.installer) lvm;
|
|
|
|
};
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2024-09-19 14:19:46 +00:00
|
|
|
homepage = "https://xfs.wiki.kernel.org";
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "SGI XFS utilities";
|
2021-04-05 15:23:46 +00:00
|
|
|
license = with licenses; [ gpl2Only lgpl21 gpl3Plus ]; # see https://git.kernel.org/pub/scm/fs/xfs/xfsprogs-dev.git/tree/debian/copyright
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.linux;
|
2024-04-21 15:54:59 +00:00
|
|
|
maintainers = with maintainers; [ dezgeg ajs124 ] ++ teams.helsinki-systems.members;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|